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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc021-valign.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 = 3; 12 var 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 : 3, 29 length : 3,
28 tests: 30 tests:
29 [ 31 [
30 { 32 {
31 property : "vertical", 33 property : "vertical",
32 values : ["rl", "lr", "rl"], 34 values : ["rl", "lr", "rl"],
33 }, 35 },
34 { 36 {
35 property : "align", 37 property : "align",
36 values : ["middle", "middle", "start"], 38 values : ["middle", "middle", "start"],
37 }, 39 },
38 { 40 {
39 property : "position", 41 property : "position",
40 values : ["auto", "auto", 0], 42 values : ["auto", "auto", 0],
41 }, 43 },
42 ], 44 ],
43 }; 45 };
44 testCues(i, expected); 46 testCues(i, expected);
45 47
46 allTestsEnded(); 48 allTestsEnded();
47 } 49 }
48 50
49 function testTrackError(i) 51 function testTrackError(i)
50 { 52 {
51 findMediaElement(); 53 findMediaElement();
52 var expected = 54 var expected =
53 { 55 {
54 length : 3, 56 length : 3,
55 tests: 57 tests:
56 [ 58 [
57 { 59 {
58 property : "vertical", 60 property : "vertical",
59 values : ["", "", ""], 61 values : ["", "", ""],
60 }, 62 },
61 ], 63 ],
62 }; 64 };
63 testCues(i, expected); 65 testCues(i, expected);
64 66
65 allTestsEnded(); 67 allTestsEnded();
66 } 68 }
67 </script> 69 </script>
68 </head> 70 </head>
69 <body onload="enableAllTextTracks()"> 71 <body onload="enableAllTextTracks()">
70 <p>Tests cue vertical alignment (direction) from settings.</p> 72 <p>Tests cue vertical alignment (direction) from settings.</p>
71 <video> 73 <video>
72 <track src="captions-webvtt/tc021-valign.vtt" onload="trackLoaded()" > 74 <track src="captions-webvtt/tc021-valign.vtt" onload="trackLoaded()" >
73 <track src="captions-webvtt/tc021-valign-ltr.vtt" onload="trackLoade d()"> 75 <track src="captions-webvtt/tc021-valign-ltr.vtt" onload="trackLoade d()">
74 <track src="captions-webvtt/tc021-valign-bad.vtt" onload="trackLoade d()"> 76 <track src="captions-webvtt/tc021-valign-bad.vtt" onload="trackLoade d()">
75 </video> 77 </video>
76 </body> 78 </body>
77 </html> 79 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698