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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc006-cue-identifiers.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 26
25 var expected = 27 var expected =
26 { 28 {
27 length : 4, 29 length : 4,
28 tests: 30 tests:
29 [ 31 [
30 { 32 {
31 property : "id", 33 property : "id",
32 values : ["random_id", "another random identifier", "identifier--too", "identifier--too"], 34 values : ["random_id", "another random identifier", "identifier--too", "identifier--too"],
33 }, 35 },
34 { 36 {
35 property : "startTime", 37 property : "startTime",
(...skipping 10 matching lines...) Expand all
46 ], 48 ],
47 }; 49 };
48 testCues(0, expected); 50 testCues(0, expected);
49 51
50 allTestsEnded(); 52 allTestsEnded();
51 } 53 }
52 54
53 function testTrack1() 55 function testTrack1()
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(1, expected); 64 testCues(1, 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 any text other than "-->" is recognized as optional cue id entifier.</p> 71 <p>Tests that any text other than "-->" is recognized as optional cue id entifier.</p>
70 <video> 72 <video>
71 <track src="captions-webvtt/tc006-cue-id.vtt" onload="trackLoaded()" > 73 <track src="captions-webvtt/tc006-cue-id.vtt" onload="trackLoaded()" >
72 <track src="captions-webvtt/tc006-cue-id-error.vtt" onload="trackLoa ded()"> 74 <track src="captions-webvtt/tc006-cue-id-error.vtt" onload="trackLoa ded()">
73 </video> 75 </video>
74 </body> 76 </body>
75 </html> 77 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698