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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-css-matching-default.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, 3 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 u, b, i WebVTT objects are being styled correctly.</title> 2 <title>Test that u, b, i WebVTT objects are being styled 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 <script> 8 <script>
9 async_test(function(t) { 9 async_test(function(t) {
10 var video = document.querySelector('video'); 10 var video = document.querySelector('video');
11 video.src = findMediaFile('video', '../content/test'); 11 video.src = findMediaFile('video', '../content/test');
12 12
13 var track = document.createElement('track'); 13 var track = document.createElement('track');
14 track.src = 'captions-webvtt/styling-default.vtt'; 14 track.src = 'captions-webvtt/styling-default.vtt';
15 track.kind = 'captions'; 15 track.kind = 'captions';
16 track.default = true; 16 track.default = true;
17 video.appendChild(track); 17 video.appendChild(track);
18 18
19 video.onseeked = t.step_func_done(function() { 19 video.onseeked = t.step_func_done(function() {
20 var cueNode = textTrackDisplayElement(video, 'cue').firstElementChild; 20 var cueNode = textTrackCueElementByIndex(video, 0).firstChild.firstEleme ntChild;
21 assert_equals(getComputedStyle(cueNode).fontWeight, 'bold'); 21 assert_equals(getComputedStyle(cueNode).fontWeight, 'bold');
22 cueNode = cueNode.nextElementSibling; 22 cueNode = cueNode.nextElementSibling;
23 assert_equals(getComputedStyle(cueNode).fontStyle, 'italic'); 23 assert_equals(getComputedStyle(cueNode).fontStyle, 'italic');
24 cueNode = cueNode.nextElementSibling; 24 cueNode = cueNode.nextElementSibling;
25 assert_equals(getComputedStyle(cueNode).textDecoration, 'underline solid rgb(255, 255, 255)'); 25 assert_equals(getComputedStyle(cueNode).textDecoration, 'underline solid rgb(255, 255, 255)');
26 }); 26 });
27 27
28 video.currentTime = 0.1; 28 video.currentTime = 0.1;
29 }); 29 });
30 </script> 30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698