REGRESSION (r224780): Text stroke not applied to video captions.
[WebKit-https.git] / LayoutTests / media / track / track-css-stroke-cues.html
1 <!DOCTYPE html>
2 <html>
3     <head>
4         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
6         <script src=../media-file.js></script>
7         <script src=../video-test.js></script>
8         <script src=../media-controls.js></script>
9
10         <style>
11
12         video::cue { stroke-width: 4px; stroke-color: black; paint-order: stroke; stroke-linecap: round; stroke-linejoin: round;}
13
14         </style>
15
16         <script>
17
18         function seeked()
19         {
20             testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue')).strokeWidth", "4px");
21             testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue')).strokeColor", "rgb(0, 0, 0)");
22             testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue')).paintOrder", "stroke");
23             testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue')).strokeLinejoin", "round");
24             testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue')).strokeLinecap", "round");
25             testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue')).overflow", "visible");
26             endTest();
27         }
28
29         function loaded()
30         {
31             consoleWrite("Test that style to all cues is applied correctly.");
32             findMediaElement();
33             video.src = findMediaFile('video', '../content/test');
34             waitForEvent('seeked', seeked);
35             waitForEvent('canplaythrough', function() { video.currentTime = .5; });
36         }
37
38         setCaptionDisplayMode('Automatic');
39         </script>
40     </head>
41     <body onload="loaded()">
42         <video controls >
43             <track src="captions-webvtt/styling.vtt" kind="captions" default>
44         </video>
45     </body>
46 </html>