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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-cues-cuechange.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 cueChangeCount = 0; 13 var cueChangeCount = 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 if (cueChangeCount % 2 == 0) { 53 if (cueChangeCount % 2 == 0) {
52 consoleWrite("Cue entered"); 54 consoleWrite("Cue entered");
53 testExpected(currentCue, testTrack.track.activeCues[0]); 55 testExpected(currentCue, testTrack.track.activeCues[0]);
54 testExpected("currentCue.id", currentCueIndex + 1); 56 testExpected("currentCue.id", currentCueIndex + 1);
55 } else 57 } else
56 consoleWrite("Cue exited"); 58 consoleWrite("Cue exited");
57 consoleWrite(""); 59 consoleWrite("");
58 } 60 }
59 61
60 waitForEvent('canplaythrough', 62 waitForEvent('canplaythrough',
61 function () 63 function ()
62 { 64 {
63 videoCanPlayThrough = true; 65 videoCanPlayThrough = true;
64 attemptTests(); 66 attemptTests();
65 } 67 }
66 ); 68 );
67 69
68 function loaded() 70 function loaded()
69 { 71 {
70 trackLoaded = true; 72 trackLoaded = true;
71 attemptTests(); 73 attemptTests();
72 } 74 }
73 75
74 function start() 76 function start()
75 { 77 {
76 findMediaElement(); 78 findMediaElement();
77 video.src = findMediaFile("video", "../content/test"); 79 video.src = findMediaFile("video", "../content/test");
78 } 80 }
79 81
80 </script> 82 </script>
81 </head> 83 </head>
82 <body onload="start()"> 84 <body onload="start()">
83 <p>Tests that TextTrack's cues are indexed and updated in order during v ideo playback. Test uses the cuechange event.</p> 85 <p>Tests that TextTrack's cues are indexed and updated in order during v ideo playback. Test uses the cuechange event.</p>
84 <video controls> 86 <video controls>
85 <track id="testTrack" src="captions-webvtt/cues-chrono-order.vtt" ki nd="captions" onload="loaded()" default> 87 <track id="testTrack" src="captions-webvtt/cues-chrono-order.vtt" ki nd="captions" onload="loaded()" default>
86 </video> 88 </video>
87 </body> 89 </body>
88 </html> 90 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698