Missing cursor/caret showing in search field on google.com
[WebKit-https.git] / LayoutTests / editing / selection / range-surroundContents-with-preceding-node.html
1 <!DOCTYPE html>
2 <html>
3   <body>
4     <script src="../../resources/js-test-pre.js"></script>
5     <script>
6         window.onload = function(){
7             var range = document.createRange();
8             var rootNode = document.getElementById("root");
9             range.setStart(rootNode, 4);
10             range.setEnd(rootNode, 6);
11             var parentElement = document.getElementById("targetForSurround");
12             range.surroundContents(parentElement);
13
14             shouldBe(range.startContainer.id, rootNode.id);
15             shouldBe(range.startOffset.toString(), "3");
16             shouldBe(range.endContainer.id, rootNode.id);
17             shouldBe(range.startOffset.toString(), "3");
18         };
19     </script>
20     <script src="../../resources/js-test-post.js"></script>
21     <div id="root">
22       <div id="targetForSurround"></div>
23       <div id="description">Test that there is no crash when surroundContents is called with a node preceding the current selection.</div>
24       <div id="trailingNode"></div>
25     </div>
26   </body>
27 </html>