Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / caret-after-removing-node.html
bloba70d184170b5a72e351b56a8a422c1b26373aad0
1 <body>
2 <div id="content">
3 <p id="description"></p>
4 Manual Steps:
5 <ol>
6 <li>Click "click me" in blue box below.</li>
7 <li>See caret in blue box.
8 </ol>
9 <div id="sample" contenteditable="true" style="border: solid 1px blue">click me</div>
10 </div>
11 <script src="../../resources/js-test.js"></script>
12 <script>
13 description("Caret position after removing node");
15 function $(id) { return document.getElementById(id); }
17 var sample = $('sample');
19 sample.addEventListener('focus', function() {
20 this.innerHTML = '';
21 });
23 if (window.eventSender) {
24 eventSender.mouseMoveTo(sample.offsetLeft + 5, sample.offsetTop + 5);
25 eventSender.mouseDown(0);
26 shouldBeEqualToString('getSelection().type', 'Caret');
27 shouldBe('getSelection().focusNode', 'sample');
28 shouldBe('getSelection().focusOffset', '0');
29 $('content').outerHTML = '';
31 </script>
32 </body>