Title: [267719] trunk/LayoutTests
- Revision
- 267719
- Author
- [email protected]
- Date
- 2020-09-28 16:48:47 -0700 (Mon, 28 Sep 2020)
Log Message
Document.p.contains returns true for nodes in shadow tree
https://bugs.webkit.org/show_bug.cgi?id=189164
Reviewed by Darin Adler.
Added a regression after r267220 had fixed this bug.
* fast/shadow-dom/document-contains-returns-false-for-node-inside-shadow-tree-expected.txt: Added.
* fast/shadow-dom/document-contains-returns-false-for-node-inside-shadow-tree.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (267718 => 267719)
--- trunk/LayoutTests/ChangeLog 2020-09-28 23:18:12 UTC (rev 267718)
+++ trunk/LayoutTests/ChangeLog 2020-09-28 23:48:47 UTC (rev 267719)
@@ -1,3 +1,15 @@
+2020-09-28 Ryosuke Niwa <[email protected]>
+
+ Document.p.contains returns true for nodes in shadow tree
+ https://bugs.webkit.org/show_bug.cgi?id=189164
+
+ Reviewed by Darin Adler.
+
+ Added a regression after r267220 had fixed this bug.
+
+ * fast/shadow-dom/document-contains-returns-false-for-node-inside-shadow-tree-expected.txt: Added.
+ * fast/shadow-dom/document-contains-returns-false-for-node-inside-shadow-tree.html: Added.
+
2020-09-28 Fujii Hironori <[email protected]>
[TextureMapper] Enable a depth buffer for preserve-3d
Added: trunk/LayoutTests/fast/shadow-dom/document-contains-returns-false-for-node-inside-shadow-tree-expected.txt (0 => 267719)
--- trunk/LayoutTests/fast/shadow-dom/document-contains-returns-false-for-node-inside-shadow-tree-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/document-contains-returns-false-for-node-inside-shadow-tree-expected.txt 2020-09-28 23:48:47 UTC (rev 267719)
@@ -0,0 +1,21 @@
+Tests for document.contains. It should return false on connected nodes within a shadow root
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS shadowHost.isConnected is false
+PASS shadowRoot.isConnected is false
+PASS shadowRootChild.isConnected is false
+PASS document.contains(shadowHost) is false
+PASS document.contains(shadowRoot) is false
+PASS document.contains(shadowRootChild) is false
+PASS document.body.appendChild(shadowHost); shadowHost.isConnected is true
+PASS shadowRoot.isConnected is true
+PASS shadowRootChild.isConnected is true
+PASS document.contains(shadowHost) is true
+PASS document.contains(shadowRoot) is false
+PASS document.contains(shadowRootChild) is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/shadow-dom/document-contains-returns-false-for-node-inside-shadow-tree.html (0 => 267719)
--- trunk/LayoutTests/fast/shadow-dom/document-contains-returns-false-for-node-inside-shadow-tree.html (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/document-contains-returns-false-for-node-inside-shadow-tree.html 2020-09-28 23:48:47 UTC (rev 267719)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script>
+
+description('Tests for document.contains. It should return false on connected nodes within a shadow root');
+
+const shadowHost = document.createElement("div");
+const shadowRoot = shadowHost.attachShadow({mode: 'closed'});
+const shadowRootChild = shadowRoot.appendChild(document.createElement('div'));
+
+shouldBeFalse('shadowHost.isConnected');
+shouldBeFalse('shadowRoot.isConnected');
+shouldBeFalse('shadowRootChild.isConnected');
+shouldBeFalse('document.contains(shadowHost)');
+shouldBeFalse('document.contains(shadowRoot)');
+shouldBeFalse('document.contains(shadowRootChild)');
+
+shouldBeTrue('document.body.appendChild(shadowHost); shadowHost.isConnected');
+shouldBeTrue('shadowRoot.isConnected');
+shouldBeTrue('shadowRootChild.isConnected');
+shouldBeTrue('document.contains(shadowHost)');
+shouldBeFalse('document.contains(shadowRoot)');
+shouldBeFalse('document.contains(shadowRootChild)');
+
+</script>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes