OLD | NEW |
1 <div style="position: absolute; top: 40px; left: 40px; width: 140px; font-famil
y: ahem; font-size: 20px; direction: rtl;">12345 abcde</div> | 1 <div style="position: absolute; top: 40px; left: 40px; width: 140px; font-famil
y: Ahem; font-size: 20px; direction: rtl;">12345 abcde</div> |
2 <div id="result">FAIL: Test did not run</div> | 2 <div id="result">FAIL: Test did not run</div> |
3 <script> | 3 <script> |
4 if (window.testRunner) | 4 if (window.testRunner) |
5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); |
6 | 6 |
7 var offset = document.caretRangeFromPoint(125, 50).startOffset; | 7 var offset = document.caretRangeFromPoint(125, 50).startOffset; |
8 document.getElementById("result").innerText = offset === 2 ? "PASS" : "FAIL:
Hit offset " + offset; | 8 document.getElementById("result").innerText = offset === 2 ? "PASS" : "FAIL:
Hit offset " + offset; |
9 </script> | 9 </script> |
OLD | NEW |