|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=667512 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 667512</title> |
|
8 <script type="application/javascript" src="/MochiKit/packed.js"></script> |
|
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
10 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> |
|
11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
12 </head> |
|
13 <body> |
|
14 <table contenteditable="true"><tbody><tr><td id="b"><br id="a"></td></tr></tbody></table> |
|
15 <span style="display: list-item;direction: rtl;"></span> |
|
16 <script type="application/javascript"> |
|
17 |
|
18 /** Test for Bug 667512 **/ |
|
19 function appendElements() { |
|
20 window.focus(); |
|
21 window.getSelection().collapse(document.documentElement, 0); |
|
22 |
|
23 var x=document.getElementById('a'); |
|
24 x.parentNode.removeChild(x); |
|
25 |
|
26 var x=document.getElementById('b'); |
|
27 x.parentNode.removeChild(x); |
|
28 |
|
29 synthesizeKey("VK_LEFT", {}); |
|
30 synthesizeKey("VK_RIGHT", {}); |
|
31 |
|
32 ok(true, "Should not crash!"); |
|
33 SimpleTest.finish(); |
|
34 } |
|
35 |
|
36 addLoadEvent(appendElements); |
|
37 SimpleTest.waitForExplicitFinish(); |
|
38 |
|
39 </script> |
|
40 </body> |
|
41 </html> |