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> |