Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / caret-in-empty-inline-2.html
blob9c91ebfb2cd185f962408998f9ba0e4fa9b6a83c
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/ahem.js"></script>
5 <script src="../../resources/js-test.js" type="text/javascript"></script>
6 <style>
7 body {
8 font: 20px Ahem;
10 </style>
11 </head>
12 <body>
13 <p> Bug <a href="http://webkit.org/b/85793">85793</a>: Caret is not rendered in empty inline contenteditable elements</p>
14 <p>This test verifies that an empty inline contenteditable element, placed after
15 another inline element, gets a valid caret rect.</p>
16 <span>Previous span</span><span id="testInline" CONTENTEDITABLE></span><br>
17 <div id="console"></div>
18 </body>
19 <script>
20 var testInline = document.getElementById("testInline");
21 getSelection().collapse(testInline, 0);
22 if (window.internals) {
23 var caretRect = internals.absoluteCaretBounds();
24 shouldBe("caretRect.left", "268");
25 shouldBe("caretRect.top", "180");
26 shouldBe("caretRect.width", "1");
27 shouldBe("caretRect.height", "20");
29 </script>
30 </html>