Index: LayoutTests/editing/undo/crash-redo-with-iframes.html |
diff --git a/LayoutTests/editing/undo/crash-redo-with-iframes.html b/LayoutTests/editing/undo/crash-redo-with-iframes.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ab6f7fd4d10241f58ce2824d36f0a49f7253c0cf |
--- /dev/null |
+++ b/LayoutTests/editing/undo/crash-redo-with-iframes.html |
@@ -0,0 +1,42 @@ |
+<!DOCTYPE html> |
+<body> |
+PASS if Blink doesn't crash. |
+<div id="container"> |
+<div id="sample" contenteditable="true"></div> |
+</div> |
+</body> |
+<script> |
+if (window.testRunner) |
+ testRunner.dumpAsText(); |
+var container = document.getElementById('container'); |
+var iframe0 = document.createElement('iframe'); |
+container.appendChild(iframe0); |
+var sample = document.getElementById('sample'); |
+var iframe1 = document.createElement('iframe'); |
+document.documentElement.appendChild(iframe1); |
+ |
+var iframe2 = document.createElement('iframe'); |
+var documentElement0 = iframe0.contentDocument.documentElement; |
+sample.appendChild(documentElement0); |
+documentElement0.appendChild(iframe2); |
+window.getSelection().selectAllChildren(iframe2); |
+ |
+var iframe3 = document.createElement('iframe'); |
+sample.appendChild(iframe3); |
+ |
+document.execCommand('SelectAll'); |
+document.execCommand('CreateLink', false, 'foobar'); |
+iframe1.contentWindow.document.write('0123456789'); |
+document.execCommand('Undo'); |
+ |
+var iframe4 = document.createElement('iframe'); |
+iframe3.appendChild(iframe4); |
+iframe1.contentDocument.documentElement.appendChild(iframe3); |
+ |
+var document4 = iframe4.ownerDocument; |
+document4.execCommand('Redo'); |
+document4.execCommand('InsertOrderedList'); |
+ |
+container.outerHTML = ''; |
+</script> |
+</html> |