| Index: LayoutTests/media/track/track-css-matching-user-override-settings.html
|
| diff --git a/LayoutTests/media/track/track-css-matching-user-override-settings.html b/LayoutTests/media/track/track-css-matching-user-override-settings.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e27e40bfa78c30d90e3b1b99edcbc36c8e9d96df
|
| --- /dev/null
|
| +++ b/LayoutTests/media/track/track-css-matching-user-override-settings.html
|
| @@ -0,0 +1,59 @@
|
| +<!DOCTYPE html>
|
| +<script src=../media-file.js></script>
|
| +<script src=../video-test.js></script>
|
| +<script src=../media-controls.js></script>
|
| +<style>
|
| + video::cue {
|
| + color: lime;
|
| + background-color: yellow;
|
| + text-shadow: 4px 4px #ff0000;
|
| + font-size: 10px;
|
| + font-family: serif;
|
| + font-style: normal;
|
| + font-variant: normal;
|
| + }
|
| + video::-webkit-media-text-track-display {
|
| + background-color: purple;
|
| + }
|
| +</style>
|
| +<script>
|
| +
|
| + function initSettings() {
|
| + if (window.internals) {
|
| + internals.settings.setTextTrackTextColor("cyan");
|
| + internals.settings.setTextTrackBackgroundColor("green");
|
| + internals.settings.setTextTrackWindowColor("blue");
|
| + internals.settings.setTextTrackTextShadow("2px 2px #ff0000")
|
| + internals.settings.setTextTrackTextSize("14px");
|
| + internals.settings.setTextTrackFontFamily("fantasy");
|
| + internals.settings.setTextTrackFontStyle("italic");
|
| + internals.settings.setTextTrackFontVariant("small-caps");
|
| + }
|
| + }
|
| +
|
| + function checkExpected() {
|
| + cue = textTrackDisplayElement(video, 'cue');
|
| + display = textTrackDisplayElement(video, 'display');
|
| + testExpected("getComputedStyle(cue).color", "rgb(0, 255, 255)");
|
| + testExpected("getComputedStyle(cue).backgroundColor", "rgb(0, 128, 0)");
|
| + testExpected("getComputedStyle(display).backgroundColor", "rgb(0, 0, 255)");
|
| + testExpected("getComputedStyle(cue).textShadow", "rgb(255, 0, 0) 2px 2px 0px");
|
| + testExpected("getComputedStyle(cue).fontSize", "14px");
|
| + testExpected("getComputedStyle(cue).fontFamily", "fantasy");
|
| + testExpected("getComputedStyle(cue).fontStyle", "italic");
|
| + testExpected("getComputedStyle(cue).fontVariant", "small-caps");
|
| + endTest();
|
| + }
|
| +
|
| + window.onload = function() {
|
| + initSettings();
|
| + consoleWrite("Test that WebVTT objects are being styled correctly based on user settings.");
|
| + findMediaElement();
|
| + video.src = findMediaFile('video', '../content/test');
|
| + waitForEvent('canplaythrough', checkExpected);
|
| + }
|
| +
|
| +</script>
|
| +<video>
|
| + <track src="captions-webvtt/styling.vtt" kind="captions" default>
|
| +</video>
|
|
|