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

Unified 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, 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
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc030-interspersed-non-cue.html
diff --git a/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc030-interspersed-non-cue.html b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc030-interspersed-non-cue.html
index c3f941ef430ebfb637e0d6c947a3893f7b017410..ab5123b4f96c4e893ffd315b1c14fda09c5a772b 100644
--- a/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc030-interspersed-non-cue.html
+++ b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc030-interspersed-non-cue.html
@@ -1,52 +1,15 @@
<!DOCTYPE html>
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <script src=../media-file.js></script>
- <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
- (Please avoid writing new tests using video-test.js) -->
- <script src=../video-test.js></script>
- <script>
-
- numberOfTrackTests = 1;
-
- function trackLoaded()
- {
- numberOfTracksLoaded++;
- if (numberOfTracksLoaded == numberOfTrackTests) {
- testTrack0();
- }
- }
-
- function testTrack0()
- {
- findMediaElement();
- var expected =
- {
- length: 2,
- tests:
- [
- {
- property: "text",
- values:
- [
- 'First',
- 'Second',
- ],
- },
- ],
- };
- testCues(0, expected);
-
- allTestsEnded();
- }
- </script>
- </head>
- <body onload="enableAllTextTracks()">
- <p>Tests that an empty line after an identifier line discards the current cue and restarts the cue loop.</p>
- <video>
- <track src="captions-webvtt/tc030-interspersed-non-cue.vtt" onload="trackLoaded()">
- </video>
- </body>
-</html>
+<title>Tests that an empty line after an identifier line discards the current cue and restarts the cue loop.</title>
+<script src="track-helpers.js"></script>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+check_cues_from_track("captions-webvtt/tc030-interspersed-non-cue.vtt", function(track) {
+ var expected = [
+ { text: "First" },
+ { text: "Second" }
+ ];
+
+ assert_cues_match(track.cues, expected);
+});
+</script>
« 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