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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc003-newlines.html

Issue 1970483002: Convert track-webvtt-tc[003-005] tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 7 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 <title>Tests that a cue with no newline at eof is properly parsed.</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 <video>
7 <track src="captions-webvtt/tc003-no-newline-at-eof.vtt" default>
8 </video>
9 <script>
10 async_test(function(t) {
11 var track = document.querySelector("track");
5 12
6 <script src=../media-file.js></script> 13 track.onload = t.step_func_done(function() {
7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 14 var expected = [
8 (Please avoid writing new tests using video-test.js) --> 15 {
9 <script src=../video-test.js></script> 16 id : "1",
10 <script> 17 startTime : 0,
18 endTime : 30.5,
19 text : "Bear is Coming!!!!!"
20 }
21 ];
11 22
12 function trackLoaded() 23 assert_cues_equal(track.track.cues, expected);
13 { 24 });
14 findMediaElement(); 25 });
15 var expected = 26 </script>
16 {
17 length : 1,
18 tests:
19 [
20 {
21 property : "id",
22 values : [1],
23 },
24 {
25 property : "startTime",
26 values : [0.0],
27 },
28 {
29 property : "endTime",
30 values : [30.5],
31 },
32 {
33 property : "text",
34 values : ["Bear is Coming!!!!!"],
35 },
36 ],
37 };
38 testCues(0, expected);
39
40 endTest();
41 }
42 </script>
43 </head>
44 <body>
45 <p>Tests that a cue with no newline at eof is properly parsed.</p>
46 <video>
47 <track src="captions-webvtt/tc003-no-newline-at-eof.vtt" onload="tra ckLoaded()" default>
48 </video>
49 </body>
50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698