Index: third_party/WebKit/LayoutTests/media/track/track-load-error-readyState.html |
diff --git a/third_party/WebKit/LayoutTests/media/track/track-load-error-readyState.html b/third_party/WebKit/LayoutTests/media/track/track-load-error-readyState.html |
index 74259da853a8dfc47a5bb9688cdad2b66e4f0bcc..6ad78975f6177dc402ca0c099e47239d33f11dec 100644 |
--- a/third_party/WebKit/LayoutTests/media/track/track-load-error-readyState.html |
+++ b/third_party/WebKit/LayoutTests/media/track/track-load-error-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 trackError() |
- { |
- consoleWrite("EVENT(error)"); |
- track = document.getElementById('testTrackError'); |
- testExpected("track.readyState", HTMLTrackElement.ERROR); |
- endTest(); |
- } |
- |
- </script> |
- </head> |
- <body> |
- <p>Tests the error event on HTMLTrackElement and ERROR readyState on TextTrack.</p> |
- <video id="videotests"> |
- <track id="testTrackError" src="junk" onerror="trackError()" default> |
- </video> |
- </body> |
-</html> |
+<title>Tests the error event on HTMLTrackElement and ERROR readyState on TextTrack.</title> |
+<video> |
+ <track src="junk" 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.onerror = t.step_func_done(function() { |
+ assert_equals(track.readyState, HTMLTrackElement.ERROR); |
+ }); |
+}); |
+</script> |