OLD | NEW |
1 <html> | 1 <html> |
2 <p>This test must not crash.</p> | 2 <p>This test must not crash.</p> |
3 <script> | 3 <script> |
4 if (window.testRunner) | 4 if (window.testRunner) |
5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); |
6 | 6 |
7 function f1() { | 7 function f1() { |
8 document.write('<form>'); //Here we need the form tag to trigger the bug | 8 document.write('<form>'); //Here we need the form tag to trigger the bug |
9 document.getElementsByTagName("s")[0].innerHTML = 'foo'; | 9 document.getElementsByTagName("s")[0].innerHTML = 'foo'; |
10 } | 10 } |
11 | 11 |
12 function f2() { | 12 function f2() { |
13 document.getElementsByTagName("kbd")[0].innerHTML = 'foo'; | 13 try { |
14 document.getElementsByTagName("kbd")[0].insertBefore(document.createElement(
'foo'),document.createElement('foo')); | 14 document.getElementsByTagName("kbd")[0].innerHTML = 'foo'; |
| 15 document.getElementsByTagName("kbd")[0].insertBefore(document.createElem
ent('foo'),document.createElement('foo')); |
| 16 } catch (e) { |
| 17 // We are not interested in exceptions. |
| 18 } |
15 } | 19 } |
16 </script> | 20 </script> |
17 <s> | 21 <s> |
18 <!-- The following weird mark-up is needed to reproduce the crash --> | 22 <!-- The following weird mark-up is needed to reproduce the crash --> |
19 <script>f1();</script> | 23 <script>f1();</script> |
20 <xmp><mark> | 24 <xmp><mark> |
21 <script>f1();</script> | 25 <script>f1();</script> |
22 <xmp></xmp> | 26 <xmp></xmp> |
23 <kbd> | 27 <kbd> |
24 <script>f2();</script> | 28 <script>f2();</script> |
25 </kbd> | 29 </kbd> |
26 </s> | 30 </s> |
27 </html> | 31 </html> |
OLD | NEW |