Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: LayoutTests/media/track/track-css-matching-css-override-settings.html

Issue 921833003: Expose APIs for text track settings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed comments from fs Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698