Title: [235881] trunk/LayoutTests
Revision
235881
Author
[email protected]
Date
2018-09-10 20:59:41 -0700 (Mon, 10 Sep 2018)

Log Message

Update shadow DOM and custom elements tests
https://bugs.webkit.org/show_bug.cgi?id=189494

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Re-imported WPT tests for shadow DOM and custom elements.

* resources/import-expectations.json:
* web-platform-tests/custom-elements/range-and-constructors-expected.txt: Added.
* web-platform-tests/custom-elements/range-and-constructors.html: Added.
* web-platform-tests/custom-elements/w3c-import.log:
* web-platform-tests/shadow-dom/Document-prototype-currentScript-expected.txt:
* web-platform-tests/shadow-dom/Document-prototype-currentScript.html:
* web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint-expected.txt: Added.
* web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html: Added.
* web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element-expected.txt: Added.
* web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element.html: Added.
* web-platform-tests/shadow-dom/Element-interface-attachShadow-expected.txt:
* web-platform-tests/shadow-dom/Element-interface-attachShadow.html:
* web-platform-tests/shadow-dom/Extensions-to-Event-Interface-expected.txt:
* web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html:
* web-platform-tests/shadow-dom/OWNERS: Removed.
* web-platform-tests/shadow-dom/directionality-001.tentative-expected.html: Added.
* web-platform-tests/shadow-dom/directionality-001.tentative.html: Added.
* web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation-expected.txt: Added.
* web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation.html: Added.
* web-platform-tests/shadow-dom/form-control-form-attribute-expected.txt: Added.
* web-platform-tests/shadow-dom/form-control-form-attribute.html: Added.
* web-platform-tests/shadow-dom/getElementById-dynamic-001-expected.txt: Added.
* web-platform-tests/shadow-dom/getElementById-dynamic-001.html: Added.
* web-platform-tests/shadow-dom/input-element-list-expected.txt: Added.
* web-platform-tests/shadow-dom/input-element-list.html: Added.
* web-platform-tests/shadow-dom/layout-slot-no-longer-assigned-expected.html: Added.
* web-platform-tests/shadow-dom/layout-slot-no-longer-assigned.html: Added.
* web-platform-tests/shadow-dom/layout-slot-no-longer-fallback-expected.html: Added.
* web-platform-tests/shadow-dom/layout-slot-no-longer-fallback.html: Added.
* web-platform-tests/shadow-dom/leaktests/get-elements-expected.txt:
* web-platform-tests/shadow-dom/leaktests/get-elements.html:
* web-platform-tests/shadow-dom/leaktests/w3c-import.log:
* web-platform-tests/shadow-dom/resources/event-path-test-helpers.js:
(dispatchEventWithEventLog):
* web-platform-tests/shadow-dom/resources/shadow-dom-utils.js:
* web-platform-tests/shadow-dom/resources/w3c-import.log:
* web-platform-tests/shadow-dom/w3c-import.log:

LayoutTests:

Skip the test hitting a debug assertion until the bug 189493 is fixed.

* TestExpectations:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (235880 => 235881)


--- trunk/LayoutTests/ChangeLog	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/ChangeLog	2018-09-11 03:59:41 UTC (rev 235881)
@@ -1,3 +1,14 @@
+2018-09-10  Ryosuke Niwa  <[email protected]>
+
+        Update shadow DOM and custom elements tests
+        https://bugs.webkit.org/show_bug.cgi?id=189494
+
+        Reviewed by Youenn Fablet.
+
+        Skip the test hitting a debug assertion until the bug 189493 is fixed.
+
+        * TestExpectations:
+
 2018-09-10  Truitt Savell  <[email protected]>
 
         Rebaseline test after https://trac.webkit.org/changeset/235866/webkit.

Modified: trunk/LayoutTests/TestExpectations (235880 => 235881)


--- trunk/LayoutTests/TestExpectations	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/TestExpectations	2018-09-11 03:59:41 UTC (rev 235881)
@@ -2237,6 +2237,8 @@
 
 webkit.org/b/185308 legacy-animation-engine/animations/combo-transform-translate+scale.html [ Pass Failure ]
 
+webkit.org/b/189493 [ Debug ] imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html [ Skip ]
+
 fast/gradients/conic-repeating.html [ Skip ]
 fast/gradients/conic.html [ Skip ]
 fast/gradients/conic-off-center.html [ Skip ]

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2018-09-11 03:59:41 UTC (rev 235881)
@@ -1,5 +1,52 @@
 2018-09-10  Ryosuke Niwa  <[email protected]>
 
+        Update shadow DOM and custom elements tests
+        https://bugs.webkit.org/show_bug.cgi?id=189494
+
+        Reviewed by Youenn Fablet.
+
+        Re-imported WPT tests for shadow DOM and custom elements.
+
+        * resources/import-expectations.json:
+        * web-platform-tests/custom-elements/range-and-constructors-expected.txt: Added.
+        * web-platform-tests/custom-elements/range-and-constructors.html: Added.
+        * web-platform-tests/custom-elements/w3c-import.log:
+        * web-platform-tests/shadow-dom/Document-prototype-currentScript-expected.txt:
+        * web-platform-tests/shadow-dom/Document-prototype-currentScript.html:
+        * web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint-expected.txt: Added.
+        * web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html: Added.
+        * web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element-expected.txt: Added.
+        * web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element.html: Added.
+        * web-platform-tests/shadow-dom/Element-interface-attachShadow-expected.txt:
+        * web-platform-tests/shadow-dom/Element-interface-attachShadow.html:
+        * web-platform-tests/shadow-dom/Extensions-to-Event-Interface-expected.txt:
+        * web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html:
+        * web-platform-tests/shadow-dom/OWNERS: Removed.
+        * web-platform-tests/shadow-dom/directionality-001.tentative-expected.html: Added.
+        * web-platform-tests/shadow-dom/directionality-001.tentative.html: Added.
+        * web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation-expected.txt: Added.
+        * web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation.html: Added.
+        * web-platform-tests/shadow-dom/form-control-form-attribute-expected.txt: Added.
+        * web-platform-tests/shadow-dom/form-control-form-attribute.html: Added.
+        * web-platform-tests/shadow-dom/getElementById-dynamic-001-expected.txt: Added.
+        * web-platform-tests/shadow-dom/getElementById-dynamic-001.html: Added.
+        * web-platform-tests/shadow-dom/input-element-list-expected.txt: Added.
+        * web-platform-tests/shadow-dom/input-element-list.html: Added.
+        * web-platform-tests/shadow-dom/layout-slot-no-longer-assigned-expected.html: Added.
+        * web-platform-tests/shadow-dom/layout-slot-no-longer-assigned.html: Added.
+        * web-platform-tests/shadow-dom/layout-slot-no-longer-fallback-expected.html: Added.
+        * web-platform-tests/shadow-dom/layout-slot-no-longer-fallback.html: Added.
+        * web-platform-tests/shadow-dom/leaktests/get-elements-expected.txt:
+        * web-platform-tests/shadow-dom/leaktests/get-elements.html:
+        * web-platform-tests/shadow-dom/leaktests/w3c-import.log:
+        * web-platform-tests/shadow-dom/resources/event-path-test-helpers.js:
+        (dispatchEventWithEventLog):
+        * web-platform-tests/shadow-dom/resources/shadow-dom-utils.js:
+        * web-platform-tests/shadow-dom/resources/w3c-import.log:
+        * web-platform-tests/shadow-dom/w3c-import.log:
+
+2018-09-10  Ryosuke Niwa  <[email protected]>
+
         Revert the errornous change to the test in r235864.
 
         * web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html: Replaced with LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html.

Modified: trunk/LayoutTests/imported/w3c/resources/import-expectations.json (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/resources/import-expectations.json	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/resources/import-expectations.json	2018-09-11 03:59:41 UTC (rev 235881)
@@ -1,5 +1,7 @@
 {
     "css/geometry": "import", 
+    "custom-elements": "import", 
+    "shadow-dom": "import", 
     "tools": "import", 
     "web-platform-tests/2dcontext": "skip", 
     "web-platform-tests/2dcontext/imagebitmap": "import", 

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/range-and-constructors-expected.txt (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/range-and-constructors-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/range-and-constructors-expected.txt	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,4 @@
+
+FAIL Range.cloneContents should invoke constructor in tree order assert_array_equals: property 0, expected "root-0" but got "root-0-0"
+FAIL Range.extractContents should invoke constructor in tree order assert_array_equals: property 0, expected "root-0" but got "root-0-0"
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/range-and-constructors.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/range-and-constructors.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/range-and-constructors.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Custom elements: Range APIs should invoke constructor in tree order</title>
+<meta name="author" title="Edgar Chen" href=""
+<link rel="help" href=""
+<link rel="help" href=""
+<line rel="help" href=""
+<line rel="help" href=""
+<script src=""
+<script src=""
+</head>
+<body>
+<div id="log"></div>
+
+<c-e data-index="root">
+  <c-e data-index="root-0">
+    <c-e data-index="root-0-0">
+      <c-e data-index="root-0-0-0"></c-e>
+      <span id="start"></span>
+    </c-e>
+  </c-e>
+  <c-e data-index="root-1"></c-e>
+  <span id="end"></span>
+</c-e>
+
+<script>
+
+var logs = [];
+class CE extends HTMLElement {
+  constructor() {
+    super();
+    logs.push(this.dataset.index);
+  }
+}
+customElements.define('c-e', CE);
+
+function getRange() {
+  const range = new Range();
+  range.setStart(document.getElementById('start'), 0);
+  range.setEnd(document.getElementById('end'), 0);
+  return range;
+}
+
+test(function () {
+  // Clear log for testing.
+  logs = [];
+  getRange().cloneContents();
+  assert_array_equals(logs, ['root-0', 'root-0-0', 'root-1']);
+}, 'Range.cloneContents should invoke constructor in tree order');
+
+test(function () {
+  // Clear log for testing.
+  logs = [];
+  getRange().extractContents();
+  assert_array_equals(logs, ['root-0', 'root-0-0']);
+}, 'Range.extractContents should invoke constructor in tree order');
+
+</script>
+</body>
+</html>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/w3c-import.log (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/w3c-import.log	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/w3c-import.log	2018-09-11 03:59:41 UTC (rev 235881)
@@ -30,5 +30,6 @@
 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/historical.html
 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/microtasks-and-constructors.html
 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined.html
+/LayoutTests/imported/w3c/web-platform-tests/custom-elements/range-and-constructors.html
 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reaction-timing.html
 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading.html

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Document-prototype-currentScript-expected.txt (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Document-prototype-currentScript-expected.txt	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Document-prototype-currentScript-expected.txt	2018-09-11 03:59:41 UTC (rev 235881)
@@ -1,10 +1,8 @@
 
-Harness Error (FAIL), message = 1 duplicate test name: "document.currentScript must be set to a script element that loads an external script in a document tree"
-
 PASS document.currentScript must not to be set to a script element in a shadow tree in open mode 
 PASS document.currentScript must not to be set to a script element in a shadow tree in closed mode 
 PASS document.currentScript must be set to a script element that loads an external script in a document tree 
-PASS document.currentScript must be set to a script element that loads an external script in a document tree 
+PASS document.currentScript must be set to a script element that loads an external script in a document tree (2) 
 PASS document.currentScript must not be set to a script element that loads an external script in an open shadow tree 
 PASS document.currentScript must not be set to a script element that loads an external script in a closed shadow tree 
 PASS document.currentScript must be set to a script element that loads an external script that was in an open shadow tree and then removed 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Document-prototype-currentScript.html (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Document-prototype-currentScript.html	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Document-prototype-currentScript.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
+<meta charset=utf-8>
 <title>HTML: Document.prototype.currentScript</title>
 <meta name="author" title="Ryosuke Niwa" href=""
 <meta name="assert" content="If the script element is in a document, then set the script element's node document's currentScript attribute to the script element.">
@@ -12,11 +13,16 @@
 <div id="log"></div>
 <script id="outerScriptElement">
 
+function assert_shadowdom_supported() {
+  assert_true('attachShadow' in document.createElement('div'), 'Shadow DOM is not supported');
+}
+
 var outerScriptElement = document.currentScript;
 
 function testInlineScript(mode)
 {
     test(function () {
+        assert_shadowdom_supported();
         var host = document.createElement('div');
         var shadowRoot = host.attachShadow({mode: mode});
         var scriptElement = document.createElement('script');
@@ -40,11 +46,16 @@
 function executeNextTest()
 {
     var testCase = asyncScriptTests.shift();
-    var mode = testCase.mode;
     if (!testCase)
         return;
 
+    var mode = testCase.mode;
+
+    testCase.test.add_cleanup(() => {
+        setTimeout(executeNextTest, 1);
+    });
     testCase.test.step(function () {
+        assert_shadowdom_supported();
         testedScriptElement = document.createElement('script');
         testedScriptElement.src = '';
 
@@ -66,7 +77,6 @@
             assert_equals(document.currentScript, testCase.expected());
         });
         testCase.test.done();
-        setTimeout(executeNextTest, 1);
     }
 }
 
@@ -75,7 +85,7 @@
         test: async_test('document.currentScript must be set to a script element that loads an external script in a document tree'),
         mode: null, remove: false, expected: function () { return testedScriptElement; }},
     {
-        test: async_test('document.currentScript must be set to a script element that loads an external script in a document tree'),
+        test: async_test('document.currentScript must be set to a script element that loads an external script in a document tree (2)'),
         mode: null, remove: true, expected: function () { return testedScriptElement; }},
     {
         test: async_test('document.currentScript must not be set to a script element that loads an external script in an open shadow tree'),

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint-expected.txt (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint-expected.txt	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,42 @@
+
+PASS document.elementFromPoint and shadow.ElementFromPoint must return the shadow host of the hit-tested text node when the hit-tested text node is a direct child of the root and the host has display: inline 
+PASS document.elementFromPoint and shadow.ElementFromPoint must return the shadow host of the hit-tested text node when the hit-tested text node is a direct child of the root and the host has display: block 
+PASS document.elementFromPoint and shadow.ElementFromPoint must return the shadow host of the hit-tested text node when the hit-tested text node is a direct child of the root and the host has display: inline-block 
+FAIL document.elementFromPoint and shadowRoot.elementFromPoint must return the shadow host when the hit-tested text node is assigned to a slot and the host has display: inline assert_equals: expected Element node <test-element style="display: inline;">text</test-element> but got Element node <slot></slot>
+FAIL document.elementFromPoint and shadowRoot.elementFromPoint must return the shadow host when the hit-tested text node is assigned to a slot and the host has display: block assert_equals: expected Element node <test-element style="display: block;">text</test-element> but got Element node <slot></slot>
+FAIL document.elementFromPoint and shadowRoot.elementFromPoint must return the shadow host when the hit-tested text node is assigned to a slot and the host has display: inline-block assert_equals: expected Element node <test-element style="display: inline-block;">text</test-e... but got Element node <slot></slot>
+PASS document.elementFromPoint and shadowRoot.elementFromPoint must return the element assigned to a slot when hit-tested text node under an element is assigned to a slot in the shadow tree and the shadow host of the slot has display: inline 
+PASS document.elementFromPoint and shadowRoot.elementFromPoint must return the element assigned to a slot when hit-tested text node under an element is assigned to a slot in the shadow tree and the shadow host of the slot has display: block 
+PASS document.elementFromPoint and shadowRoot.elementFromPoint must return the element assigned to a slot when hit-tested text node under an element is assigned to a slot in the shadow tree and the shadow host of the slot has display: inline-block 
+PASS document.elementFromPoint must return the shadow host of the hit-tested element under a shadow root and shadowRoot.elementFromPoint must return the element parent of the hit-tested text node under the point when the shadow host has display: inline 
+PASS document.elementFromPoint must return the shadow host of the hit-tested element under a shadow root and shadowRoot.elementFromPoint must return the element parent of the hit-tested text node under the point when the shadow host has display: block 
+PASS document.elementFromPoint must return the shadow host of the hit-tested element under a shadow root and shadowRoot.elementFromPoint must return the element parent of the hit-tested text node under the point when the shadow host has display: inline-block 
+PASS document.elementFromPoint must return the shadow host and shadowRoot.elementFromPoint must return the slot parent of the fallback text when the hit-tested text node is a fallback content and the host has display: inline 
+PASS document.elementFromPoint must return the shadow host and shadowRoot.elementFromPoint must return the slot parent of the fallback text when the hit-tested text node is a fallback content and the host has display: block 
+PASS document.elementFromPoint must return the shadow host and shadowRoot.elementFromPoint must return the slot parent of the fallback text when the hit-tested text node is a fallback content and the host has display: inline-block 
+FAIL document.elementFromPoint, shadowRoot.elementFromPoint, innerShadow.elementFromPoint must return a child element assigned to a slot when the hit-tested text node is assigned to a slot in the shadow tree of the child element and the outer shadow host has display: inline assert_equals: expected Element node <inner-host>hello</inner-host> but got Element node <slot></slot>
+FAIL document.elementFromPoint, shadowRoot.elementFromPoint, innerShadow.elementFromPoint must return a child element assigned to a slot when the hit-tested text node is assigned to a slot in the shadow tree of the child element and the outer shadow host has display: block assert_equals: expected Element node <inner-host>hello</inner-host> but got Element node <slot></slot>
+FAIL document.elementFromPoint, shadowRoot.elementFromPoint, innerShadow.elementFromPoint must return a child element assigned to a slot when the hit-tested text node is assigned to a slot in the shadow tree of the child element and the outer shadow host has display: inline-block assert_equals: expected Element node <inner-host>hello</inner-host> but got Element node <slot></slot>
+PASS document.elementFromPoint, shadowRoot.elementFromPoint, innerShadow.elementFromPoint must return a child element with its own shadow tree assigned to a slot when the hit-tested text node is its direct child and the outer shadow host has display: inline 
+PASS document.elementFromPoint, shadowRoot.elementFromPoint, innerShadow.elementFromPoint must return a child element with its own shadow tree assigned to a slot when the hit-tested text node is its direct child and the outer shadow host has display: block 
+PASS document.elementFromPoint, shadowRoot.elementFromPoint, innerShadow.elementFromPoint must return a child element with its own shadow tree assigned to a slot when the hit-tested text node is its direct child and the outer shadow host has display: inline-block 
+PASS document.elementFromPoint, shadowRoot.elementFromPoint must return a child element with its own shadow tree assigned to a slot when the hit-tested text node is a child of another element and innerShadow.elementFromPoint must return the parent element of the hit-tested text node under it when the outer shadow host has display: inline 
+PASS document.elementFromPoint, shadowRoot.elementFromPoint must return a child element with its own shadow tree assigned to a slot when the hit-tested text node is a child of another element and innerShadow.elementFromPoint must return the parent element of the hit-tested text node under it when the outer shadow host has display: block 
+PASS document.elementFromPoint, shadowRoot.elementFromPoint must return a child element with its own shadow tree assigned to a slot when the hit-tested text node is a child of another element and innerShadow.elementFromPoint must return the parent element of the hit-tested text node under it when the outer shadow host has display: inline-block 
+PASS document.elementsFromPoint and shadow.elementsFromPoint must return the shadow host and its ancestors of the hit-tested text node when the hit-tested text node is a direct child of the root and the host has display: inline 
+PASS document.elementsFromPoint and shadow.elementsFromPoint must return the shadow host and its ancestors of the hit-tested text node when the hit-tested text node is a direct child of the root and the host has display: block 
+PASS document.elementsFromPoint and shadow.elementsFromPoint must return the shadow host and its ancestors of the hit-tested text node when the hit-tested text node is a direct child of the root and the host has display: inline-block 
+FAIL document.elementsFromPoint and shadowRoot.elementsFromPoint must return the shadow host and its ancestors when the hit-tested text node is assigned to a slot and the host has display: inline assert_array_equals: property 0, expected Element node <test-element style="display: inline;">text</test-element> but got Element node <slot></slot>
+FAIL document.elementsFromPoint and shadowRoot.elementsFromPoint must return the shadow host and its ancestors when the hit-tested text node is assigned to a slot and the host has display: block assert_array_equals: lengths differ, expected 4 got 5
+FAIL document.elementsFromPoint and shadowRoot.elementsFromPoint must return the shadow host and its ancestors when the hit-tested text node is assigned to a slot and the host has display: inline-block assert_array_equals: lengths differ, expected 4 got 5
+PASS document.elementsFromPoint and shadowRoot.elementsFromPoint must return the element assigned to a slot and its non-shadow ancestors when hit-tested text node under an element is assigned to a slot in the shadow tree and the shadow host of the slot has display: inline 
+PASS document.elementsFromPoint and shadowRoot.elementsFromPoint must return the element assigned to a slot and its non-shadow ancestors when hit-tested text node under an element is assigned to a slot in the shadow tree and the shadow host of the slot has display: block 
+PASS document.elementsFromPoint and shadowRoot.elementsFromPoint must return the element assigned to a slot and its non-shadow ancestors when hit-tested text node under an element is assigned to a slot in the shadow tree and the shadow host of the slot has display: inline-block 
+FAIL document.elementsFromPoint must return the shadow host and its ancestors of the hit-tested element under a shadow root andshadowRoot.elementsFromPoint must return the element parent and its non-shadow ancestors of the hit-tested text node under the point when the shadow host has display: inline assert_array_equals: lengths differ, expected 5 got 4
+PASS document.elementsFromPoint must return the shadow host and its ancestors of the hit-tested element under a shadow root andshadowRoot.elementsFromPoint must return the element parent and its non-shadow ancestors of the hit-tested text node under the point when the shadow host has display: block 
+PASS document.elementsFromPoint must return the shadow host and its ancestors of the hit-tested element under a shadow root andshadowRoot.elementsFromPoint must return the element parent and its non-shadow ancestors of the hit-tested text node under the point when the shadow host has display: inline-block 
+PASS document.elementsFromPoint must return the shadow host and its ancestors and shadowRoot.elementsFromPoint must return the slot parent of the fallback text and its non-shadow ancestors when the hit-tested text node is a fallback content and the host has display: inline 
+PASS document.elementsFromPoint must return the shadow host and its ancestors and shadowRoot.elementsFromPoint must return the slot parent of the fallback text and its non-shadow ancestors when the hit-tested text node is a fallback content and the host has display: block 
+PASS document.elementsFromPoint must return the shadow host and its ancestors and shadowRoot.elementsFromPoint must return the slot parent of the fallback text and its non-shadow ancestors when the hit-tested text node is a fallback content and the host has display: inline-block 
+FAIL shadowRoot.elementsFromPoint must behave the same with document.elementsFromPoint regarding HTML element assert_array_equals: lengths differ, expected 5 got 4
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,256 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Shadow DOM and CSSOM View: Document.prototype.elementFromPoint</title>
+    <meta name="author" title="Ryosuke Niwa" href=""
+    <meta name="assert" content="DocumentOrShadowRoot must have elementFromPoint and must return retarget the result against the context object.">
+    <link rel="help" href=""
+    <link rel="help" href=""
+    <script src=""
+    <script src=""
+  </head>
+  <body>
+    <div id="container"></div>
+    <style>
+test-element { display: block; width: 100px; height: 100px; }
+    </style>
+    <script>
+
+function pointInElement(node) {
+  let x = 5;
+  let y = 5;
+  do {
+    x += node.offsetLeft;
+    y += node.offsetTop;
+    node = node.offsetParent;
+  } while (node);
+  return [x, y];
+}
+
+const displayValues = ['inline', 'block', 'inline-block'];
+var container = document.getElementById('container');
+customElements.define('test-element', class extends HTMLElement {
+  constructor() {
+    super();
+  }
+});
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = 'hello';
+    container.appendChild(host);
+    assert_equals(document.elementFromPoint(...pointInElement(host)), host);
+    assert_equals(shadow.elementFromPoint(...pointInElement(host)), host);
+  }, 'document.elementFromPoint and shadow.ElementFromPoint must return the shadow host of the hit-tested text node when the hit-tested text node is a direct child of the root and the host has display: ' + displayValue);
+});
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = '<slot></slot>';
+    host.innerHTML = 'text';
+    container.appendChild(host);
+    assert_equals(document.elementFromPoint(...pointInElement(host)), host);
+    assert_equals(shadow.elementFromPoint(...pointInElement(host)), host);
+  }, 'document.elementFromPoint and shadowRoot.elementFromPoint must return the shadow host when the hit-tested text node is assigned to a slot and the host has display: ' + displayValue);
+});
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = '<slot></slot>';
+    host.innerHTML = '<span>text</span>';
+    container.appendChild(host);
+    assert_equals(document.elementFromPoint(...pointInElement(host)), host.querySelector('span'));
+    assert_equals(shadow.elementFromPoint(...pointInElement(host)), host.querySelector('span'));
+  }, 'document.elementFromPoint and shadowRoot.elementFromPoint must return the element assigned to a slot when hit-tested text node under an element is assigned to a slot in the shadow tree and the shadow host of the slot has display: ' + displayValue);
+});
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = '<span>text</span>';
+    container.appendChild(host);
+    assert_equals(document.elementFromPoint(...pointInElement(host)), host);
+    assert_equals(shadow.elementFromPoint(...pointInElement(host)), shadow.querySelector('span'));
+  }, 'document.elementFromPoint must return the shadow host of the hit-tested element under a shadow root and shadowRoot.elementFromPoint must return the element parent of the hit-tested text node under the point when the shadow host has display: ' + displayValue);
+});
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = '<slot>fallback</slot>';
+    container.appendChild(host);
+    assert_equals(document.elementFromPoint(...pointInElement(host)), host);
+    assert_equals(shadow.elementFromPoint(...pointInElement(host)), shadow.querySelector('slot'));
+  }, 'document.elementFromPoint must return the shadow host and shadowRoot.elementFromPoint must return the slot parent of the fallback text when the hit-tested text node is a fallback content and the host has display: ' + displayValue);
+});
+
+
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = '<slot></slot>';
+    host.innerHTML = '<inner-host>hello</inner-host>';
+    container.appendChild(host);
+
+    let innerHost = host.querySelector('inner-host');
+    let innerShadow = innerHost.attachShadow({mode: 'closed'});
+    innerShadow.innerHTML = '<slot></slot>';
+    assert_equals(document.elementFromPoint(...pointInElement(host)), innerHost);
+    assert_equals(shadow.elementFromPoint(...pointInElement(host)), innerHost);
+    assert_equals(innerShadow.elementFromPoint(...pointInElement(host)), innerHost);
+  }, 'document.elementFromPoint, shadowRoot.elementFromPoint, innerShadow.elementFromPoint must return a child element assigned to a slot'
+  + ' when the hit-tested text node is assigned to a slot in the shadow tree of the child element and the outer shadow host has display: ' + displayValue);
+});
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = '<slot></slot>';
+    host.innerHTML = '<inner-host></inner-host>';
+    container.appendChild(host);
+
+    let innerHost = host.querySelector('inner-host');
+    let innerShadow = innerHost.attachShadow({mode: 'closed'});
+    innerShadow.innerHTML = 'hello';
+    assert_equals(document.elementFromPoint(...pointInElement(host)), innerHost);
+    assert_equals(shadow.elementFromPoint(...pointInElement(host)), innerHost);
+    assert_equals(innerShadow.elementFromPoint(...pointInElement(host)), innerHost);
+  }, 'document.elementFromPoint, shadowRoot.elementFromPoint, innerShadow.elementFromPoint must return a child element with its own shadow tree assigned to a slot'
+  + ' when the hit-tested text node is its direct child and the outer shadow host has display: ' + displayValue);
+});
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = '<slot></slot>';
+    host.innerHTML = '<inner-host></inner-host>';
+    container.appendChild(host);
+
+    let innerHost = host.querySelector('inner-host');
+    let innerShadow = innerHost.attachShadow({mode: 'closed'});
+    innerShadow.innerHTML = '<span>hello</span>';
+
+    assert_equals(document.elementFromPoint(...pointInElement(host)), innerHost);
+    assert_equals(shadow.elementFromPoint(...pointInElement(host)), innerHost);
+    assert_equals(innerShadow.elementFromPoint(...pointInElement(host)), innerShadow.querySelector('span'));
+  }, 'document.elementFromPoint, shadowRoot.elementFromPoint must return a child element with its own shadow tree assigned to a slot'
+  + ' when the hit-tested text node is a child of another element and innerShadow.elementFromPoint must return the parent element of the hit-tested text node under it when the outer shadow host has display: ' + displayValue);
+});
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = 'hello';
+    container.appendChild(host);
+    assert_array_equals(document.elementsFromPoint(...pointInElement(host)), [host, container, document.body, document.documentElement]);
+    assert_array_equals(shadow.elementsFromPoint(...pointInElement(host)), [host, container, document.body, document.documentElement]);
+  }, 'document.elementsFromPoint and shadow.elementsFromPoint must return the shadow host and its ancestors of the hit-tested text node when the hit-tested text node is a direct child of the root and the host has display: ' + displayValue);
+});
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = '<slot></slot>';
+    host.innerHTML = 'text';
+    container.appendChild(host);
+    assert_array_equals(document.elementsFromPoint(...pointInElement(host)), [host, container, document.body, document.documentElement]);
+    assert_array_equals(shadow.elementsFromPoint(...pointInElement(host)), [host, container, document.body, document.documentElement]);
+  },'document.elementsFromPoint and shadowRoot.elementsFromPoint must return the shadow host and its ancestors when the hit-tested text node is assigned to a slot and the host has display: ' + displayValue);
+});
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = '<div><slot></slot></div>';
+    host.innerHTML = '<span>text</span>';
+    container.appendChild(host);
+    assert_array_equals(document.elementsFromPoint(...pointInElement(host)), [host.querySelector('span'), host, container, document.body, document.documentElement]);
+    assert_array_equals(shadow.elementsFromPoint(...pointInElement(host)), [host.querySelector('span'), shadow.querySelector('div'),  host, container, document.body, document.documentElement]);
+  }, 'document.elementsFromPoint and shadowRoot.elementsFromPoint must return the element assigned to a slot and its non-shadow ancestors when hit-tested text node under an element is assigned to a slot in the shadow tree and the shadow host of the slot has display: ' + displayValue);
+});
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = '<span>text</span>';
+    container.appendChild(host);
+    assert_array_equals(document.elementsFromPoint(...pointInElement(host)), [host, container, document.body, document.documentElement]);
+    assert_array_equals(shadow.elementsFromPoint(...pointInElement(host)), [shadow.querySelector('span'), host, container, document.body, document.documentElement]);
+  }, 'document.elementsFromPoint must return the shadow host and its ancestors of the hit-tested element under a shadow root and'
+  + 'shadowRoot.elementsFromPoint must return the element parent and its non-shadow ancestors of the hit-tested text node under the point when the shadow host has display: ' + displayValue);
+});
+
+displayValues.forEach(function (displayValue) {
+  test(function () {
+    container.innerHTML = '';
+    let host = document.createElement('test-element');
+    host.style.display = displayValue;
+    let shadow = host.attachShadow({mode: 'closed'});
+    shadow.innerHTML = '<div><slot>fallback</slot></div>';
+    container.appendChild(host);
+    assert_array_equals(document.elementsFromPoint(...pointInElement(host)), [host, container, document.body, document.documentElement]);
+    assert_array_equals(shadow.elementsFromPoint(...pointInElement(host)), [shadow.querySelector('slot'), shadow.querySelector('div'), host, container, document.body, document.documentElement]);
+  }, 'document.elementsFromPoint must return the shadow host and its ancestors and shadowRoot.elementsFromPoint must return the slot parent of the fallback text and its non-shadow ancestors when the hit-tested text node is a fallback content and the host has display: ' + displayValue);
+});
+
+test(function () {
+  container.innerHTML = '';
+  let host = document.createElement('test-element');
+  host.style.display = 'block';
+  let shadow = host.attachShadow({mode: 'closed'});
+  shadow.innerHTML = '<div style="margin: 2px;">not hit</div>';
+  let aboveHost = document.createElement("div");
+  aboveHost.appendChild(host);
+  container.appendChild(aboveHost);
+  document.documentElement.style = 'background-attachment: scroll; height: 2px;';
+  let boundingRect = host.getBoundingClientRect();
+  assert_array_equals(document.elementsFromPoint(boundingRect.x, boundingRect.y), [host, aboveHost, container, document.body, document.documentElement]);
+  assert_array_equals(shadow.elementsFromPoint(boundingRect.x, boundingRect.y), [host, aboveHost, container, document.body, document.documentElement]);
+}, 'shadowRoot.elementsFromPoint must behave the same with document.elementsFromPoint regarding HTML element');
+
+container.innerHTML = '';
+
+    </script>
+  </body>
+</html>
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element-expected.txt (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element-expected.txt	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,4 @@
+
+PASS Element.attachShadow must create an instance of ShadowRoot for autonomous custom elements 
+PASS Element.attachShadow must throw a NotSupportedError for customized built-in elements 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Shadow DOM: Attaching a ShadowRoot for custom elements</title>
+<meta name="author" title="Hayato Ito" href=""
+<link rel="help" href=""
+<script src=""
+<script src=""
+<script>
+class MyAutonomousCustomElement extends HTMLElement {
+}
+
+customElements.define('my-custom', MyAutonomousCustomElement);
+
+test(() => {
+  assert_true(document.createElement('my-custom').attachShadow({mode: "open"}) instanceof ShadowRoot);
+}, 'Element.attachShadow must create an instance of ShadowRoot for autonomous custom elements');
+
+class MyCustomizedBuiltinElement extends HTMLInputElement {
+}
+
+customElements.define('my-input', MyCustomizedBuiltinElement, { extends: 'input' });
+
+test(() => {
+  assert_throws({'name': 'NotSupportedError'}, () => {
+    document.createElement('input', {is: 'my-input'}).attachShadow({mode: "open"});
+  });
+}, 'Element.attachShadow must throw a NotSupportedError for customized built-in elements');
+</script>
+</body>
+</html>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow-expected.txt (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow-expected.txt	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow-expected.txt	2018-09-11 03:59:41 UTC (rev 235881)
@@ -4,5 +4,5 @@
 PASS Element.attachShadow must throw a TypeError if mode is not "open" or "closed" 
 PASS Element.attachShadow must create an instance of ShadowRoot 
 PASS Element.attachShadow must throw a InvalidStateError if the context object already hosts a shadow tree 
-PASS Element.attachShadow must throw a NotSupportedError for button, details, input, marquee, meter, progress, select, textarea, and keygen elements 
+PASS Element.attachShadow must throw a NotSupportedError for non-safelisted elements 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow.html (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow.html	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -7,6 +7,7 @@
 <link rel="help" href=""
 <script src=""
 <script src=""
+<script src=""
 </head>
 <body>
 <div id="log"></div>
@@ -78,7 +79,7 @@
 }, 'Element.attachShadow must throw a InvalidStateError if the context object already hosts a shadow tree');
 
 test(function () {
-    for (var elementName of ['button', 'details', 'input', 'marquee', 'meter', 'progress', 'select', 'textarea', 'keygen']) {
+    for (var elementName of ATTACHSHADOW_DISALLOWED_ELEMENTS) {
         assert_throws({'name': 'NotSupportedError'}, function () {
             document.createElement(elementName).attachShadow({mode: "open"});
         }, 'Calling attachShadow({mode: "open"}) on ' + elementName + ' element must throw');
@@ -87,7 +88,7 @@
             document.createElement(elementName).attachShadow({mode: "closed"});
         }, 'Calling attachShadow({mode: "closed"}) on ' + elementName + ' element must throw');
     }
-}, 'Element.attachShadow must throw a NotSupportedError for button, details, input, marquee, meter, progress, select, textarea, and keygen elements');
+}, 'Element.attachShadow must throw a NotSupportedError for non-safelisted elements');
 
 </script>
 </body>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Extensions-to-Event-Interface-expected.txt (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Extensions-to-Event-Interface-expected.txt	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Extensions-to-Event-Interface-expected.txt	2018-09-11 03:59:41 UTC (rev 235881)
@@ -1,20 +1,18 @@
 
-PASS composedPath() must exist on Event 
 PASS composedPath() must return an empty array when the event has not been dispatched 
 PASS composedPath() must return an empty array when the event is no longer dispatched 
-PASS composed must exist on Event 
 PASS composed on EventInit must default to false 
 PASS composed on EventInit must set the composed flag 
-FAIL The event must propagate out of open mode shadow boundaries when the composed flag is set assert_array_equals: value is 5, expected array
-FAIL The event must propagate out of closed mode shadow boundaries when the composed flag is set assert_array_equals: value is 5, expected array
-FAIL The event must not propagate out of open mode shadow boundaries when the composed flag is unset assert_array_equals: value is 2, expected array
-FAIL The event must not propagate out of closed mode shadow boundaries when the composed flag is unset assert_array_equals: value is 2, expected array
-FAIL The event must not propagate out of open mode shadow boundaries when the composed flag is unset on an event with relatedTarget assert_array_equals: value is 2, expected array
-FAIL The event must not propagate out of closed mode shadow boundaries when the composed flag is unset on an event with relatedTarget assert_array_equals: value is 2, expected array
-FAIL The event must not propagate out of open mode shadow tree of the target but must propagate out of inner shadow trees when the scoped flag is set assert_array_equals: value is 5, expected array
-FAIL The event must not propagate out of closed mode shadow tree of the target but must propagate out of inner shadow trees when the scoped flag is set assert_array_equals: value is 5, expected array
-FAIL The event must propagate out of open mode shadow tree in which the relative target and the relative related target are the same assert_array_equals: value is 4, expected array
-FAIL The event must propagate out of closed mode shadow tree in which the relative target and the relative related target are the same assert_array_equals: value is 4, expected array
-FAIL composedPath() must contain and only contain the unclosed nodes of target in open mode shadow trees assert_array_equals: value is 9, expected array
-FAIL composedPath() must contain and only contain the unclosed nodes of target in closed mode shadow trees assert_array_equals: value is 9, expected array
+PASS The event must propagate out of open mode shadow boundaries when the composed flag is set 
+PASS The event must propagate out of closed mode shadow boundaries when the composed flag is set 
+PASS The event must not propagate out of open mode shadow boundaries when the composed flag is unset 
+PASS The event must not propagate out of closed mode shadow boundaries when the composed flag is unset 
+PASS The event must not propagate out of open mode shadow boundaries when the composed flag is unset on an event with relatedTarget 
+PASS The event must not propagate out of closed mode shadow boundaries when the composed flag is unset on an event with relatedTarget 
+PASS The event must not propagate out of open mode shadow tree of the target but must propagate out of inner shadow trees when the scoped flag is set 
+PASS The event must not propagate out of closed mode shadow tree of the target but must propagate out of inner shadow trees when the scoped flag is set 
+PASS The event must propagate out of open mode shadow tree in which the relative target and the relative related target are the same 
+PASS The event must propagate out of closed mode shadow tree in which the relative target and the relative related target are the same 
+PASS composedPath() must contain and only contain the unclosed nodes of target in open mode shadow trees 
+PASS composedPath() must contain and only contain the unclosed nodes of target in closed mode shadow trees 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -14,11 +14,6 @@
 <script>
 
 test(function () {
-    assert_true('composedPath' in Event.prototype);
-    assert_true('composedPath' in new Event('my-event'));
-}, 'composedPath() must exist on Event');
-
-test(function () {
     var event = new Event('my-event');
     assert_array_equals(event.composedPath(), []);
 }, 'composedPath() must return an empty array when the event has not been dispatched');
@@ -30,11 +25,6 @@
 }, 'composedPath() must return an empty array when the event is no longer dispatched');
 
 test(function () {
-    assert_true('composed' in Event.prototype);
-    assert_true('composed' in new Event('my-event'));
-}, 'composed must exist on Event');
-
-test(function () {
     var event = new Event('my-event');
     assert_false(event.composed);
 }, 'composed on EventInit must default to false');
@@ -64,7 +54,7 @@
 
         var expectedPath = ['A1a', 'A1-SR', 'A1', 'A-SR', 'A'];
         assert_array_equals(log.eventPath, expectedPath);
-        assert_array_equals(log.eventPath.length, log.pathAtTargets.length);
+        assert_equals(log.eventPath.length, log.pathAtTargets.length);
         assert_array_equals(log.pathAtTargets[0], expectedPath);
         assert_array_equals(log.pathAtTargets[1], expectedPath);
         assert_array_equals(log.pathAtTargets[2], mode == 'open' ? expectedPath : ['A1', 'A-SR', 'A'],
@@ -92,7 +82,7 @@
 
         var expectedPath = ['A1a', 'A1-SR'];
         assert_array_equals(log.eventPath, expectedPath);
-        assert_array_equals(log.eventPath.length, log.pathAtTargets.length);
+        assert_equals(log.eventPath.length, log.pathAtTargets.length);
         assert_array_equals(log.pathAtTargets[0], expectedPath);
         assert_array_equals(log.pathAtTargets[1], expectedPath);
     }, 'The event must not propagate out of ' + mode + ' mode shadow boundaries when the composed flag is unset');
@@ -118,7 +108,7 @@
 
         var expectedPath = ['A1a', 'A1-SR'];
         assert_array_equals(log.eventPath, expectedPath);
-        assert_array_equals(log.eventPath.length, log.pathAtTargets.length);
+        assert_equals(log.eventPath.length, log.pathAtTargets.length);
         assert_array_equals(log.pathAtTargets[0], expectedPath);
         assert_array_equals(log.pathAtTargets[1], expectedPath);
         assert_array_equals(log.relatedTargets, ['A2-S', 'A2-S']);
@@ -146,7 +136,7 @@
         var expectedPath = ['B1a', 'B1c-S', 'B1-SR', 'B1', 'B-SR'];
         var pathExposedToB1a = ['B1a', 'B1', 'B-SR'];
         assert_array_equals(log.eventPath, expectedPath);
-        assert_array_equals(log.eventPath.length, log.pathAtTargets.length);
+        assert_equals(log.eventPath.length, log.pathAtTargets.length);
         assert_array_equals(log.pathAtTargets[0], mode == 'open' ? expectedPath : pathExposedToB1a);
         assert_array_equals(log.pathAtTargets[1], expectedPath);
         assert_array_equals(log.pathAtTargets[2], expectedPath);
@@ -177,7 +167,7 @@
         var expectedPath = ['A1a', 'A1-SR', 'A1', 'A-SR'];
         var pathExposedToA1 = ['A1', 'A-SR'];
         assert_array_equals(log.eventPath, expectedPath);
-        assert_array_equals(log.eventPath.length, log.pathAtTargets.length);
+        assert_equals(log.eventPath.length, log.pathAtTargets.length);
         assert_array_equals(log.pathAtTargets[0], expectedPath);
         assert_array_equals(log.pathAtTargets[1], expectedPath);
         assert_array_equals(log.pathAtTargets[2], mode == 'open' ? expectedPath : pathExposedToA1);
@@ -212,7 +202,7 @@
         var pathExposedToA1 =       [                                       'B', 'A2-S', 'A-SR', 'A'];
 
         assert_array_equals(log.eventPath, expectedPath);
-        assert_array_equals(log.eventPath.length, log.pathAtTargets.length);
+        assert_equals(log.eventPath.length, log.pathAtTargets.length);
         assert_array_equals(log.pathAtTargets[0], mode == 'open' ? expectedPath : pathExposedToB1a);
         assert_array_equals(log.pathAtTargets[1], mode == 'open' ? expectedPath : pathExposedToB1cS);
         assert_array_equals(log.pathAtTargets[2], mode == 'open' ? expectedPath : pathExposedToB1cS);

Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/OWNERS (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/OWNERS	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/OWNERS	2018-09-11 03:59:41 UTC (rev 235881)
@@ -1,4 +0,0 @@
-@kojiishi
-@rniwa
-@takayoshikochi
-@hayatoito

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/directionality-001.tentative-expected.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/directionality-001.tentative-expected.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/directionality-001.tentative-expected.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,6 @@
+<!doctype html>
+<title>CSS Test Reference</title>
+<link rel="author" href="" title="Emilio Cobos Álvarez">
+<div dir="rtl"> 123 456 <span><span> 789 101112 </span></span></div>
+<div dir="rtl"> 123 456 <span dir="ltr"><span> 789 101112 </span></span></div>
+<div dir="rtl"> 123 456 <span><span> 789 101112 </span></span></div>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/directionality-001.tentative.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/directionality-001.tentative.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/directionality-001.tentative.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,19 @@
+<!doctype html>
+<title>Test: directionality propagation in Shadow DOM.</title>
+<link rel="author" href="" title="Emilio Cobos Álvarez">
+<link rel="help" href=""
+<link rel="help" href=""
+<link rel="match" href=""
+<div id="host0" dir="rtl"><span> 789 101112 </span></div>
+<div id="host1" dir="rtl"><span> 789 101112 </span></div>
+<div id="host2" dir="rtl"><span> 789 101112 </span></div>
+<script>
+  host0.attachShadow({mode: 'closed'}).innerHTML =
+    '<div> 123 456 <span><slot></slot></span></div>';
+
+  host1.attachShadow({mode: 'closed'}).innerHTML =
+    '<div> 123 456 <span dir="ltr"><slot></slot></span></div>';
+
+  host2.attachShadow({mode: 'closed'}).innerHTML =
+    '<div> 123 456 <span><slot dir="ltr"></slot></span></div>';
+</script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation-expected.txt (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation-expected.txt	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,4 @@
+
+FAIL Event.composedPath() should return the same result even if DOM is mutated (1/2) assert_array_equals: lengths differ, expected 3 got 2
+FAIL Event.composedPath() should return the same result even if DOM is mutated (2/2) assert_array_equals: lengths differ, expected 5 got 2
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<title>Shadow DOM: Event.composedPath() should return the same result even if DOM is mutated</title>
+<meta name="author" title="Hayato Ito" href=""
+<script src=""
+<script src=""
+<script src=""
+
+<div id="test1">
+  <div id="host">
+    <template id="sr" data-mode="closed">
+      <div id="target"></div>
+    </template>
+  </div>
+</div>
+
+<script>
+async_test((t) => {
+  const n = createTestTree(document.querySelector('#test1'));
+  n.host.addEventListener('my-event', t.step_func((e) => {
+    const path_before = e.composedPath();
+    // Move the target out of a closed shadow tree
+    n.host.append(n.target);
+    const path_after = e.composedPath();
+    assert_array_equals(path_before, path_after);
+    t.done();
+  }));
+  const event = new Event('my-event', { bubbles: true, composed: true });
+  n.target.dispatchEvent(event);
+}, 'Event.composedPath() should return the same result even if DOM is mutated (1/2)');
+</script>
+
+<div id="test2">
+  <div id="host1">
+    <template id="sr1" data-mode="closed">
+      <div id="host2">
+        <template id="sr2" data-mode="open">
+          <div id="target"></div>
+        </template>
+      </div>
+    </template>
+  </div>
+</div>
+
+<script>
+async_test((t) => {
+  const n = createTestTree(document.querySelector('#test2'));
+  n.host1.addEventListener('my-event', t.step_func((e) => {
+    const path_before = e.composedPath();
+    // Move nodes out of a closed shadow tree
+    n.host1.append(n.host2);
+    n.host1.append(n.target);
+    const path_after = e.composedPath();
+    assert_array_equals(path_before, path_after);
+    t.done();
+  }));
+  const event = new Event('my-event', { bubbles: true, composed: true });
+  n.target.dispatchEvent(event);
+}, 'Event.composedPath() should return the same result even if DOM is mutated (2/2)');
+</script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute-expected.txt (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute-expected.txt	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,7 @@
+form
+
+
+PASS Form control's form attribute should point to the form element. 
+FAIL Shadow form control's form attribute should work also in shadow DOM. assert_equals: expected null but got Element node <form id="form">form</form>
+PASS Form element as form control's ancestor should work also in shadow DOM. 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,80 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Form controls' form attribute</title>
+<script src=""
+<script src=""
+<div id="testcontent">
+  <form id="form">form</form>
+  <input id="input" form="form">
+</div>
+
+<script>
+
+test(() => {
+  assert_equals(document.getElementById('input').form,
+                document.getElementById('form'));
+}, "Form control's form attribute should point to the form element.");
+
+test(() => {
+  var testcontent = document.getElementById("testcontent");
+  var host = document.createElement("div");
+  var sr = host.attachShadow({mode: "open"});
+  sr.innerHTML = testcontent.innerHTML;
+  var input = sr.getElementById("input");
+  var form = sr.getElementById("form");
+
+  // Should have null form when shadow DOM isn't connected.
+  assert_equals(input.form, null);
+
+  testcontent.appendChild(host);
+  assert_equals(input.form, form);
+
+  host.remove();
+  assert_equals(input.form, null);
+
+  testcontent.appendChild(host);
+  assert_equals(input.form, form);
+
+  input.remove();
+  assert_equals(input.form, null);
+
+  sr.appendChild(input);
+  assert_equals(input.form, form);
+
+  form.id = "foobar";
+  assert_equals(input.form, null);
+
+  form.id = "form";
+  assert_equals(input.form, form);
+
+  form.remove();
+  assert_equals(input.form, null);
+
+  sr.appendChild(form);
+  assert_equals(input.form, form);
+
+  host.remove();
+}, "Shadow form control's form attribute should work also in shadow DOM.");
+
+test(() => {
+  var testcontent = document.getElementById("testcontent");
+  var host = document.createElement("div");
+  var sr = host.attachShadow({mode: "open"});
+  sr.innerHTML = "<form id='form'><input id='input'></form>";
+  var input = sr.getElementById("input");
+  var form = sr.getElementById("form");
+
+  assert_equals(input.form, form);
+
+  input.remove();
+  assert_equals(input.form, null);
+
+  form.appendChild(input);
+  assert_equals(input.form, form);
+
+  form.remove();
+  assert_equals(input.form, form);
+
+  host.remove();
+}, "Form element as form control's ancestor should work also in shadow DOM.");
+</script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/getElementById-dynamic-001-expected.txt (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/getElementById-dynamic-001-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/getElementById-dynamic-001-expected.txt	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,3 @@
+
+PASS ShadowRoot.getElementById keeps working after host has been removed 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/getElementById-dynamic-001.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/getElementById-dynamic-001.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/getElementById-dynamic-001.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,23 @@
+<!doctype html>
+<title>Shadow DOM: ShadowRoot.getElementById in shadow trees keeps working after host is removed from tree</title>
+<link rel="help" href=""
+<link rel="help" href=""
+<link rel="author" name="Emilio Cobos Álvarez" href=""
+<script src=""
+<script src=""
+<div id="host"></div>
+<script>
+test(function() {
+  let host = document.getElementById("host");
+  host.attachShadow({ mode: "open" }).innerHTML = `<div id="test-id"></div>`;
+
+  let element = host.shadowRoot.getElementById("test-id");
+  assert_true(!!element);
+
+  host.remove();
+  assert_equals(host.shadowRoot.getElementById("test-id"), element);
+
+  element.remove();
+  assert_equals(host.shadowRoot.getElementById("test-id"), null);
+}, "ShadowRoot.getElementById keeps working after host has been removed");
+</script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/input-element-list-expected.txt (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/input-element-list-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/input-element-list-expected.txt	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,5 @@
+
+
+FAIL Input element's list attribute should point to the datalist element. assert_equals: expected (object) null but got (undefined) undefined
+FAIL Input element's list attribute should point to the datalist element in Shadow DOM. assert_equals: expected (object) null but got (undefined) undefined
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/input-element-list.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/input-element-list.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/input-element-list.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,39 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Input.list</title>
+<script src=""
+<script src=""
+<div id="testcontent">
+  <input id="input" list="datalist">
+</div>
+<script>
+
+test(() => {
+  assert_equals(document.getElementById('input').list, null);
+  var dl = document.createElement("datalist");
+  dl.id = "datalist";
+  document.getElementById("testcontent").appendChild(dl);
+  assert_equals(document.getElementById('input').list, dl);
+}, "Input element's list attribute should point to the datalist element.");
+
+
+test(() => {
+  var host = document.createElement("div");
+  document.getElementById("testcontent").appendChild(host);
+  var sr = host.attachShadow({mode: "open"});
+  var input = document.createElement("input");
+  input.setAttribute("list", "datalist");
+  sr.appendChild(input);
+  assert_equals(input.list, null);
+
+  var dl = document.createElement("datalist");
+  dl.id = "datalist";
+  sr.appendChild(dl);
+  assert_equals(input.list, dl);
+
+  dl.remove();
+  assert_equals(input.list, null);
+}, "Input element's list attribute should point to the datalist element in Shadow DOM.");
+
+
+</script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-assigned-expected.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-assigned-expected.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-assigned-expected.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1 @@
+<!DOCTYPE html>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-assigned.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-assigned.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-assigned.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<title>Layout using slot elements</title>
+<link rel="author" title="Hayato Ito" href=""
+<link rel="help" href=""
+<link rel="match" href=""
+<div id="host"></div>
+<script>
+const host = document.querySelector('#host');
+const sr = host.attachShadow({ mode: 'open' });
+sr.innerHTML = '<slot name=s1></slot>'
+host.innerHTML = '<div id=d1 slot=s1></div>';
+
+document.body.offsetLeft;
+document.querySelector('#d1').setAttribute('slot', 's2');
+</script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-fallback-expected.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-fallback-expected.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-fallback-expected.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1 @@
+<!DOCTYPE html>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-fallback.html (0 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-fallback.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-fallback.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<title>Layout using slot elements</title>
+<link rel="author" title="Hayato Ito" href=""
+<link rel="help" href=""
+<link rel="match" href=""
+<div id="host"></div>
+<script>
+const host = document.querySelector('#host');
+const sr = host.attachShadow({ mode: 'open' });
+
+sr.innerHTML = '<slot><div id="fallback">Should not be displayed</div></slot>'
+
+document.body.offsetLeft;
+host.appendChild(document.createElement('div'));
+</script>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/leaktests/get-elements-expected.txt (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/leaktests/get-elements-expected.txt	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/leaktests/get-elements-expected.txt	2018-09-11 03:59:41 UTC (rev 235881)
@@ -1,7 +1,7 @@
 
 PASS getElementsById() should not leak nodes in shadow tree 
-FAIL getElementsByClassName() should not leak nodes in shadow tree assert_array_equals: value is 0, expected array
-FAIL getElementsByName() should not leak nodes in shadow tree assert_array_equals: value is 0, expected array
-FAIL getElementsByTagName() should not leak nodes in shadow tree assert_array_equals: value is 0, expected array
+PASS getElementsByClassName() should not leak nodes in shadow tree 
+PASS getElementsByName() should not leak nodes in shadow tree 
+PASS getElementsByTagName() should not leak nodes in shadow tree 
 PASS getElementsByTagNameNS() should not leak nodes in shadow tree 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/leaktests/get-elements.html (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/leaktests/get-elements.html	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/leaktests/get-elements.html	2018-09-11 03:59:41 UTC (rev 235881)
@@ -85,12 +85,12 @@
     assert_equals(doc.querySelectorAll('.bar').length, 1);
     assert_equals(doc.getElementsByClassName('bar')[0].getAttribute('label'), 'doc-div');
 
-    assert_array_equals(hostOpen.querySelectorAll('.bar').length, 0);
+    assert_equals(hostOpen.querySelectorAll('.bar').length, 0);
 
     assert_equals(shadowOpen.querySelectorAll('.bar').length, 1);
     assert_equals(shadowOpen.querySelectorAll('.bar')[0].getAttribute('label'), 'shadow-open-div');
 
-    assert_array_equals(hostClosed.querySelectorAll('.bar').length, 0);
+    assert_equals(hostClosed.querySelectorAll('.bar').length, 0);
 
     assert_equals(shadowClosed.querySelectorAll('.bar').length, 1);
     assert_equals(shadowClosed.querySelectorAll('.bar')[0].getAttribute('label'), 'shadow-closed-div');
@@ -106,11 +106,11 @@
 
     assert_equals(doc.querySelectorAll('[name=baz]').length, 1);
 
-    assert_array_equals(hostOpen.querySelectorAll('[name=baz]').length, 0);
+    assert_equals(hostOpen.querySelectorAll('[name=baz]').length, 0);
     assert_equals(shadowOpen.querySelectorAll('[name=baz]').length, 1);
     assert_equals(shadowOpen.querySelectorAll('[name=baz]')[0].getAttribute('label'), 'shadow-open-form');
 
-    assert_array_equals(hostClosed.querySelectorAll('[name=baz]').length, 0);
+    assert_equals(hostClosed.querySelectorAll('[name=baz]').length, 0);
     assert_equals(shadowClosed.querySelectorAll('[name=baz]').length, 1);
     assert_equals(shadowClosed.querySelectorAll('[name=baz]')[0].getAttribute('label'), 'shadow-closed-form');
 }, 'getElementsByName() should not leak nodes in shadow tree');
@@ -126,12 +126,12 @@
     assert_equals(doc.querySelectorAll('my-element').length, 1);
     assert_equals(doc.getElementsByTagName('my-element')[0].getAttribute('label'), 'doc-my-element');
 
-    assert_array_equals(hostOpen.querySelectorAll('my-element').length, 0);
+    assert_equals(hostOpen.querySelectorAll('my-element').length, 0);
     // ShadowRoot isn't an Element, does not have getElementsByTagName().
     assert_equals(shadowOpen.querySelectorAll('my-element').length, 1);
     assert_equals(shadowOpen.querySelectorAll('my-element')[0].getAttribute('label'), 'shadow-open-my-element');
 
-    assert_array_equals(hostClosed.querySelectorAll('my-element').length, 0);
+    assert_equals(hostClosed.querySelectorAll('my-element').length, 0);
     assert_equals(shadowClosed.querySelectorAll('my-element').length, 1);
     assert_equals(shadowClosed.querySelectorAll('my-element')[0].getAttribute('label'), 'shadow-closed-my-element');
 }, 'getElementsByTagName() should not leak nodes in shadow tree');

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/leaktests/w3c-import.log (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/leaktests/w3c-import.log	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/leaktests/w3c-import.log	2018-09-11 03:59:41 UTC (rev 235881)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-	https://github.com/w3c/web-platform-tests
+	https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/resources/event-path-test-helpers.js (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/resources/event-path-test-helpers.js	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/resources/event-path-test-helpers.js	2018-09-11 03:59:41 UTC (rev 235881)
@@ -16,9 +16,6 @@
                 eventPath.push(this.label);
                 relatedTargets.push(event.relatedTarget ? event.relatedTarget.label : null);
 
-                if (!event.composedPath) // Don't fail all tests just for the lack of composedPath.
-                    return;
-
                 pathAtTargets.push(event.composedPath().map(function (node) { return node.label; }));
                 targets.push(event.target);
             }).bind(node));

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/resources/shadow-dom-utils.js (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/resources/shadow-dom-utils.js	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/resources/shadow-dom-utils.js	2018-09-11 03:59:41 UTC (rev 235881)
@@ -59,6 +59,8 @@
     'wbr'
 ];
 
+var ATTACHSHADOW_DISALLOWED_ELEMENTS = HTML5_ELEMENT_NAMES.filter(el => !ATTACHSHADOW_SAFELISTED_ELEMENTS.includes(el));
+
 function unit(f) {
     return function () {
         var ctx = newContext();

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/resources/w3c-import.log (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/resources/w3c-import.log	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/resources/w3c-import.log	2018-09-11 03:59:41 UTC (rev 235881)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-	https://github.com/w3c/web-platform-tests
+	https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/w3c-import.log (235880 => 235881)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/w3c-import.log	2018-09-11 01:35:44 UTC (rev 235880)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/w3c-import.log	2018-09-11 03:59:41 UTC (rev 235881)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-	https://github.com/w3c/web-platform-tests
+	https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 
@@ -17,16 +17,21 @@
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Document-prototype-adoptNode.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Document-prototype-currentScript.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Document-prototype-importNode.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow-custom-element.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-attachShadow.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Element-interface-shadowRoot-attribute.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/HTMLSlotElement-interface.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/META.yml
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/MouseEvent-prototype-offsetX-offsetY.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Node-prototype-cloneNode.html
-/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/OWNERS
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Range-prototype-insertNode.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/ShadowRoot-interface.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/Slotable-interface.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/directionality-001.tentative-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/directionality-001.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-path-with-related-target.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-path.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed.html
@@ -34,7 +39,14 @@
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-inside-slotted-node.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-post-dispatch.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-with-related-target.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/getElementById-dynamic-001.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/historical.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/input-element-list.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-assigned-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-assigned.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-fallback-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/layout-slot-no-longer-fallback.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/scroll-to-the-fragment-in-shadow-tree.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/slotchange-customelements.html
 /LayoutTests/imported/w3c/web-platform-tests/shadow-dom/slotchange-event.html
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to