Missing cursor/caret showing in search field on google.com
[WebKit-https.git] / LayoutTests / editing / selection / DOMSelection-DocumentType.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test-pre.js"></script>
5 <script src="resources/js-test-selection-shared.js"></script>
6 </head>
7 <body>
8 <p id="description"></p>
9 <div id="console"></div>
10 <script>
11 description("Test to check if setBaseAndExtent guard node with null owner document (Bug 31680)");
12
13 var sel = window.getSelection();
14 var docType = document.implementation.createDocumentType('c', '', '');
15
16 sel.setBaseAndExtent(docType, 0, docType, 0);
17 shouldBeNull("sel.anchorNode");
18
19 sel.setBaseAndExtent(docType, 0, docType, 0);
20 shouldBeNull("sel.anchorNode");
21
22 sel.collapse(docType);
23 shouldBeNull("sel.anchorNode");
24
25 sel.selectAllChildren(docType);
26 shouldBeNull("sel.anchorNode");
27
28 sel.extend(docType, 0);
29 shouldBeNull("sel.anchorNode");
30
31 sel.containsNode(docType);
32 shouldBeNull("sel.anchorNode");
33
34 shouldBeFalse("sel.containsNode(docType)");
35
36 var successfullyParsed = true;
37 </script>
38 <script src="../../resources/js-test-post.js"></script>
39 </body>
40 </html>