OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 #div1, #div2 { |
| 6 height: 200px; |
| 7 width: 200px; |
| 8 border: 1px solid black; |
| 9 } |
| 10 #div2 { |
| 11 text-align: center; |
| 12 } |
| 13 div:before { |
| 14 content: "Test"; |
| 15 } |
| 16 </style> |
| 17 <div id="div1" contenteditable="true"></div> |
| 18 <div id="div2" contenteditable="true"></div> |
| 19 <script> |
| 20 test (function() { |
| 21 var div1 = document.getElementById('div1'); |
| 22 div1.focus(); |
| 23 var caretRect1 = internals.absoluteCaretBounds(document); |
| 24 |
| 25 var div2 = document.getElementById('div2'); |
| 26 div2.focus(); |
| 27 var caretRect2 = internals.absoluteCaretBounds(document); |
| 28 |
| 29 assert_not_equals(caretRect1.left, caretRect2.left); |
| 30 }, "Tests if the cursor respects text align property in emtpy div having pseudo
content"); |
| 31 </script> |
OLD | NEW |