Index: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc003-newlines.html |
diff --git a/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc003-newlines.html b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc003-newlines.html |
index 6f062951f37efbb1b78fdf09a876a7dc519d2b2d..dd9a118e8be266657903fe6456fa2a5fb43e003f 100644 |
--- a/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc003-newlines.html |
+++ b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc003-newlines.html |
@@ -1,50 +1,26 @@ |
<!DOCTYPE html> |
-<html> |
- <head> |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
+<title>Tests that a cue with no newline at eof is properly parsed.</title> |
+<script src="track-helpers.js"></script> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<video> |
+ <track src="captions-webvtt/tc003-no-newline-at-eof.vtt" default> |
+</video> |
+<script> |
+async_test(function(t) { |
+ var track = document.querySelector("track"); |
- <script src=../media-file.js></script> |
- <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
- (Please avoid writing new tests using video-test.js) --> |
- <script src=../video-test.js></script> |
- <script> |
- |
- function trackLoaded() |
+ track.onload = t.step_func_done(function() { |
+ var expected = [ |
{ |
- findMediaElement(); |
- var expected = |
- { |
- length : 1, |
- tests: |
- [ |
- { |
- property : "id", |
- values : [1], |
- }, |
- { |
- property : "startTime", |
- values : [0.0], |
- }, |
- { |
- property : "endTime", |
- values : [30.5], |
- }, |
- { |
- property : "text", |
- values : ["Bear is Coming!!!!!"], |
- }, |
- ], |
- }; |
- testCues(0, expected); |
- |
- endTest(); |
+ id : "1", |
+ startTime : 0, |
+ endTime : 30.5, |
+ text : "Bear is Coming!!!!!" |
} |
- </script> |
- </head> |
- <body> |
- <p>Tests that a cue with no newline at eof is properly parsed.</p> |
- <video> |
- <track src="captions-webvtt/tc003-no-newline-at-eof.vtt" onload="trackLoaded()" default> |
- </video> |
- </body> |
-</html> |
+ ]; |
+ |
+ assert_cues_equal(track.track.cues, expected); |
+ }); |
+}); |
+</script> |