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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-text-track-cue-list.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 <script> 10 <script>
9 11
10 function trackLoaded() 12 function trackLoaded()
11 { 13 {
12 var testTrack = document.getElementById('testTrack'); 14 var testTrack = document.getElementById('testTrack');
13 cues = testTrack.track.cues; 15 cues = testTrack.track.cues;
14 16
15 consoleWrite("<br>*** Testing TextTrackCueList length"); 17 consoleWrite("<br>*** Testing TextTrackCueList length");
16 18
17 testExpected("cues.length", 4); 19 testExpected("cues.length", 4);
18 20
19 consoleWrite("<br>*** Testing TextTrackCueList [] operator"); 21 consoleWrite("<br>*** Testing TextTrackCueList [] operator");
20 22
21 testExpected("cues[0].id", "1"); 23 testExpected("cues[0].id", "1");
22 testExpected("cues[3].id", "4"); 24 testExpected("cues[3].id", "4");
23 testExpected("cues[4]", undefined); 25 testExpected("cues[4]", undefined);
24 26
25 consoleWrite("<br>*** Testing TextTrackCueList getCueById()"); 27 consoleWrite("<br>*** Testing TextTrackCueList getCueById()");
26 28
27 testExpected("cues.getCueById('1').startTime", 0); 29 testExpected("cues.getCueById('1').startTime", 0);
28 testExpected("cues.getCueById('4').startTime", 121); 30 testExpected("cues.getCueById('4').startTime", 121);
29 testExpected("cues.getCueById('junk')", undefined); 31 testExpected("cues.getCueById('junk')", undefined);
30 32
31 endTest(); 33 endTest();
32 } 34 }
33 35
34 </script> 36 </script>
35 </head> 37 </head>
36 <body> 38 <body>
37 <p>Tests TextTrackCueList functionality: length, operator[], and getCueB yId()</p> 39 <p>Tests TextTrackCueList functionality: length, operator[], and getCueB yId()</p>
38 <video> 40 <video>
39 <track id="testTrack" src="captions-webvtt/tc013-settings.vtt" kind= "captions" onload="trackLoaded()" default> 41 <track id="testTrack" src="captions-webvtt/tc013-settings.vtt" kind= "captions" onload="trackLoaded()" default>
40 </video> 42 </video>
41 </body> 43 </body>
42 </html> 44 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698