| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../fast/js/resources/js-test-pre.js" type="text/javascript"></sc
ript> | 4 <script src="../../fast/js/resources/js-test-pre.js" type="text/javascript"></sc
ript> |
| 5 <style> | 5 <style> |
| 6 body { | 6 body { |
| 7 font: 20px Ahem; | 7 font: 20px Ahem; |
| 8 } | 8 } |
| 9 </style> | 9 </style> |
| 10 </head> | 10 </head> |
| 11 <body> | 11 <body> |
| 12 <p> Bug <a href="http://webkit.org/b/85793">85793</a>: Caret is not rendered in
empty inline contenteditable elements</p> | 12 <p> Bug <a href="http://webkit.org/b/85793">85793</a>: Caret is not rendered in
empty inline contenteditable elements</p> |
| 13 <p>This test verifies that an empty inline contenteditable element gets a valid
caret rect.</p> | 13 <p>This test verifies that an empty inline contenteditable element gets a valid
caret rect.</p> |
| 14 <span id="testInline" CONTENTEDITABLE></span><br> | 14 <span id="testInline" CONTENTEDITABLE></span><br> |
| 15 <div id="console"></div> | 15 <div id="console"></div> |
| 16 </body> | 16 </body> |
| 17 <script> | 17 <script> |
| 18 var testInline = document.getElementById("testInline"); | 18 var testInline = document.getElementById("testInline"); |
| 19 getSelection().collapse(testInline, 0); | 19 getSelection().collapse(testInline, 0); |
| 20 if (window.internals) { | 20 if (window.internals) { |
| 21 var caretRect = internals.absoluteCaretBounds(); | 21 var caretRect = internals.absoluteCaretBounds(); |
| 22 shouldBe("caretRect.left", "8"); | 22 shouldBe("caretRect.left", "8"); |
| 23 shouldBe("caretRect.top", "160"); | 23 shouldBe("caretRect.top", "160"); |
| 24 shouldBe("caretRect.width", "1"); | 24 shouldBe("caretRect.width", "1"); |
| 25 shouldBe("caretRect.height", "20"); | 25 shouldBe("caretRect.height", "20"); |
| 26 } | 26 } |
| 27 </script> | 27 </script> |
| 28 <script src="../../fast/js/resources/js-test-post.js" type="text/javascript"></s
cript> | |
| 29 </html> | 28 </html> |
| OLD | NEW |