blob: 5074f023244631c5e65624b901498c24921584a1 [file] [log] [blame]
<!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, placed after
another inline element, gets a valid caret rect.</p>
<span>Previous span</span><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", "268");
shouldBe("caretRect.top", "180");
shouldBe("caretRect.width", "1");
shouldBe("caretRect.height", "20");
}
</script>
<script src="../../resources/js-test-post.js" type="text/javascript"></script>
</html>