Index: LayoutTests/fast/frames/detach-frame-from-child-detach-no-crash.html |
diff --git a/LayoutTests/fast/frames/detach-frame-from-child-detach-no-crash.html b/LayoutTests/fast/frames/detach-frame-from-child-detach-no-crash.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..98f8b3243cc00231fe5a36b1c773a6c8ded9581e |
--- /dev/null |
+++ b/LayoutTests/fast/frames/detach-frame-from-child-detach-no-crash.html |
@@ -0,0 +1,29 @@ |
+<!DOCTYPE html> |
+<html> |
+<script src="../../resources/js-test.js"></script> |
+<div id="a"></div> |
+<div id="b"><iframe id="f"></iframe></div> |
+<script> |
+description("Allow nested frame detaches from subframe without crashing."); |
+ |
+self.jsTestIsAsync = true; |
+if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+} |
+ |
+var iframe = f.contentDocument; |
+iframe.open(); |
+function moveDivBIntoDivA() { |
+ try { |
+ a.appendChild(b); |
+ iframe.open(); |
+ } catch(e) { |
+ finishJSTest(); |
+ } |
+} |
+ |
+iframe.addEventListener('readystatechange', moveDivBIntoDivA); |
+moveDivBIntoDivA(); |
+</script> |
+</html> |