OLD | NEW |
1 <script> | 1 <script> |
2 onload = function() { | 2 onload = function() { |
3 document.execCommand('selectall'); | 3 document.execCommand('selectall'); |
4 var iframe = document.createElement('iframe'); | 4 var iframe = document.createElement('iframe'); |
5 iframe.onload = startIframe; | 5 iframe.onload = startIframe; |
6 document.documentElement.appendChild(iframe); | 6 document.documentElement.appendChild(iframe); |
7 document.body.textContent = 'PASS; NOT CRASHED'; | 7 setTimeout(function() { |
8 if (window.testRunner) | 8 document.body.textContent = 'PASS; NOT CRASHED'; |
9 testRunner.dumpAsText(); | 9 if (window.testRunner) |
| 10 testRunner.dumpAsText(); |
| 11 }, 0); |
10 }; | 12 }; |
11 | 13 |
12 function startIframe() | 14 function startIframe() |
13 { | 15 { |
14 document.designMode = 'on'; | 16 document.designMode = 'on'; |
15 document.execCommand('justifyfull'); | 17 document.execCommand('justifyfull'); |
16 document.execCommand('insertimage', false, 'x.gif'); | 18 document.execCommand('insertimage', false, 'x.gif'); |
17 document.execCommand('indent'); | 19 document.execCommand('indent'); |
18 document.execCommand('inserthtml', false, '<iframe></iframe>') | 20 document.execCommand('inserthtml', false, '<iframe></iframe>') |
19 document.execCommand('inserthtml', false, '<iframe src="javascript:window.to
p.startIFrame2()"></iframe>'); | 21 document.execCommand('inserthtml', false, '<iframe src="javascript:window.to
p.startIFrame2()"></iframe>'); |
20 } | 22 } |
21 | 23 |
22 var counter = 0; | 24 var counter = 0; |
23 function startIFrame2() | 25 function startIFrame2() |
24 { | 26 { |
25 try { | 27 try { |
26 ++counter; | 28 ++counter; |
27 if (counter >= 22) | 29 if (counter >= 22) |
28 return; | 30 return; |
29 document.execCommand('justifyleft'); | 31 document.execCommand('justifyleft'); |
30 document.execCommand('indent'); | 32 document.execCommand('indent'); |
31 document.execCommand('forwardDelete'); | 33 document.execCommand('forwardDelete'); |
32 } catch (e) { | 34 } catch (e) { |
33 // Catch "Uncaught RangeError: Maximum call stack size exceeded." | 35 // Catch "Uncaught RangeError: Maximum call stack size exceeded." |
34 } | 36 } |
35 } | 37 } |
36 </script> | 38 </script> |
37 <body></body> | 39 <body></body> |
OLD | NEW |