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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc030-interspersed-non-cue.html

Issue 2035753002: Convert track-webvtt-tc[030-032] tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/track/track-webvtt-tc030-interspersed-non-cue-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <title>Tests that an empty line after an identifier line discards the current cu e and restarts the cue loop.</title>
3 <head> 3 <script src="track-helpers.js"></script>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 <script>
7 check_cues_from_track("captions-webvtt/tc030-interspersed-non-cue.vtt", function (track) {
8 var expected = [
9 { text: "First" },
10 { text: "Second" }
11 ];
5 12
6 <script src=../media-file.js></script> 13 assert_cues_match(track.cues, expected);
7 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 14 });
8 (Please avoid writing new tests using video-test.js) --> 15 </script>
9 <script src=../video-test.js></script>
10 <script>
11
12 numberOfTrackTests = 1;
13
14 function trackLoaded()
15 {
16 numberOfTracksLoaded++;
17 if (numberOfTracksLoaded == numberOfTrackTests) {
18 testTrack0();
19 }
20 }
21
22 function testTrack0()
23 {
24 findMediaElement();
25 var expected =
26 {
27 length: 2,
28 tests:
29 [
30 {
31 property: "text",
32 values:
33 [
34 'First',
35 'Second',
36 ],
37 },
38 ],
39 };
40 testCues(0, expected);
41
42 allTestsEnded();
43 }
44 </script>
45 </head>
46 <body onload="enableAllTextTracks()">
47 <p>Tests that an empty line after an identifier line discards the current cue and restarts the cue loop.</p>
48 <video>
49 <track src="captions-webvtt/tc030-interspersed-non-cue.vtt" onload=" trackLoaded()">
50 </video>
51 </body>
52 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/track/track-webvtt-tc030-interspersed-non-cue-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698