5 <p>This test ensures inserting empty string does not move the caret.
</p>
6 <p>The caret is placed at
5th pos and the empty html is added. The test passes if the caret is positioned at the same position after the execution insertion command.
</p>
8 <div id=
"content" contenteditable=
"true">abcdefghijklmnopqrstuvwxyz
</div>
9 <div id=
"console"></div>
11 <script src=
"../../resources/js-test.js"></script>
14 if (window
.testRunner
) {
15 testRunner
.dumpAsText();
17 var selection
= window
.getSelection();
18 var div
= document
.getElementById("content");
19 var text
= div
.firstChild
;
21 selection
.collapse(text
, 5);
22 document
.execCommand('InsertHTML', false, "");
24 shouldBe("window.getSelection().baseOffset", "5");