OLD | NEW |
1 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | 1 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
2 <body> | 2 <body> |
3 <script> | 3 <script> |
4 if (window.testRunner) | 4 if (window.testRunner) |
5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); |
6 | 6 |
7 var div = document.createElement('div'); | 7 var div = document.createElement('div'); |
8 div.contentEditable = 'true'; | 8 div.contentEditable = 'true'; |
9 div.innerHTML = "אחת ש<a id='bar'>תיים </a>שלוש"; | 9 div.innerHTML = "אחת ש<a id='bar'>תיים </a>שלוש"; |
10 document.body.appendChild(div); | 10 document.body.appendChild(div); |
11 div.focus(); | 11 div.focus(); |
12 | 12 |
13 var sel = window.getSelection(); | 13 var sel = window.getSelection(); |
14 sel.selectAllChildren(bar); | 14 sel.selectAllChildren(bar); |
15 var range = sel.getRangeAt(0); | 15 var range = sel.getRangeAt(0); |
16 range.insertNode(document.createElement('span')); | 16 range.insertNode(document.createElement('span')); |
17 range.detach(); | |
18 | 17 |
19 // This part can be any number of actions, e.g., clicking anywhere on the page a
lso crashes. | 18 // This part can be any number of actions, e.g., clicking anywhere on the page a
lso crashes. |
20 sel.selectAllChildren(bar); | 19 sel.selectAllChildren(bar); |
21 </script> | 20 </script> |
22 <p>This test passes if it doesn't crash.</p> | 21 <p>This test passes if it doesn't crash.</p> |
23 </body> | 22 </body> |
OLD | NEW |