| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js" type="text/javascript"></script> |
| <style> |
| body { |
| font: 20px Ahem; |
| } |
| </style> |
| </head> |
| <body> |
| <p> Bug <a href="http://webkit.org/b/85793">85793</a>: Caret is not rendered in empty inline contenteditable elements</p> |
| <p>This test verifies that an empty inline contenteditable element gets a valid caret rect.</p> |
| <span id="testInline" CONTENTEDITABLE></span><br> |
| <div id="console"></div> |
| </body> |
| <script> |
| var testInline = document.getElementById("testInline"); |
| getSelection().collapse(testInline, 0); |
| if (window.internals) { |
| var caretRect = internals.absoluteCaretBounds(); |
| shouldBe("caretRect.left", "8"); |
| shouldBe("caretRect.top", "160"); |
| shouldBe("caretRect.width", "1"); |
| shouldBe("caretRect.height", "20"); |
| } |
| </script> |
| <script src="../../resources/js-test-post.js" type="text/javascript"></script> |
| </html> |