Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / selection / 5825350-2.html
1 <div id="description">This tests for a bug where moving the caret right towards a non-editable pocket of an editable region would make the caret disappear. The caret should be just after the 'y' in "Sally".</div>
2 <div id="edit" contenteditable="true"><span contenteditable="false">Bob</span> ; <span contenteditable="false">Sally</span></div>
3
4 <script>
5 if (window.testRunner)
6     window.testRunner.dumpAsText();
7
8 edit = document.getElementById("edit");
9 text = edit.childNodes[1];
10 s = window.getSelection();
11 s.collapse(text, text.length);
12 s.modify("move", "right", "character");
13 if (window.testRunner) {
14     var caretRect = textInputController.firstRectForCharacterRange(textInputController.selectedRange()[0], 0);
15     document.body.innerText = document.getElementById("description").innerText + "\n\nCaret: (" + caretRect[0] + ", " + caretRect[1] + ")";
16 }
17 </script>