Index: LayoutTests/fast/dom/Range/surroundContents-iframe-crash.html |
diff --git a/LayoutTests/fast/dom/Range/surroundContents-iframe-crash.html b/LayoutTests/fast/dom/Range/surroundContents-iframe-crash.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..84a1218605686883594f54f7ac7d2aca1de27379 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/Range/surroundContents-iframe-crash.html |
@@ -0,0 +1,26 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script> |
+if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+var inSurroundContents = false; |
+document.addEventListener('load', function() { |
+ var iframe = document.querySelector('iframe'); |
+ if (inSurroundContents) { |
+ var newText = iframe.nextSibling; |
+ newText.parentNode.removeChild(newText); |
+ return; |
+ } |
+ var range = document.createRange(); |
+ range.setStart(document.body.firstChild, 2); |
+ inSurroundContents = true; |
+ range.surroundContents(iframe); |
+ inSurroundContents = false; |
+ document.body.textContent = 'PASS if Blink doesn\'t crash.'; |
+}, true); |
+</script> |
+</head> |
+<body>abcde<iframe></iframe></body> |
+</html> |