OLD | NEW |
---|---|
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
5 | 5 |
6 <script src=../media-file.js></script> | 6 <script src=../media-file.js></script> |
7 <script src=../video-test.js></script> | 7 <script src=../video-test.js></script> |
8 <script src=../media-controls.js></script> | 8 <script src=../media-controls.js></script> |
9 | 9 |
10 <style> | 10 <style> |
11 | 11 |
12 video::cue { color: purple; background-color: lime; } | 12 video::cue { |
13 color: purple; | |
14 background-color: lime; | |
15 text-decoration-line: underline; | |
16 text-decoration-style: dashed; | |
17 text-decoration-color: cyan; | |
Julien - ping for review
2013/07/18 01:06:02
I would love to see the shorthand 'text-decoration
| |
18 } | |
13 | 19 |
14 </style> | 20 </style> |
15 | 21 |
16 <script> | 22 <script> |
17 | 23 |
18 function seeked() | 24 function seeked() |
19 { | 25 { |
20 testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue') ).color", "rgb(128, 0, 128)"); | 26 testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue') ).color", "rgb(128, 0, 128)"); |
21 testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue') ).backgroundColor", "rgb(0, 255, 0)"); | 27 testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue') ).backgroundColor", "rgb(0, 255, 0)"); |
28 testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue') ).textDecorationLine", "underline"); | |
29 testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue') ).textDecorationStyle", "dashed"); | |
30 testExpected("getComputedStyle(textTrackDisplayElement(video, 'cue') ).textDecorationColor", "rgb(0, 255, 255)"); | |
22 endTest(); | 31 endTest(); |
23 } | 32 } |
24 | 33 |
25 function loaded() | 34 function loaded() |
26 { | 35 { |
27 consoleWrite("Test that style to all cues is applied correctly."); | 36 consoleWrite("Test that style to all cues is applied correctly."); |
28 findMediaElement(); | 37 findMediaElement(); |
29 video.src = findMediaFile('video', '../content/test'); | 38 video.src = findMediaFile('video', '../content/test'); |
30 waitForEvent('seeked', seeked); | 39 waitForEvent('seeked', seeked); |
31 waitForEvent('canplaythrough', function() { video.currentTime = .5; }); | 40 waitForEvent('canplaythrough', function() { video.currentTime = .5; }); |
32 } | 41 } |
33 | 42 |
34 </script> | 43 </script> |
35 </head> | 44 </head> |
36 <body onload="loaded()"> | 45 <body onload="loaded()"> |
37 <video controls > | 46 <video controls > |
38 <track src="captions-webvtt/styling.vtt" kind="captions" default> | 47 <track src="captions-webvtt/styling.vtt" kind="captions" default> |
39 </video> | 48 </video> |
40 </body> | 49 </body> |
41 </html> | 50 </html> |
OLD | NEW |