Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <video> | |
|
fs
2015/02/17 09:43:47
See issue in other test.
srivats
2015/02/18 01:46:52
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 <script> | |
| 9 | |
| 10 function initSettings() { | |
| 11 if (window.internals) { | |
| 12 internals.settings.setTextTrackTextColor("cyan"); | |
| 13 internals.settings.setTextTrackBackgroundColor("green"); | |
| 14 internals.settings.setTextTrackWindowColor("blue"); | |
| 15 internals.settings.setTextTrackTextShadow("2px 2px #ff0000") | |
| 16 internals.settings.setTextTrackTextSize("14px"); | |
| 17 internals.settings.setTextTrackFontFamily("fantasy"); | |
| 18 internals.settings.setTextTrackFontStyle("italic"); | |
| 19 internals.settings.setTextTrackFontVariant("small-caps"); | |
| 20 } | |
| 21 } | |
| 22 | |
| 23 function checkExpected() { | |
| 24 cue = textTrackDisplayElement(video, 'cue'); | |
| 25 display = textTrackDisplayElement(video, 'display'); | |
| 26 testExpected("getComputedStyle(cue).color", "rgb(0, 255, 255)"); | |
| 27 testExpected("getComputedStyle(cue).backgroundColor", "rgb(0, 128, 0)"); | |
| 28 testExpected("getComputedStyle(display).backgroundColor", "rgb(0, 0, 255 )"); | |
| 29 testExpected("getComputedStyle(cue).textShadow", "rgb(255, 0, 0) 2px 2px 0px"); | |
| 30 testExpected("getComputedStyle(cue).fontSize", "14px"); | |
| 31 testExpected("getComputedStyle(cue).fontFamily", "fantasy"); | |
| 32 testExpected("getComputedStyle(cue).fontStyle", "italic"); | |
| 33 testExpected("getComputedStyle(cue).fontVariant", "small-caps"); | |
| 34 endTest(); | |
| 35 } | |
| 36 | |
| 37 window.onload = function() { | |
| 38 initSettings(); | |
| 39 consoleWrite("Test that WebVTT objects are being styled correctly based on user settings."); | |
| 40 findMediaElement(); | |
| 41 video.src = findMediaFile('video', '../content/test'); | |
| 42 waitForEvent('canplaythrough', checkExpected); | |
| 43 } | |
| 44 | |
| 45 </script> | |
| OLD | NEW |