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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc004-magic-header.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 = 3; 12 numberOfTrackTests = 3;
11 13
12 function trackLoaded() 14 function trackLoaded()
13 { 15 {
14 numberOfTracksLoaded++; 16 numberOfTracksLoaded++;
15 if (numberOfTracksLoaded == numberOfTrackTests) { 17 if (numberOfTracksLoaded == numberOfTrackTests) {
16 testTrack(0); 18 testTrack(0);
17 testTrack(1); 19 testTrack(1);
18 testTrackError(2); 20 testTrackError(2);
19 } 21 }
20 } 22 }
21 23
22 function testTrack(i) 24 function testTrack(i)
23 { 25 {
24 findMediaElement(); 26 findMediaElement();
25 var expected = 27 var expected =
26 { 28 {
27 length : 2, 29 length : 2,
28 tests: 30 tests:
29 [ 31 [
30 { 32 {
31 property : "id", 33 property : "id",
32 values : [1, 2], 34 values : [1, 2],
33 }, 35 },
34 { 36 {
35 property : "startTime", 37 property : "startTime",
36 values : [0.0, 31.0], 38 values : [0.0, 31.0],
37 }, 39 },
38 { 40 {
39 property : "endTime", 41 property : "endTime",
40 values : [30.5, 1200.5], 42 values : [30.5, 1200.5],
41 }, 43 },
42 { 44 {
43 property : "text", 45 property : "text",
44 values : ["Bear is Coming!!!!!", "I said Bear is com ing!!!!"], 46 values : ["Bear is Coming!!!!!", "I said Bear is com ing!!!!"],
45 }, 47 },
46 ], 48 ],
47 }; 49 };
48 testCues(i, expected); 50 testCues(i, expected);
49 51
50 allTestsEnded(); 52 allTestsEnded();
51 } 53 }
52 54
53 function testTrackError(i) 55 function testTrackError(i)
54 { 56 {
55 findMediaElement(); 57 findMediaElement();
56 var expected = 58 var expected =
57 { 59 {
58 length : 0, 60 length : 0,
59 tests: 61 tests:
60 [], 62 [],
61 }; 63 };
62 testCues(i, expected); 64 testCues(i, expected);
63 65
64 allTestsEnded(); 66 allTestsEnded();
65 } 67 }
66 </script> 68 </script>
67 </head> 69 </head>
68 <body onload="enableAllTextTracks()"> 70 <body onload="enableAllTextTracks()">
69 <p>Tests that the magic file header "WEBVTT" leads to the file properly recognized as a WebVTT file.</p> 71 <p>Tests that the magic file header "WEBVTT" leads to the file properly recognized as a WebVTT file.</p>
70 <video> 72 <video>
71 <track src="captions-webvtt/tc004-webvtt-file.vtt" onload="trackLoad ed()"> 73 <track src="captions-webvtt/tc004-webvtt-file.vtt" onload="trackLoad ed()">
72 <track src="captions-webvtt/tc004-webvtt-rubbish.vtt" onload="trackL oaded()"> 74 <track src="captions-webvtt/tc004-webvtt-rubbish.vtt" onload="trackL oaded()">
73 <track src="captions-webvtt/tc004-no-webvtt.vtt" onerror="trackLoade d()"> 75 <track src="captions-webvtt/tc004-no-webvtt.vtt" onerror="trackLoade d()">
74 </video> 76 </video>
75 </body> 77 </body>
76 </html> 78 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698