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

Unified Diff: third_party/WebKit/LayoutTests/media/media-reparent.html

Issue 2114243002: Convert audio*, media* and video* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 6 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/media-reparent.html
diff --git a/third_party/WebKit/LayoutTests/media/media-reparent.html b/third_party/WebKit/LayoutTests/media/media-reparent.html
index 5a42a927bef519f20aba56b4ed8c4f0b5fe7fd76..d27ba1a077238033b1c1ae4bdc8b28df9c5f1057 100644
--- a/third_party/WebKit/LayoutTests/media/media-reparent.html
+++ b/third_party/WebKit/LayoutTests/media/media-reparent.html
@@ -1,17 +1,16 @@
-Test that reparenting a removed media tag doesn't crash the process.
-<!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
- (Please avoid writing new tests using video-test.js) -->
-<script src=video-test.js></script>
+<!DOCTYPE html>
+<title>Test that reparenting a removed media tag doesn't crash the process.</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
<script>
-setTimeout(function(){
- var f = document.createElement('iframe');
- document.documentElement.appendChild(f);
- var w = f.contentWindow;
- var div = w.document.createElement('div');
+async_test(function(t) {
+ var iframe = document.createElement('iframe');
+ document.documentElement.appendChild(iframe);
+ var div = iframe.contentDocument.createElement('div');
div.innerHTML = '<audio src="1">';
var node = div;
- f.parentNode.removeChild(f);
- document.body.appendChild(node);
- endTestLater();
+ iframe.parentNode.removeChild(iframe);
+ document.documentElement.appendChild(node);
+ setTimeout(t.step_func_done(), 100);
})
-</script>
+</script>

Powered by Google App Engine
This is Rietveld 408576698