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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc017-line-position.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, 9 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 : 7, 28 length : 7,
27 tests: 29 tests:
28 [ 30 [
29 { 31 {
30 property : "line", 32 property : "line",
31 values : [0, 0, 50, 5, 100, -1, 500], 33 values : [0, 0, 50, 5, 100, -1, 500],
32 }, 34 },
33 { 35 {
34 property : "snapToLines", 36 property : "snapToLines",
35 values : [false, true, false, true, false, true, tru e], 37 values : [false, true, false, true, false, true, tru e],
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 : 6, 51 length : 6,
50 tests: 52 tests:
51 [ 53 [
52 { 54 {
53 property : "line", 55 property : "line",
54 values : ["auto", "auto", "auto", "auto", "auto", "a uto", "auto"], 56 values : ["auto", "auto", "auto", "auto", "auto", "a uto", "auto"],
55 }, 57 },
56 { 58 {
57 property : "snapToLines", 59 property : "snapToLines",
58 values : [true, true, true, true, true, true, true], 60 values : [true, true, true, true, true, true, true],
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 line position from settings.</p> 71 <p>Tests cue line position from settings.</p>
70 <video> 72 <video>
71 <track src="captions-webvtt/tc017-line-position.vtt" onload="trackLo aded()"> 73 <track src="captions-webvtt/tc017-line-position.vtt" onload="trackLo aded()">
72 <track src="captions-webvtt/tc017-line-position-bad.vtt" onload="tra ckLoaded()"> 74 <track src="captions-webvtt/tc017-line-position-bad.vtt" onload="tra ckLoaded()">
73 </video> 75 </video>
74 </body> 76 </body>
75 </html> 77 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698