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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-css-all-cues.html

Issue 2268923003: Clean up textTrackDisplayElement utility function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 4 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Test that style to all cues is applied correctly.</title> 2 <title>Test that style to all cues is applied correctly.</title>
3 <script src="../media-file.js"></script> 3 <script src="../media-file.js"></script>
4 <script src="../media-controls.js"></script> 4 <script src="../media-controls.js"></script>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <video></video> 7 <video></video>
8 <style> 8 <style>
9 video::cue { 9 video::cue {
10 color: purple; 10 color: purple;
(...skipping 10 matching lines...) Expand all
21 var video = document.querySelector('video'); 21 var video = document.querySelector('video');
22 video.src = findMediaFile('video', '../content/test'); 22 video.src = findMediaFile('video', '../content/test');
23 23
24 var track = document.createElement('track'); 24 var track = document.createElement('track');
25 track.src = 'captions-webvtt/styling.vtt'; 25 track.src = 'captions-webvtt/styling.vtt';
26 track.kind = 'captions'; 26 track.kind = 'captions';
27 track.default = true; 27 track.default = true;
28 video.appendChild(track); 28 video.appendChild(track);
29 29
30 video.onseeked = t.step_func_done(function() { 30 video.onseeked = t.step_func_done(function() {
31 var cueStyle = getComputedStyle(textTrackDisplayElement(video, 'cue')); 31 var cueStyle = getComputedStyle(textTrackCueElementByIndex(video, 0).fir stChild);
32 assert_equals(cueStyle.color, 'rgb(128, 0, 128)'); 32 assert_equals(cueStyle.color, 'rgb(128, 0, 128)');
33 assert_equals(cueStyle.backgroundColor, 'rgb(0, 255, 0)'); 33 assert_equals(cueStyle.backgroundColor, 'rgb(0, 255, 0)');
34 assert_equals(cueStyle.textDecorationLine, 'underline'); 34 assert_equals(cueStyle.textDecorationLine, 'underline');
35 assert_equals(cueStyle.textDecorationStyle, 'dashed'); 35 assert_equals(cueStyle.textDecorationStyle, 'dashed');
36 assert_equals(cueStyle.textDecorationColor, 'rgb(0, 255, 255)'); 36 assert_equals(cueStyle.textDecorationColor, 'rgb(0, 255, 255)');
37 }); 37 });
38 38
39 video.currentTime = 0.5; 39 video.currentTime = 0.5;
40 }); 40 });
41 </script> 41 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698