Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / inserting / insert-with-javascript-protocol-crash.html
blob09ffa53496a317c334aecd0d5f7fffb87244887c
1 <script>
2 onload = function() {
3 document.execCommand('selectall');
4 var iframe = document.createElement('iframe');
5 iframe.onload = startIframe;
6 document.documentElement.appendChild(iframe);
7 document.body.textContent = 'PASS; NOT CRASHED';
8 if (window.testRunner)
9 testRunner.dumpAsText();
12 function startIframe()
14 document.designMode = 'on';
15 document.execCommand('justifyfull');
16 document.execCommand('insertimage', false, 'x.gif');
17 document.execCommand('indent');
18 document.execCommand('inserthtml', false, '<iframe></iframe>')
19 document.execCommand('inserthtml', false, '<iframe src="javascript:window.top.startIFrame2()"></iframe>');
22 var counter = 0;
23 function startIFrame2()
25 try {
26 ++counter;
27 if (counter >= 22)
28 return;
29 document.execCommand('justifyleft');
30 document.execCommand('indent');
31 document.execCommand('forwardDelete');
32 } catch (e) {
33 // Catch "Uncaught RangeError: Maximum call stack size exceeded."
36 </script>
37 <body></body>