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