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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc016-align-positioning.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 : "position", 32 property : "position",
31 values : [10, 20, 80], 33 values : [10, 20, 80],
32 }, 34 },
33 { 35 {
34 property : "align", 36 property : "align",
35 values : ["start", "middle", "end"], 37 values : ["start", "middle", "end"],
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 : "position", 55 property : "position",
54 values : [10, "auto", "auto"], 56 values : [10, "auto", "auto"],
55 }, 57 },
56 { 58 {
57 property : "align", 59 property : "align",
58 values : ["middle", "middle", "middle"], 60 values : ["middle", "middle", "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 text position and alignment from settings.</p> 71 <p>Tests cue text position and alignment from settings.</p>
70 <video> 72 <video>
71 <track src="captions-webvtt/tc016-align-positioning.vtt" onload="tra ckLoaded()"> 73 <track src="captions-webvtt/tc016-align-positioning.vtt" onload="tra ckLoaded()">
72 <track src="captions-webvtt/tc016-align-positioning-bad.vtt" onload= "trackLoaded()"> 74 <track src="captions-webvtt/tc016-align-positioning-bad.vtt" onload= "trackLoaded()">
73 </video> 75 </video>
74 </body> 76 </body>
75 </html> 77 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698