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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-cue-nothing-to-render.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 cues are rendered and removed.</title> 2 <title>Test that cues are rendered and removed.</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> 7 <video>
8 <track src="captions-webvtt/captions-gaps.vtt" kind="captions" default> 8 <track src="captions-webvtt/captions-gaps.vtt" kind="captions" default>
9 </video> 9 </video>
10 <script> 10 <script>
(...skipping 16 matching lines...) Expand all
27 27
28 video.onseeked = t.step_func(function() { 28 video.onseeked = t.step_func(function() {
29 var time = info[seekTimeIndex]; 29 var time = info[seekTimeIndex];
30 assert_equals(video.currentTime, time); 30 assert_equals(video.currentTime, time);
31 var cueText = info[++seekTimeIndex]; 31 var cueText = info[++seekTimeIndex];
32 ++seekTimeIndex; 32 ++seekTimeIndex;
33 33
34 assert_equals(video.currentTime.toFixed(1), time.toFixed(1)); 34 assert_equals(video.currentTime.toFixed(1), time.toFixed(1));
35 if (cueText.length) { 35 if (cueText.length) {
36 assert_equals(testTrack.track.activeCues[0].text, cueText); 36 assert_equals(testTrack.track.activeCues[0].text, cueText);
37 assert_equals(textTrackDisplayElement(video, "display").innerText, c ueText); 37 assert_equals(textTrackDisplayElement(video).innerText, cueText);
38 } else { 38 } else {
39 assert_equals(testTrack.track.activeCues.length, 0); 39 assert_equals(testTrack.track.activeCues.length, 0);
40 } 40 }
41 41
42 if (seekTimeIndex >= info.length) 42 if (seekTimeIndex >= info.length)
43 t.done(); 43 t.done();
44 44
45 video.currentTime = info[seekTimeIndex]; 45 video.currentTime = info[seekTimeIndex];
46 }); 46 });
47 47
48 video.currentTime = info[0]; 48 video.currentTime = info[0];
49 }); 49 });
50 </script> 50 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698