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

Unified Diff: third_party/WebKit/LayoutTests/media/track/track-insert-after-load-crash.html

Issue 1927223002: Convert track tests from video-test.js to testharness.js based (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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-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 &lt;track&gt; 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>

Powered by Google App Engine
This is Rietveld 408576698