- add third_party src.
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / inserting / insert-empty-html.html
1 <!DOCTYPE html>
2 <html>
3
4 <body>
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>
7
8 <div id="content" contenteditable="true">abcdefghijklmnopqrstuvwxyz</div>
9 <div id="console"></div>
10
11 <script src="../../fast/js/resources/js-test-pre.js"></script>
12 <script>
13
14 if (window.testRunner) {
15     testRunner.dumpAsText();
16
17     var selection = window.getSelection();
18     var div = document.getElementById("content");
19     var text = div.firstChild;
20
21     selection.setPosition(text, 5);
22     document.execCommand('InsertHTML', false, "");
23
24     shouldBe("window.getSelection().baseOffset", "5");
25 }
26
27 </script>
28
29 </body>
30 </html>