Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <video> | |
|
fs
2015/02/17 09:43:46
I'd still put this last rather than first.
srivats
2015/02/18 01:46:51
Done.
| |
| 3 <track src="captions-webvtt/styling.vtt" kind="captions" default> | |
| 4 </video> | |
| 5 <script src=../media-file.js></script> | |
| 6 <script src=../video-test.js></script> | |
| 7 <script src=../media-controls.js></script> | |
| 8 | |
| 9 <style> | |
| 10 video::cue { | |
|
fs
2015/02/17 09:43:46
What I meant for this test was really to have this
srivats
2015/02/18 01:46:51
Done.
| |
| 11 color: cyan; | |
| 12 background-color: green; | |
| 13 text-shadow: 2px 2px #ff0000; | |
| 14 font-size: 14px; | |
| 15 font-family: fantasy; | |
| 16 font-style: italic; | |
| 17 font-variant: small-caps; | |
| 18 } | |
| 19 video::-webkit-media-text-track-display { | |
| 20 background-color: blue; | |
| 21 } | |
| 22 </style> | |
| 23 | |
| 24 <script> | |
| 25 | |
| 26 function checkExpected() { | |
| 27 cue = textTrackDisplayElement(video, 'cue'); | |
| 28 display = textTrackDisplayElement(video, 'display'); | |
| 29 testExpected("getComputedStyle(cue).color", "rgb(0, 255, 255)"); | |
| 30 testExpected("getComputedStyle(cue).backgroundColor", "rgb(0, 128, 0)"); | |
| 31 testExpected("getComputedStyle(display).backgroundColor", "rgb(0, 0, 255 )"); | |
| 32 testExpected("getComputedStyle(cue).textShadow", "rgb(255, 0, 0) 2px 2px 0px"); | |
| 33 testExpected("getComputedStyle(cue).fontSize", "14px"); | |
| 34 testExpected("getComputedStyle(cue).fontFamily", "fantasy"); | |
| 35 testExpected("getComputedStyle(cue).fontStyle", "italic"); | |
| 36 testExpected("getComputedStyle(cue).fontVariant", "small-caps"); | |
| 37 endTest(); | |
| 38 } | |
| 39 | |
| 40 window.onload = function() { | |
| 41 consoleWrite("Test that WebVTT objects are being styled correctly based on css settings."); | |
| 42 findMediaElement(); | |
| 43 video.src = findMediaFile('video', '../content/test'); | |
| 44 waitForEvent('canplaythrough', checkExpected); | |
| 45 } | |
| 46 | |
| 47 </script> | |
| OLD | NEW |