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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc009-timings-hour.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 numberOfTrackTests = 2; 12 numberOfTrackTests = 2;
11 13
12 function trackLoaded() 14 function trackLoaded()
13 { 15 {
14 numberOfTracksLoaded++; 16 numberOfTracksLoaded++;
15 if (numberOfTracksLoaded == numberOfTrackTests) { 17 if (numberOfTracksLoaded == numberOfTrackTests) {
16 testTrack0(); 18 testTrack0();
17 testTrack1(); 19 testTrack1();
18 } 20 }
19 } 21 }
20 22
21 function testTrack0() 23 function testTrack0()
22 { 24 {
23 findMediaElement(); 25 findMediaElement();
24 var expected = 26 var expected =
25 { 27 {
26 length : 3, 28 length : 3,
27 tests: 29 tests:
28 [ 30 [
29 { 31 {
30 property : "id", 32 property : "id",
31 values : ["1", "2", "3"], 33 values : ["1", "2", "3"],
32 }, 34 },
33 { 35 {
34 property : "startTime", 36 property : "startTime",
(...skipping 10 matching lines...) Expand all
45 ], 47 ],
46 }; 48 };
47 testCues(0, expected); 49 testCues(0, expected);
48 50
49 allTestsEnded(); 51 allTestsEnded();
50 } 52 }
51 53
52 function testTrack1() 54 function testTrack1()
53 { 55 {
54 findMediaElement(); 56 findMediaElement();
55 var expected = 57 var expected =
56 { 58 {
57 length : 0, 59 length : 0,
58 tests: 60 tests:
59 [], 61 [],
60 }; 62 };
61 testCues(1, expected); 63 testCues(1, expected);
62 64
63 allTestsEnded(); 65 allTestsEnded();
64 } 66 }
65 </script> 67 </script>
66 </head> 68 </head>
67 <body onload="enableAllTextTracks()"> 69 <body onload="enableAllTextTracks()">
68 <p>Tests cue timings that contain hours (they are optional), and tests v arious syntax errors in timings with hours.</p> 70 <p>Tests cue timings that contain hours (they are optional), and tests v arious syntax errors in timings with hours.</p>
69 <video> 71 <video>
70 <track src="captions-webvtt/tc009-timings-hour.vtt" onload="trackLoa ded()"> 72 <track src="captions-webvtt/tc009-timings-hour.vtt" onload="trackLoa ded()">
71 <track src="captions-webvtt/tc009-timings-hour-error.vtt" onload="tr ackLoaded()"> 73 <track src="captions-webvtt/tc009-timings-hour-error.vtt" onload="tr ackLoaded()">
72 </video> 74 </video>
73 </body> 75 </body>
74 </html> 76 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698