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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc015-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 = 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 : 4, 29 length : 4,
28 tests: 30 tests:
29 [ 31 [
30 { 32 {
31 property : "position", 33 property : "position",
32 values : [0, 50, "auto", 100], 34 values : [0, 50, "auto", 100],
33 }, 35 },
34 ], 36 ],
35 }; 37 };
36 testCues(i, expected); 38 testCues(i, expected);
37 39
38 allTestsEnded(); 40 allTestsEnded();
39 } 41 }
40 42
41 function testTrackError(i) 43 function testTrackError(i)
42 { 44 {
43 findMediaElement(); 45 findMediaElement();
44 var expected = 46 var expected =
45 { 47 {
46 length : 8, 48 length : 8,
47 tests: 49 tests:
48 [ 50 [
49 { 51 {
50 property : "position", 52 property : "position",
51 values : ["auto", "auto", "auto", "auto", "auto", "a uto", "auto", "auto"], 53 values : ["auto", "auto", "auto", "auto", "auto", "a uto", "auto", "auto"],
52 }, 54 },
53 ], 55 ],
54 }; 56 };
55 testCues(i, expected); 57 testCues(i, expected);
56 58
57 allTestsEnded(); 59 allTestsEnded();
58 } 60 }
59 </script> 61 </script>
60 </head> 62 </head>
61 <body onload="enableAllTextTracks()"> 63 <body onload="enableAllTextTracks()">
62 <p>Tests cue text position from settings.</p> 64 <p>Tests cue text position from settings.</p>
63 <video> 65 <video>
64 <track src="captions-webvtt/tc015-positioning.vtt" onload="trackLoad ed()"> 66 <track src="captions-webvtt/tc015-positioning.vtt" onload="trackLoad ed()">
65 <track src="captions-webvtt/tc015-positioning-ltr.vtt" onload="track Loaded()"> 67 <track src="captions-webvtt/tc015-positioning-ltr.vtt" onload="track Loaded()">
66 <track src="captions-webvtt/tc015-positioning-bad.vtt" onload="track Loaded()"> 68 <track src="captions-webvtt/tc015-positioning-bad.vtt" onload="track Loaded()">
67 </video> 69 </video>
68 </body> 70 </body>
69 </html> 71 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698