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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc019-cue-size.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 var numberOfTrackTests = 2; 12 var 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 testTrack(0); 18 testTrack(0);
17 testTrackError(1); 19 testTrackError(1);
18 } 20 }
19 } 21 }
20 22
21 function testTrack(i) 23 function testTrack(i)
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 : "size", 32 property : "size",
31 values : [100, 10, 0], 33 values : [100, 10, 0],
32 }, 34 },
33 ], 35 ],
34 }; 36 };
35 testCues(i, expected); 37 testCues(i, expected);
36 38
37 allTestsEnded(); 39 allTestsEnded();
38 } 40 }
39 41
40 function testTrackError(i) 42 function testTrackError(i)
41 { 43 {
42 findMediaElement(); 44 findMediaElement();
43 var expected = 45 var expected =
44 { 46 {
45 length : 3, 47 length : 3,
46 tests: 48 tests:
47 [ 49 [
48 { 50 {
49 property : "size", 51 property : "size",
50 values : [100, 100, 100], 52 values : [100, 100, 100],
51 }, 53 },
52 ], 54 ],
53 }; 55 };
54 testCues(i, expected); 56 testCues(i, expected);
55 57
56 allTestsEnded(); 58 allTestsEnded();
57 } 59 }
58 </script> 60 </script>
59 </head> 61 </head>
60 <body onload="enableAllTextTracks()"> 62 <body onload="enableAllTextTracks()">
61 <p>Tests cue size from settings.</p> 63 <p>Tests cue size from settings.</p>
62 <video> 64 <video>
63 <track src="captions-webvtt/tc019-cue-size.vtt" onload="trackLoaded( )"> 65 <track src="captions-webvtt/tc019-cue-size.vtt" onload="trackLoaded( )">
64 <track src="captions-webvtt/tc019-cue-size-bad.vtt" onload="trackLoa ded()"> 66 <track src="captions-webvtt/tc019-cue-size-bad.vtt" onload="trackLoa ded()">
65 </video> 67 </video>
66 </body> 68 </body>
67 </html> 69 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698