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

Unified 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698