OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 if (window.testRunner) { | 5 if (window.testRunner) { |
6 testRunner.waitUntilDone(); | 6 testRunner.waitUntilDone(); |
7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
| 8 testRunner.setMockSpellCheckerEnabled(true); |
8 } | 9 } |
9 | 10 |
10 function runTest() { | 11 function runTest() { |
11 var textToSelect = "This text should be selected, but this frame shouldn't b
e focused."; | 12 var textToSelect = "This text should be selected, but this frame shouldn't b
e focused."; |
12 var frame = document.getElementById("frame"); | 13 var frame = document.getElementById("frame"); |
13 var s = frame.contentDocument.getSelection(); | 14 var s = frame.contentDocument.getSelection(); |
14 s.collapse(frame.contentDocument.body, 0); | 15 s.collapse(frame.contentDocument.body, 0); |
15 frame.contentDocument.execCommand("InsertText", false, textToSelect); | 16 frame.contentDocument.execCommand("InsertText", false, textToSelect); |
16 frame.parentNode.removeChild(frame); | 17 frame.parentNode.removeChild(frame); |
17 window.setTimeout(function() { | 18 window.setTimeout(function() { |
18 if (window.testRunner) | 19 if (window.testRunner) |
19 testRunner.notifyDone(); | 20 testRunner.notifyDone(); |
20 }, 50); | 21 }, 50); |
21 } | 22 } |
22 </script> | 23 </script> |
23 </head> | 24 </head> |
24 <body> | 25 <body> |
25 <div>PASS unless crash.</div> | 26 <div>PASS unless crash.</div> |
26 <iframe id="frame" src="../resources/contenteditable-iframe-src.html" onload="ru
nTest();"></iframe> | 27 <iframe id="frame" src="../resources/contenteditable-iframe-src.html" onload="ru
nTest();"></iframe> |
27 </body> | 28 </body> |
28 </html> | 29 </html> |
OLD | NEW |