blob: 1858b49ad2d983064bcd50eafe1228365aaa8749 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/ahem.js"></script>
<script src="../../resources/js-test.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>
</html>