Chromium Code Reviews| 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..58f1e935c785637e077b3e48c6e872fd4ec87eb0 100644 |
| --- a/third_party/WebKit/LayoutTests/media/media-reparent.html |
| +++ b/third_party/WebKit/LayoutTests/media/media-reparent.html |
| @@ -1,17 +1,18 @@ |
| -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> |
| +<body></body> |
| <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 contentWindow = iframe.contentWindow; |
| + var div = contentWindow.document.createElement('div'); |
|
fs
2016/07/02 18:33:45
Use iframe.contentDocument?
Srirama
2016/07/03 04:31:34
Done.
|
| div.innerHTML = '<audio src="1">'; |
| var node = div; |
| - f.parentNode.removeChild(f); |
| + iframe.parentNode.removeChild(iframe); |
| document.body.appendChild(node); |
| - endTestLater(); |
| + setTimeout(t.step_func_done(), 100); |
| }) |
| -</script> |
| +</script> |