OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Crash issue 344280</title> | 4 <title>Issue 344280</title> |
5 <script src="../../resources/js-test.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
6 </head> | 6 </head> |
7 | |
8 <body> | 7 <body> |
9 <script> | 8 <script> |
10 description('Should not crash if we load a test case from crbug.com/3442
80.'); | 9 description('Should not crash if we load a test case from crbug.com/3442
80.'); |
| 10 |
11 window.jsTestIsAsync = true; | 11 window.jsTestIsAsync = true; |
12 | 12 |
13 document.addEventListener("DOMContentLoaded", function () { | 13 window.addEventListener('message', didReceiveMessage, false); |
14 document.execCommand("SelectAll", false); | |
15 window.getSelection().deleteFromDocument(); | |
16 }, true); | |
17 | 14 |
18 var count = 0; | 15 var iframe = document.createElement('iframe'); |
19 document.addEventListener("DOMSubtreeModified", function () { | 16 iframe.src = 'resources/insert-ordered-list-crash-iframe.html'; |
20 count++; | 17 document.body.appendChild(iframe); |
21 if (count < 3) { | 18 |
22 var src = event.srcElement; | 19 function didReceiveMessage(event) { |
23 src.contentEditable = "true"; | 20 shouldBeEqualToString('event.data', 'FINISH'); |
24 src.innerHTML = '<div></div>'; | 21 document.body.removeChild(iframe); |
25 document.execCommand('InsertOrderedList', false, false); | 22 testPassed('Did not crash.'); |
26 } else if (count == 3) { | 23 window.finishJSTest(); |
27 window.finishJSTest(); | 24 } |
28 } | |
29 }, false); | |
30 </script> | 25 </script> |
31 <h5> | |
32 aa | |
33 <textarea></textarea> | |
34 </h5> | |
35 <dl> | |
36 aa | |
37 </dl> | |
38 </body> | 26 </body> |
39 </html> | 27 </html> |
OLD | NEW |