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

Unified Diff: third_party/WebKit/LayoutTests/media/track/track-load-from-element-readyState.html

Issue 1934913002: Convert track-load* 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-load-from-element-readyState.html
diff --git a/third_party/WebKit/LayoutTests/media/track/track-load-from-element-readyState.html b/third_party/WebKit/LayoutTests/media/track/track-load-from-element-readyState.html
index 988c090b075af42f1b4e28c085f97f97a02f0bbd..a0a863424c74ecda45b3f90b7c7c84bd55498846 100644
--- a/third_party/WebKit/LayoutTests/media/track/track-load-from-element-readyState.html
+++ b/third_party/WebKit/LayoutTests/media/track/track-load-from-element-readyState.html
@@ -1,28 +1,15 @@
<!DOCTYPE html>
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <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()
- {
- consoleWrite("EVENT(load)");
- track = document.getElementById('testTrackSrc');
- testExpected("track.readyState", HTMLTrackElement.LOADED);
- endTest();
- }
-
- </script>
- </head>
- <body>
- <p>Tests the load event on HTMLTrackElement and LOADED readyState on TextTrack when src is set on the element.</p>
- <video>
- <track id="testTrackSrc" src="captions-webvtt/tc004-webvtt-file.vtt" onload="trackLoaded()" default>
- </video>
- </body>
-</html>
+<title>Tests the load event on HTMLTrackElement and LOADED readyState on TextTrack when src is set on the element.</title>
+<video>
+ <track src="captions-webvtt/tc004-webvtt-file.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");
+ track.onload = t.step_func_done(function() {
+ assert_equals(track.readyState, HTMLTrackElement.LOADED);
+ });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698