Index: third_party/WebKit/LayoutTests/media/track/track-insert-after-load-crash.html |
diff --git a/third_party/WebKit/LayoutTests/media/track/track-insert-after-load-crash.html b/third_party/WebKit/LayoutTests/media/track/track-insert-after-load-crash.html |
index 7d0e92eff62bc87874e652ce6a6ecd1f972581fe..7e2e95ff3f42a5cec16e9c432eea41d9d5eec9c5 100644 |
--- a/third_party/WebKit/LayoutTests/media/track/track-insert-after-load-crash.html |
+++ b/third_party/WebKit/LayoutTests/media/track/track-insert-after-load-crash.html |
@@ -1,20 +1,14 @@ |
<!DOCTYPE html> |
-<html> |
- <head> |
- <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> |
- </head> |
- <body> |
- <p>Tests that inserting a <track> element immediately after a load() doesn't crash.</p> |
- <video id="v"></video> |
- <script> |
- var v = document.querySelector('#v'); |
- v.src = findMediaFile('video', '../content/test'); |
- v.load(); |
- v.appendChild(document.createElement('track')); |
- v.addEventListener('loadedmetadata', endTest); |
- </script> |
- </body> |
-</html> |
+<title>Tests that inserting a track element immediately after a load() doesn't crash.</title> |
+<script src="../media-file.js"></script> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script> |
+async_test(function(t) { |
+ var video = document.createElement('video'); |
+ video.src = findMediaFile('video', '../content/test'); |
+ video.load(); |
+ video.appendChild(document.createElement('track')); |
+ video.onloadedmetadata = t.step_func_done(); |
+}); |
+</script> |