| OLD | NEW |
| (Empty) |
| 1 <script src="../../resources/run-after-layout-and-paint.js" type="text/javascrip
t"></script> | |
| 2 <script type="text/javascript"> | |
| 3 | |
| 4 function step1() { | |
| 5 if (window.testRunner) | |
| 6 window.testRunner.waitUntilDone(); | |
| 7 // Wait for the frame to load. | |
| 8 window.setTimeout(step2, 100); | |
| 9 } | |
| 10 | |
| 11 function step2() { | |
| 12 var frame = frames[0]; | |
| 13 var doc = frame.document; | |
| 14 var body = doc.body; | |
| 15 var sel = frame.getSelection(); | |
| 16 frame.focus(); | |
| 17 sel.collapse(body, 0); | |
| 18 doc.execCommand("InsertText", false, "You should not see a caret in this tex
t."); | |
| 19 var text = body.firstChild; | |
| 20 sel.collapse(text, text.length); | |
| 21 // Wait for the caret to paint. | |
| 22 runAfterLayoutAndPaint(repaintTest); | |
| 23 } | |
| 24 | |
| 25 function repaintTest() { | |
| 26 var frame = frames[0]; | |
| 27 var doc = frame.document; | |
| 28 var body = doc.body; | |
| 29 var text = body.firstChild; | |
| 30 var sel = frame.getSelection(); | |
| 31 sel.setBaseAndExtent(text, 5, text, text.length); | |
| 32 if (window.testRunner) | |
| 33 window.testRunner.notifyDone(); | |
| 34 } | |
| 35 </script> | |
| 36 | |
| 37 <body onload="step1();"> | |
| 38 <iframe src="resources/contenteditable-iframe-src.html"></iframe> | |
| 39 </body> | |
| OLD | NEW |