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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc020-cue-size-align.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 property : "align", 36 property : "align",
35 values : ["start", "end", "middle"], 37 values : ["start", "end", "middle"],
36 }, 38 },
37 ], 39 ],
38 }; 40 };
39 testCues(i, expected); 41 testCues(i, expected);
40 42
41 allTestsEnded(); 43 allTestsEnded();
42 } 44 }
43 45
44 function testTrackError(i) 46 function testTrackError(i)
45 { 47 {
46 findMediaElement(); 48 findMediaElement();
47 var expected = 49 var expected =
48 { 50 {
49 length : 3, 51 length : 3,
50 tests: 52 tests:
51 [ 53 [
52 { 54 {
53 property : "size", 55 property : "size",
54 values : [100, 100, 100], 56 values : [100, 100, 100],
55 }, 57 },
56 { 58 {
57 property : "align", 59 property : "align",
58 values : ["middle", "end", "middle"], 60 values : ["middle", "end", "middle"],
59 }, 61 },
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 cue size and alignment from settings.</p> 71 <p>Tests cue size and alignment from settings.</p>
70 <video> 72 <video>
71 <track src="captions-webvtt/tc020-cue-size-align.vtt" onload="trackL oaded()"> 73 <track src="captions-webvtt/tc020-cue-size-align.vtt" onload="trackL oaded()">
72 <track src="captions-webvtt/tc020-cue-size-align-bad.vtt" onload="tr ackLoaded()"> 74 <track src="captions-webvtt/tc020-cue-size-align-bad.vtt" onload="tr ackLoaded()">
73 </video> 75 </video>
74 </body> 76 </body>
75 </html> 77 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698