Chromium Code Reviews| Index: LayoutTests/fast/loader/javascript-detached-frame-no-crash.html |
| diff --git a/LayoutTests/fast/loader/javascript-detached-frame-no-crash.html b/LayoutTests/fast/loader/javascript-detached-frame-no-crash.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cfce12b4b2fb98680679c22aea61b60ec77ea67d |
| --- /dev/null |
| +++ b/LayoutTests/fast/loader/javascript-detached-frame-no-crash.html |
| @@ -0,0 +1,20 @@ |
| +<!DOCTYPE html> |
| +<script src="../../resources/js-test.js"></script> |
|
Mike West
2015/05/22 16:53:29
Tiny, tiny nit: Use testharness.js next time. Then
|
| +<script> |
| +description("Navigating to a javascript: URL from a document having html imports should not crash."); |
| +self.jsTestIsAsync = true; |
| +if (window.testRunner) { |
| + testRunner.dumpAsText(); |
| + testRunner.waitUntilDone(); |
| +} |
| + |
| +var iframeLoadCount = 0; |
| +function runTest() { |
| + // Both the initial load and completion of the javascript: navigation will trigger a 'load'. |
| + if (++iframeLoadCount == 2) { |
| + testPassed("no crash."); |
| + setTimeout(finishJSTest, 0); |
| + } |
| +} |
| +</script> |
| +<iframe onload="runTest();" src="resources/javascript-detached-frame-iframe.html"></iframe> |