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