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

Unified Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc000-empty.html

Issue 1956213002: Convert track-webvtt-tc[000-002] 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-tc000-empty.html
diff --git a/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc000-empty.html b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc000-empty.html
index b41ee48640da5a913766bcfe859cff076e5f0ca6..c11525395eb26d961e4f52fef56825aadd9644a8 100644
--- a/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc000-empty.html
+++ b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc000-empty.html
@@ -1,28 +1,16 @@
<!DOCTYPE html>
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Tests that an empty file is not recognized as a WebVTT file.</title>
+<video>
+ <track src="captions-webvtt/tc000-empty.vtt" default>
+</video>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<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()
- {
- findMediaElement();
- testExpected("video.textTracks[0].cues.length", "0");
-
- endTest();
- }
-
- </script>
- </head>
- <body>
- <p>Tests that an empty file is not recognized as a WebVTT file.</p>
- <video>
- <track src="captions-webvtt/tc000-empty.vtt" onload="trackLoaded()" default>
- </video>
- </body>
-</html>
+ track.onload = t.step_func_done(function() {
+ assert_equals(track.track.cues.length, 0);
+ });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698