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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-cues-enter-exit.html

Issue 1715303002: Add TODOs to convert from video-test.js to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug ref Created 4 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 5
6 <script src=../media-file.js></script> 6 <script src=../media-file.js></script>
7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
8 (Please avoid writing new tests using video-test.js) -->
7 <script src=../video-test.js></script> 9 <script src=../video-test.js></script>
8 10
9 <script> 11 <script>
10 12
11 var cueCount = 0; 13 var cueCount = 0;
12 var currentCue; 14 var currentCue;
13 var testTrack; 15 var testTrack;
14 16
15 var trackLoaded = false; 17 var trackLoaded = false;
16 var videoCanPlayThrough = false; 18 var videoCanPlayThrough = false;
17 19
18 function attemptTests() 20 function attemptTests()
19 { 21 {
(...skipping 26 matching lines...) Expand all
46 { 48 {
47 consoleWrite("EVENT(exit)"); 49 consoleWrite("EVENT(exit)");
48 consoleWrite(""); 50 consoleWrite("");
49 51
50 ++cueCount; 52 ++cueCount;
51 if (cueCount == testTrack.track.cues.length) 53 if (cueCount == testTrack.track.cues.length)
52 endTest(); 54 endTest();
53 } 55 }
54 56
55 waitForEvent('canplaythrough', 57 waitForEvent('canplaythrough',
56 function () 58 function ()
57 { 59 {
58 videoCanPlayThrough = true; 60 videoCanPlayThrough = true;
59 attemptTests(); 61 attemptTests();
60 } 62 }
61 ); 63 );
62 64
63 function loaded() 65 function loaded()
64 { 66 {
65 trackLoaded = true; 67 trackLoaded = true;
66 attemptTests(); 68 attemptTests();
67 } 69 }
68 70
69 function start() 71 function start()
70 { 72 {
71 findMediaElement(); 73 findMediaElement();
72 video.src = findMediaFile("video", "../content/test"); 74 video.src = findMediaFile("video", "../content/test");
73 } 75 }
74 </script> 76 </script>
75 </head> 77 </head>
76 <body onload="start()"> 78 <body onload="start()">
77 <p>Tests that TextTrack's cues are indexed and updated in order during v ideo playback. Test uses the enter and exits events on TextTrackCue.</p> 79 <p>Tests that TextTrack's cues are indexed and updated in order during v ideo playback. Test uses the enter and exits events on TextTrackCue.</p>
78 <video controls> 80 <video controls>
79 <track id="testTrack" src="captions-webvtt/cues-chrono-order.vtt" ki nd="captions" onload="loaded()" default> 81 <track id="testTrack" src="captions-webvtt/cues-chrono-order.vtt" ki nd="captions" onload="loaded()" default>
80 </video> 82 </video>
81 </body> 83 </body>
82 </html> 84 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698