Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(520)

Unified Diff: LayoutTests/editing/inserting/insert-with-javascript-protocol-crash.html

Issue 64103002: Make "InsertHTML" and "Indent" commands to handle DOM tree modification during processing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-11-08T13:02:58 Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/editing/inserting/insert-with-javascript-protocol-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/inserting/insert-with-javascript-protocol-crash.html
diff --git a/LayoutTests/editing/inserting/insert-with-javascript-protocol-crash.html b/LayoutTests/editing/inserting/insert-with-javascript-protocol-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..6e256a6461a0af7f643987f0f2fa1c28409c9dbf
--- /dev/null
+++ b/LayoutTests/editing/inserting/insert-with-javascript-protocol-crash.html
@@ -0,0 +1,37 @@
+<script>
+onload = function() {
+ document.execCommand('selectall');
+ var iframe = document.createElement('iframe');
+ iframe.onload = startIframe;
+ document.documentElement.appendChild(iframe);
+ document.body.textContent = 'PASS; NOT CRASHED';
+ if (window.testRunner)
+ testRunner.dumpAsText();
+};
+
+function startIframe()
+{
+ document.designMode = 'on';
+ document.execCommand('justifyfull');
+ document.execCommand('insertimage', false, 'x.gif');
+ document.execCommand('indent');
+ document.execCommand('inserthtml', false, '<iframe></iframe>')
+ document.execCommand('inserthtml', false, '<iframe src="javascript:window.top.startIFrame2()"></iframe>');
+}
+
+var counter = 0;
+function startIFrame2()
+{
+ try {
+ ++counter;
+ if (counter >= 22)
+ return;
+ document.execCommand('justifyleft');
+ document.execCommand('indent');
+ document.execCommand('forwardDelete');
+ } catch (e) {
+ // Catch "Uncaught RangeError: Maximum call stack size exceeded."
+ }
+}
+</script>
+<body></body>
« no previous file with comments | « no previous file | LayoutTests/editing/inserting/insert-with-javascript-protocol-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698