Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Document / CaretRangeFromPoint / caretRangeFromPoint-in-user-select-none.html
blob7d3f77684d4aba3d3f7a86cb75da07cfd2c6f238
1 <div id="container">
2 Before <span id="sample" style="font-family: monospace; -webkit-user-select:none">Test</span> After
3 </div>
4 <script src="../../../../resources/js-test.js"></script>
5 <script>
6 function $(id) { return document.getElementById(id); }
8 var range = document.caretRangeFromPoint($('sample').offsetLeft + $('sample').offsetWidth / 2, $('sample').offsetTop + 3);
9 shouldBe('range.startContainer', '$("sample").firstChild');
10 shouldBe('range.startOffset', '2');
11 shouldBeTrue('range.collapsed');
13 if (window.testRunner)
14 $('container').outerHTML = '';
15 </script>