[CSS Container Queries] Import WPT tests
[WebKit-https.git] / LayoutTests / editing / inserting / before-after-input-element.html
1 <script>
2 if (window.testRunner)
3     testRunner.dumpEditingCallbacks();
4 </script>
5 <p>This tests text insertion before/after an input element.</p>
6 <div id="div" contenteditable="true"><input type="text"></div>
7
8 <script>
9 var div = document.getElementById("div");
10 var sel = window.getSelection();
11 sel.setPosition(div, 0);
12
13 document.execCommand("InsertText", false, "Hello");
14 sel.setPosition(div, div.childNodes.length);
15
16 document.execCommand("InsertText", false, "World");
17 </script>