From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../shadow-dom/Document-prototype-adoptNode.html | 31 ++ .../Document-prototype-currentScript.html | 108 ++++ .../shadow-dom/Document-prototype-importNode.html | 31 ++ ...entOrShadowRoot-prototype-elementFromPoint.html | 279 ++++++++++ ...ment-interface-attachShadow-custom-element.html | 101 ++++ .../shadow-dom/Element-interface-attachShadow.html | 95 ++++ .../Element-interface-shadowRoot-attribute.html | 45 ++ .../shadow-dom/Extensions-to-Event-Interface.html | 224 ++++++++ .../shadow-dom/HTMLSlotElement-interface.html | 269 +++++++++ testing/web-platform/tests/shadow-dom/META.yml | 6 + .../MouseEvent-prototype-offsetX-offsetY.html | 154 ++++++ .../tests/shadow-dom/Node-prototype-cloneNode.html | 57 ++ .../shadow-dom/Range-prototype-insertNode.html | 18 + .../tests/shadow-dom/ShadowRoot-interface.html | 120 ++++ .../tests/shadow-dom/Slottable-mixin.html | 94 ++++ .../tests/shadow-dom/accesskey.tentative.html | 42 ++ ...bbling-event-listeners-across-shadow-trees.html | 191 +++++++ .../crashtests/move-to-new-tree-1343016.html | 27 + .../declarative-after-attachshadow.tentative.html | 46 ++ .../declarative-parser-interaction.tentative.html | 39 ++ ...eclarative-shadow-dom-attachment.tentative.html | 98 ++++ .../declarative-shadow-dom-basic.tentative.html | 294 ++++++++++ .../declarative-shadow-dom-opt-in.tentative.html | 198 +++++++ ...declarative-with-disabled-shadow.tentative.html | 31 ++ .../declarative/getinnerhtml.tentative.html | 79 +++ .../innerhtml-before-closing-tag.tentative.html | 51 ++ .../innerhtml-on-ordinary-template.tentative.html | 49 ++ ...move-template-before-closing-tag.tentative.html | 91 ++++ .../declarative/script-access.tentative.html | 120 ++++ .../support/declarative-child-frame.html | 23 + .../shadow-dom/declarative/support/helpers.js | 4 + .../tests/shadow-dom/directionality-001-ref.html | 6 + .../shadow-dom/directionality-001.tentative.html | 19 + .../tests/shadow-dom/directionality-002-ref.html | 6 + .../shadow-dom/directionality-002.tentative.html | 25 + .../event-composed-path-after-dom-mutation.html | 59 ++ .../event-composed-path-with-related-target.html | 258 +++++++++ .../tests/shadow-dom/event-composed-path.html | 281 ++++++++++ .../tests/shadow-dom/event-composed.html | 81 +++ .../shadow-dom/event-dispatch-order.tentative.html | 30 + .../tests/shadow-dom/event-inside-shadow-tree.html | 148 +++++ .../shadow-dom/event-inside-slotted-node.html | 258 +++++++++ .../shadow-dom/event-on-pseudo-element-crash.html | 28 + .../tests/shadow-dom/event-post-dispatch.html | 226 ++++++++ .../shadow-dom/event-with-related-target.html | 256 +++++++++ .../delegatesFocus-highlight-sibling.html | 126 +++++ ...-navigation-slot-fallback-default-tabindex.html | 74 +++ .../focus-navigation-slot-fallback.html | 71 +++ .../focus-navigation-slot-nested-2levels.html | 63 +++ ...ocus-navigation-slot-nested-delegatesFocus.html | 51 ++ .../focus-navigation-slot-nested-fallback.html | 71 +++ .../focus-navigation-slot-nested.html | 51 ++ .../focus-navigation-slot-shadow-in-fallback.html | 48 ++ .../focus-navigation-slot-shadow-in-slot.html | 47 ++ .../focus-navigation-slot-with-tabindex.html | 65 +++ .../focus-navigation-slots-in-slot.html | 71 +++ .../focus-navigation/focus-navigation-slots.html | 67 +++ .../focus-navigation-web-component-radio.html | 70 +++ .../focus-navigation-with-delegatesFocus.html | 358 ++++++++++++ .../focus-navigation/focus-navigation.html | 73 +++ .../focus-navigation/focus-nested-slots.html | 52 ++ .../focus-reverse-unassignable-slot.html | 35 ++ .../focus-reverse-unassigned-slot.html | 39 ++ .../focus-navigation/focus-unassignable-slot.html | 28 + .../focus-with-negative-index.html | 92 ++++ .../focus-navigation/resources/focus-utils.js | 153 ++++++ .../focus-navigation/resources/shadow-dom.js | 165 ++++++ .../tests/shadow-dom/focus-within-shadow.html | 29 + .../focus/DocumentOrShadowRoot-activeElement.html | 92 ++++ .../focus/ShadowRoot-delegatesFocus.html | 27 + .../focus/blur-on-shadow-host-delegatesFocus.html | 38 ++ .../focus/click-focus-delegatesFocus-click.html | 138 +++++ ...click-focus-delegatesFocus-tabindex-varies.html | 68 +++ .../click-focus-delegatesFocus-tabindex-zero.html | 68 +++ .../focus/delegatesFocus-tabindex-change.html | 23 + .../tests/shadow-dom/focus/focus-autofocus.html | 338 ++++++++++++ .../focus/focus-click-on-shadow-host.html | 40 ++ ...hod-delegatesFocus-nested-browsing-context.html | 36 ++ .../focus/focus-method-delegatesFocus.html | 312 +++++++++++ .../focus/focus-method-with-delegatesFocus.html | 101 ++++ .../focus/focus-pseudo-matches-on-shadow-host.html | 122 +++++ .../focus/focus-pseudo-on-shadow-host-1.html | 25 + .../focus/focus-pseudo-on-shadow-host-2.html | 27 + .../focus/focus-pseudo-on-shadow-host-3.html | 26 + .../focus/focus-selector-delegatesFocus.html | 92 ++++ .../focus/focus-shadowhost-display-none.html | 68 +++ .../shadow-dom/focus/focus-tab-on-shadow-host.html | 31 ++ ...index-order-shadow-negative-delegatesFocus.html | 34 ++ .../focus-tabindex-order-shadow-negative.html | 34 ++ .../focus-tabindex-order-shadow-slot-one.html | 37 ++ ...bindex-order-shadow-varying-delegatesFocus.html | 36 ++ ...s-tabindex-order-shadow-varying-tabindex-2.html | 66 +++ ...s-tabindex-order-shadow-varying-tabindex-3.html | 80 +++ ...cus-tabindex-order-shadow-varying-tabindex.html | 36 ++ ...-tabindex-order-shadow-zero-delegatesFocus.html | 34 ++ ...s-tabindex-order-shadow-zero-host-negative.html | 35 ++ ...-order-shadow-zero-host-not-set-scrollable.html | 38 ++ ...us-tabindex-order-shadow-zero-host-not-set.html | 37 ++ .../focus-tabindex-order-shadow-zero-host-one.html | 37 ++ ...tabindex-order-shadow-zero-host-scrollable.html | 36 ++ .../focus/focus-tabindex-order-shadow-zero.html | 35 ++ .../shadow-dom/focus/resources/shadow-utils.js | 80 +++ .../shadow-dom/form-control-form-attribute.html | 80 +++ .../shadow-dom/getElementById-dynamic-001.html | 23 + .../web-platform/tests/shadow-dom/historical.html | 25 + .../shadow-dom/imperative-slot-api-crash.html | 23 + .../shadow-dom/imperative-slot-api-slotchange.html | 394 ++++++++++++++ .../tests/shadow-dom/imperative-slot-api.html | 303 +++++++++++ .../imperative-slot-assign-not-slotable-crash.html | 15 + .../shadow-dom/imperative-slot-fallback-clear.html | 35 ++ .../imperative-slot-initial-fallback.html | 31 ++ ...mperative-slot-layout-invalidation-001-ref.html | 5 + .../imperative-slot-layout-invalidation-001.html | 27 + .../tests/shadow-dom/innerHTML-setter.xhtml | 81 +++ .../tests/shadow-dom/input-element-list.html | 39 ++ .../tests/shadow-dom/input-type-radio.html | 73 +++ .../shadow-dom/invalidate-shadow-dom-crash.html | 12 + .../invalidate-sibling-different-slots-ref.html | 10 + .../invalidate-sibling-different-slots.html | 20 + .../shadow-dom/layout-slot-no-longer-assigned.html | 15 + .../shadow-dom/layout-slot-no-longer-fallback.html | 15 + .../tests/shadow-dom/leaktests/get-elements.html | 174 ++++++ .../shadow-dom/leaktests/html-collection.html | 79 +++ .../tests/shadow-dom/leaktests/window-frames.html | 36 ++ .../tests/shadow-dom/nested-slot-remove-crash.html | 40 ++ .../offsetParent-across-shadow-boundaries.html | 190 +++++++ ...setTop-offsetLeft-across-shadow-boundaries.html | 96 ++++ .../tests/shadow-dom/reference/empty.html | 1 + .../Document-prototype-currentScript-helper.js | 1 + .../resources/event-path-test-helpers.js | 92 ++++ .../tests/shadow-dom/resources/shadow-dom-utils.js | 95 ++++ .../tests/shadow-dom/resources/shadow-dom.js | 163 ++++++ .../scroll-to-the-fragment-in-shadow-tree.html | 128 +++++ .../selection-collapse-and-extend.tentative.html | 82 +++ .../shadow-dom/selection-direction.tentative.html | 63 +++ .../selection-getComposedRanges.tentative.html | 141 +++++ .../shadow-style-invalidation-vw-units-ref.html | 6 + .../shadow-style-invalidation-vw-units.html | 28 + .../shadow-dom/slot-dir-attach-child-crash.html | 18 + .../shadow-dom/slot-fallback-content-001-ref.html | 12 + .../shadow-dom/slot-fallback-content-001.html | 21 + .../shadow-dom/slot-fallback-content-002-ref.html | 12 + .../shadow-dom/slot-fallback-content-002.html | 22 + .../shadow-dom/slot-fallback-content-003-ref.html | 20 + .../shadow-dom/slot-fallback-content-003.html | 47 ++ .../shadow-dom/slot-fallback-content-004-ref.html | 25 + .../shadow-dom/slot-fallback-content-004.html | 58 ++ .../shadow-dom/slot-fallback-content-005-ref.html | 7 + .../shadow-dom/slot-fallback-content-005.html | 21 + .../shadow-dom/slot-fallback-content-006-ref.html | 38 ++ .../shadow-dom/slot-fallback-content-006.html | 109 ++++ .../shadow-dom/slot-fallback-content-007-ref.html | 12 + .../shadow-dom/slot-fallback-content-007.html | 29 + .../shadow-dom/slot-fallback-content-008-ref.html | 12 + .../shadow-dom/slot-fallback-content-008.html | 34 ++ .../shadow-dom/slotchange-customelements.html | 55 ++ .../tests/shadow-dom/slotchange-event.html | 602 +++++++++++++++++++++ .../web-platform/tests/shadow-dom/slotchange.html | 305 +++++++++++ .../shadow-dom/slots-fallback-in-document.html | 55 ++ .../tests/shadow-dom/slots-fallback.html | 253 +++++++++ .../tests/shadow-dom/slots-outside-shadow-dom.html | 16 + testing/web-platform/tests/shadow-dom/slots.html | 526 ++++++++++++++++++ .../web-platform/tests/shadow-dom/untriaged/README | 2 + .../attributes/test-006.html | 28 + .../methods/test-001.html | 30 + .../methods/test-002.html | 36 ++ .../activeElement-confirm-return-null.html | 69 +++ .../shadowroot-attributes/test-007.html | 41 ++ .../shadowroot-attributes/test-009.html | 34 ++ .../shadowroot-attributes/test-010.html | 66 +++ .../shadowroot-attributes/test-011.html | 47 ++ .../shadowroot-attributes/test-012.html | 30 + .../shadowroot-attributes/test-013.html | 30 + .../shadowroot-methods/test-001.html | 52 ++ .../shadowroot-methods/test-004.html | 42 ++ .../shadowroot-methods/test-006.html | 48 ++ .../shadowroot-methods/test-007.html | 53 ++ .../shadowroot-methods/test-010.html | 33 ++ .../untriaged/events/event-dispatch/test-002.html | 52 ++ .../untriaged/events/event-dispatch/test-003.html | 77 +++ .../events/event-retargeting/test-001.html | 97 ++++ .../events/event-retargeting/test-003.html | 52 ++ .../events/retargeting-focus-events/test-001.html | 313 +++++++++++ .../events/retargeting-focus-events/test-002.html | 54 ++ .../events/retargeting-focus-events/test-003.html | 53 ++ .../events/retargeting-relatedtarget/test-001.html | 60 ++ .../events/retargeting-relatedtarget/test-002.html | 55 ++ .../events/retargeting-relatedtarget/test-003.html | 47 ++ .../shadow-dom/untriaged/events/test-001.html | 61 +++ .../html-forms/test-001.html | 64 +++ .../html-forms/test-002.html | 94 ++++ .../html-forms/test-003.html | 80 +++ .../inert-html-elements/test-001.html | 70 +++ .../inert-html-elements/test-002.html | 36 ++ .../shadow-dom/untriaged/resources/blank.html | 5 + .../shadow-dom/untriaged/resources/bobs_page.html | 35 ++ .../nested_tree_reftest-ref.html | 25 + .../nested-shadow-trees/nested_tree_reftest.html | 30 + .../reprojection/reprojection-001-ref.html | 26 + .../reprojection/reprojection-001.html | 30 + .../shadow-trees/shadow-root-001-ref.html | 16 + .../untriaged/shadow-trees/shadow-root-001.html | 26 + .../shadow-trees/shadow-root-002-ref.html | 22 + .../untriaged/shadow-trees/shadow-root-002.html | 40 ++ .../dom-tree-accessors-001.html | 218 ++++++++ .../dom-tree-accessors-002.html | 62 +++ .../ownerdocument-001.html | 99 ++++ .../ownerdocument-002.html | 46 ++ .../selectors-api-001.html | 71 +++ .../selectors-api-002.html | 75 +++ .../shadow-root-001.html | 54 ++ .../upper-boundary-encapsulation/test-005.html | 64 +++ .../upper-boundary-encapsulation/test-007.html | 65 +++ .../upper-boundary-encapsulation/test-009.html | 235 ++++++++ .../upper-boundary-encapsulation/test-011.html | 40 ++ .../window-named-properties-001.html | 38 ++ .../window-named-properties-002.html | 41 ++ .../window-named-properties-003.html | 37 ++ .../styles/not-apply-in-shadow-root-001-ref.html | 18 + .../styles/not-apply-in-shadow-root-001.html | 30 + .../shadow-dom/untriaged/styles/test-001.html | 76 +++ .../shadow-dom/untriaged/styles/test-003.html | 56 ++ .../shadow-dom/untriaged/styles/test-005.html | 54 ++ .../shadow-dom/untriaged/styles/test-008.html | 47 ++ .../user-interaction/active-element/test-001.html | 39 ++ .../user-interaction/active-element/test-002.html | 40 ++ .../inheritance-of-content-editable-001.html | 56 ++ .../ranges-and-selections/test-001.html | 72 +++ .../ranges-and-selections/test-002.html | 72 +++ .../shadow-dom/user-agent-shadow-root-crash.html | 18 + 230 files changed, 17756 insertions(+) create mode 100644 testing/web-platform/tests/shadow-dom/Document-prototype-adoptNode.html create mode 100644 testing/web-platform/tests/shadow-dom/Document-prototype-currentScript.html create mode 100644 testing/web-platform/tests/shadow-dom/Document-prototype-importNode.html create mode 100644 testing/web-platform/tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html create mode 100644 testing/web-platform/tests/shadow-dom/Element-interface-attachShadow-custom-element.html create mode 100644 testing/web-platform/tests/shadow-dom/Element-interface-attachShadow.html create mode 100644 testing/web-platform/tests/shadow-dom/Element-interface-shadowRoot-attribute.html create mode 100644 testing/web-platform/tests/shadow-dom/Extensions-to-Event-Interface.html create mode 100644 testing/web-platform/tests/shadow-dom/HTMLSlotElement-interface.html create mode 100644 testing/web-platform/tests/shadow-dom/META.yml create mode 100644 testing/web-platform/tests/shadow-dom/MouseEvent-prototype-offsetX-offsetY.html create mode 100644 testing/web-platform/tests/shadow-dom/Node-prototype-cloneNode.html create mode 100644 testing/web-platform/tests/shadow-dom/Range-prototype-insertNode.html create mode 100644 testing/web-platform/tests/shadow-dom/ShadowRoot-interface.html create mode 100644 testing/web-platform/tests/shadow-dom/Slottable-mixin.html create mode 100644 testing/web-platform/tests/shadow-dom/accesskey.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html create mode 100644 testing/web-platform/tests/shadow-dom/crashtests/move-to-new-tree-1343016.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/declarative-after-attachshadow.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/declarative-parser-interaction.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/declarative-with-disabled-shadow.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/getinnerhtml.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/innerhtml-before-closing-tag.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/innerhtml-on-ordinary-template.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/move-template-before-closing-tag.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/script-access.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/support/declarative-child-frame.html create mode 100644 testing/web-platform/tests/shadow-dom/declarative/support/helpers.js create mode 100644 testing/web-platform/tests/shadow-dom/directionality-001-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/directionality-001.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/directionality-002-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/directionality-002.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/event-composed-path-after-dom-mutation.html create mode 100644 testing/web-platform/tests/shadow-dom/event-composed-path-with-related-target.html create mode 100644 testing/web-platform/tests/shadow-dom/event-composed-path.html create mode 100644 testing/web-platform/tests/shadow-dom/event-composed.html create mode 100644 testing/web-platform/tests/shadow-dom/event-dispatch-order.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/event-inside-shadow-tree.html create mode 100644 testing/web-platform/tests/shadow-dom/event-inside-slotted-node.html create mode 100644 testing/web-platform/tests/shadow-dom/event-on-pseudo-element-crash.html create mode 100644 testing/web-platform/tests/shadow-dom/event-post-dispatch.html create mode 100644 testing/web-platform/tests/shadow-dom/event-with-related-target.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/delegatesFocus-highlight-sibling.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-fallback-default-tabindex.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-fallback.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested-2levels.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested-delegatesFocus.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested-fallback.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-shadow-in-fallback.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-shadow-in-slot.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-with-tabindex.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slots-in-slot.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slots.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-web-component-radio.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-with-delegatesFocus.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-nested-slots.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-reverse-unassignable-slot.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-reverse-unassigned-slot.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-unassignable-slot.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/focus-with-negative-index.html create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/resources/focus-utils.js create mode 100644 testing/web-platform/tests/shadow-dom/focus-navigation/resources/shadow-dom.js create mode 100644 testing/web-platform/tests/shadow-dom/focus-within-shadow.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/DocumentOrShadowRoot-activeElement.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/ShadowRoot-delegatesFocus.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/blur-on-shadow-host-delegatesFocus.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/click-focus-delegatesFocus-click.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/click-focus-delegatesFocus-tabindex-varies.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/click-focus-delegatesFocus-tabindex-zero.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/delegatesFocus-tabindex-change.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-autofocus.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-click-on-shadow-host.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-method-delegatesFocus-nested-browsing-context.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-method-delegatesFocus.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-method-with-delegatesFocus.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-selector-delegatesFocus.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-shadowhost-display-none.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tab-on-shadow-host.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-negative-delegatesFocus.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-negative.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-slot-one.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-delegatesFocus.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-tabindex-2.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-tabindex-3.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-tabindex.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-delegatesFocus.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-negative.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-not-set-scrollable.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-not-set.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-one.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-scrollable.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero.html create mode 100644 testing/web-platform/tests/shadow-dom/focus/resources/shadow-utils.js create mode 100644 testing/web-platform/tests/shadow-dom/form-control-form-attribute.html create mode 100644 testing/web-platform/tests/shadow-dom/getElementById-dynamic-001.html create mode 100644 testing/web-platform/tests/shadow-dom/historical.html create mode 100644 testing/web-platform/tests/shadow-dom/imperative-slot-api-crash.html create mode 100644 testing/web-platform/tests/shadow-dom/imperative-slot-api-slotchange.html create mode 100644 testing/web-platform/tests/shadow-dom/imperative-slot-api.html create mode 100644 testing/web-platform/tests/shadow-dom/imperative-slot-assign-not-slotable-crash.html create mode 100644 testing/web-platform/tests/shadow-dom/imperative-slot-fallback-clear.html create mode 100644 testing/web-platform/tests/shadow-dom/imperative-slot-initial-fallback.html create mode 100644 testing/web-platform/tests/shadow-dom/imperative-slot-layout-invalidation-001-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/imperative-slot-layout-invalidation-001.html create mode 100644 testing/web-platform/tests/shadow-dom/innerHTML-setter.xhtml create mode 100644 testing/web-platform/tests/shadow-dom/input-element-list.html create mode 100644 testing/web-platform/tests/shadow-dom/input-type-radio.html create mode 100644 testing/web-platform/tests/shadow-dom/invalidate-shadow-dom-crash.html create mode 100644 testing/web-platform/tests/shadow-dom/invalidate-sibling-different-slots-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/invalidate-sibling-different-slots.html create mode 100644 testing/web-platform/tests/shadow-dom/layout-slot-no-longer-assigned.html create mode 100644 testing/web-platform/tests/shadow-dom/layout-slot-no-longer-fallback.html create mode 100644 testing/web-platform/tests/shadow-dom/leaktests/get-elements.html create mode 100644 testing/web-platform/tests/shadow-dom/leaktests/html-collection.html create mode 100644 testing/web-platform/tests/shadow-dom/leaktests/window-frames.html create mode 100644 testing/web-platform/tests/shadow-dom/nested-slot-remove-crash.html create mode 100644 testing/web-platform/tests/shadow-dom/offsetParent-across-shadow-boundaries.html create mode 100644 testing/web-platform/tests/shadow-dom/offsetTop-offsetLeft-across-shadow-boundaries.html create mode 100644 testing/web-platform/tests/shadow-dom/reference/empty.html create mode 100644 testing/web-platform/tests/shadow-dom/resources/Document-prototype-currentScript-helper.js create mode 100644 testing/web-platform/tests/shadow-dom/resources/event-path-test-helpers.js create mode 100644 testing/web-platform/tests/shadow-dom/resources/shadow-dom-utils.js create mode 100644 testing/web-platform/tests/shadow-dom/resources/shadow-dom.js create mode 100644 testing/web-platform/tests/shadow-dom/scroll-to-the-fragment-in-shadow-tree.html create mode 100644 testing/web-platform/tests/shadow-dom/selection-collapse-and-extend.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/selection-direction.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/selection-getComposedRanges.tentative.html create mode 100644 testing/web-platform/tests/shadow-dom/shadow-style-invalidation-vw-units-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/shadow-style-invalidation-vw-units.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-dir-attach-child-crash.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-001-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-001.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-002-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-002.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-003-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-003.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-004-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-004.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-005-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-005.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-006-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-006.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-007-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-007.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-008-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/slot-fallback-content-008.html create mode 100644 testing/web-platform/tests/shadow-dom/slotchange-customelements.html create mode 100644 testing/web-platform/tests/shadow-dom/slotchange-event.html create mode 100644 testing/web-platform/tests/shadow-dom/slotchange.html create mode 100644 testing/web-platform/tests/shadow-dom/slots-fallback-in-document.html create mode 100644 testing/web-platform/tests/shadow-dom/slots-fallback.html create mode 100644 testing/web-platform/tests/shadow-dom/slots-outside-shadow-dom.html create mode 100644 testing/web-platform/tests/shadow-dom/slots.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/README create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/extensions-to-element-interface/attributes/test-006.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/extensions-to-element-interface/methods/test-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/extensions-to-element-interface/methods/test-002.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/activeElement-confirm-return-null.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-007.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-009.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-010.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-011.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-012.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-013.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-004.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-006.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-007.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-010.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/events/event-dispatch/test-002.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/events/event-dispatch/test-003.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/events/event-retargeting/test-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/events/event-retargeting/test-003.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/events/retargeting-focus-events/test-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/events/retargeting-focus-events/test-002.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/events/retargeting-focus-events/test-003.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/events/retargeting-relatedtarget/test-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/events/retargeting-relatedtarget/test-002.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/events/retargeting-relatedtarget/test-003.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/events/test-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/html-elements-in-shadow-trees/html-forms/test-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/html-elements-in-shadow-trees/html-forms/test-002.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/html-elements-in-shadow-trees/html-forms/test-003.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/html-elements-in-shadow-trees/inert-html-elements/test-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/html-elements-in-shadow-trees/inert-html-elements/test-002.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/resources/blank.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/resources/bobs_page.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/shadow-root-001-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/shadow-root-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/shadow-root-002-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/shadow-root-002.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/dom-tree-accessors-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/dom-tree-accessors-002.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/ownerdocument-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/ownerdocument-002.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/selectors-api-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/selectors-api-002.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/shadow-root-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/test-005.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/test-007.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/test-009.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/test-011.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/window-named-properties-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/window-named-properties-002.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/window-named-properties-003.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/styles/not-apply-in-shadow-root-001-ref.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/styles/not-apply-in-shadow-root-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/styles/test-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/styles/test-003.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/styles/test-005.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/styles/test-008.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/user-interaction/active-element/test-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/user-interaction/active-element/test-002.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/user-interaction/editing/inheritance-of-content-editable-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/user-interaction/ranges-and-selections/test-001.html create mode 100644 testing/web-platform/tests/shadow-dom/untriaged/user-interaction/ranges-and-selections/test-002.html create mode 100644 testing/web-platform/tests/shadow-dom/user-agent-shadow-root-crash.html (limited to 'testing/web-platform/tests/shadow-dom') diff --git a/testing/web-platform/tests/shadow-dom/Document-prototype-adoptNode.html b/testing/web-platform/tests/shadow-dom/Document-prototype-adoptNode.html new file mode 100644 index 0000000000..6afd603618 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/Document-prototype-adoptNode.html @@ -0,0 +1,31 @@ + + + +DOM and Shadow DOM: Document.prototype.adoptNode + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/Document-prototype-currentScript.html b/testing/web-platform/tests/shadow-dom/Document-prototype-currentScript.html new file mode 100644 index 0000000000..176ef348fc --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/Document-prototype-currentScript.html @@ -0,0 +1,108 @@ + + + + +HTML: Document.prototype.currentScript + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/Document-prototype-importNode.html b/testing/web-platform/tests/shadow-dom/Document-prototype-importNode.html new file mode 100644 index 0000000000..f71f8dc6c5 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/Document-prototype-importNode.html @@ -0,0 +1,31 @@ + + + +DOM and Shadow DOM: Document.prototype.importNode + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html b/testing/web-platform/tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html new file mode 100644 index 0000000000..6893ad394b --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html @@ -0,0 +1,279 @@ + + + + Shadow DOM and CSSOM View: Document.prototype.elementFromPoint + + + + + + + + +
+ + + + + diff --git a/testing/web-platform/tests/shadow-dom/Element-interface-attachShadow-custom-element.html b/testing/web-platform/tests/shadow-dom/Element-interface-attachShadow-custom-element.html new file mode 100644 index 0000000000..11ae277c41 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/Element-interface-attachShadow-custom-element.html @@ -0,0 +1,101 @@ + +Shadow DOM: Attaching a ShadowRoot for custom elements + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/Element-interface-attachShadow.html b/testing/web-platform/tests/shadow-dom/Element-interface-attachShadow.html new file mode 100644 index 0000000000..187ac4c408 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/Element-interface-attachShadow.html @@ -0,0 +1,95 @@ + + + +Shadow DOM: Attaching a ShadowRoot + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/Element-interface-shadowRoot-attribute.html b/testing/web-platform/tests/shadow-dom/Element-interface-shadowRoot-attribute.html new file mode 100644 index 0000000000..02d8050997 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/Element-interface-shadowRoot-attribute.html @@ -0,0 +1,45 @@ + + + +Shadow DOM: Element interface shadowRoot attribute + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/Extensions-to-Event-Interface.html b/testing/web-platform/tests/shadow-dom/Extensions-to-Event-Interface.html new file mode 100644 index 0000000000..806d539cad --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/Extensions-to-Event-Interface.html @@ -0,0 +1,224 @@ + + + +Shadow DOM: Extensions to Event Interface + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/HTMLSlotElement-interface.html b/testing/web-platform/tests/shadow-dom/HTMLSlotElement-interface.html new file mode 100644 index 0000000000..e22de32167 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/HTMLSlotElement-interface.html @@ -0,0 +1,269 @@ + + + +Shadow DOM: HTMLSlotElement interface + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/META.yml b/testing/web-platform/tests/shadow-dom/META.yml new file mode 100644 index 0000000000..8fb0a9b995 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/META.yml @@ -0,0 +1,6 @@ +spec: https://dom.spec.whatwg.org/#shadow-trees +suggested_reviewers: + - kojiishi + - rniwa + - takayoshikochi + - hayatoito diff --git a/testing/web-platform/tests/shadow-dom/MouseEvent-prototype-offsetX-offsetY.html b/testing/web-platform/tests/shadow-dom/MouseEvent-prototype-offsetX-offsetY.html new file mode 100644 index 0000000000..643736b85c --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/MouseEvent-prototype-offsetX-offsetY.html @@ -0,0 +1,154 @@ + + + +Shadow DOM: MouseEvent's offsetX and offsetY attributes must be relative to the relative target. + + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/Node-prototype-cloneNode.html b/testing/web-platform/tests/shadow-dom/Node-prototype-cloneNode.html new file mode 100644 index 0000000000..0ee47d492e --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/Node-prototype-cloneNode.html @@ -0,0 +1,57 @@ + + + +DOM: cloneNode(deep) + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/Range-prototype-insertNode.html b/testing/web-platform/tests/shadow-dom/Range-prototype-insertNode.html new file mode 100644 index 0000000000..b55ef68dcb --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/Range-prototype-insertNode.html @@ -0,0 +1,18 @@ + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/ShadowRoot-interface.html b/testing/web-platform/tests/shadow-dom/ShadowRoot-interface.html new file mode 100644 index 0000000000..de7ac91f25 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/ShadowRoot-interface.html @@ -0,0 +1,120 @@ + + + +Shadow DOM: ShadowRoot interface + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/Slottable-mixin.html b/testing/web-platform/tests/shadow-dom/Slottable-mixin.html new file mode 100644 index 0000000000..84c7fce445 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/Slottable-mixin.html @@ -0,0 +1,94 @@ + + + +Shadow DOM: Slottable mixin + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/accesskey.tentative.html b/testing/web-platform/tests/shadow-dom/accesskey.tentative.html new file mode 100644 index 0000000000..93eb912be0 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/accesskey.tentative.html @@ -0,0 +1,42 @@ + + + +Shadow DOM: accesskey + + + + + + + + + +
+
+ + diff --git a/testing/web-platform/tests/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html b/testing/web-platform/tests/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html new file mode 100644 index 0000000000..bcb4ee62e0 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html @@ -0,0 +1,191 @@ + + + +Shadow DOM: Capturing event listeners should be invoked before bubbling event listeners + + + + + + + + +
+
+
+
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+
+ + +
+
+ +
+ +
+
+
+ + + + diff --git a/testing/web-platform/tests/shadow-dom/crashtests/move-to-new-tree-1343016.html b/testing/web-platform/tests/shadow-dom/crashtests/move-to-new-tree-1343016.html new file mode 100644 index 0000000000..853884b993 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/crashtests/move-to-new-tree-1343016.html @@ -0,0 +1,27 @@ + + + +Shadow DOM: Move to new tree without crashing + + + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/declarative/declarative-after-attachshadow.tentative.html b/testing/web-platform/tests/shadow-dom/declarative/declarative-after-attachshadow.tentative.html new file mode 100644 index 0000000000..bfe2d66cfa --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/declarative-after-attachshadow.tentative.html @@ -0,0 +1,46 @@ + +Declarative Shadow DOM after attachShadow + + + + + + + + +
+ + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/declarative/declarative-parser-interaction.tentative.html b/testing/web-platform/tests/shadow-dom/declarative/declarative-parser-interaction.tentative.html new file mode 100644 index 0000000000..f5ff13822b --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/declarative-parser-interaction.tentative.html @@ -0,0 +1,39 @@ + + +Declarative Shadow DOM + + + + + + + + +This test should not crash, and there should be two lines of text visible below. + + +

Line 1

+
+ + + +

Line 2

+
+ + diff --git a/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html new file mode 100644 index 0000000000..d752b62d31 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html @@ -0,0 +1,98 @@ + +Declarative Shadow DOM Element Attachment + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative.html b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative.html new file mode 100644 index 0000000000..b71f7d1a37 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative.html @@ -0,0 +1,294 @@ + + +Declarative Shadow DOM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative.html b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative.html new file mode 100644 index 0000000000..0a59768d22 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative.html @@ -0,0 +1,198 @@ + + +Declarative Shadow DOM + + + + + + + + +
+ + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/declarative/declarative-with-disabled-shadow.tentative.html b/testing/web-platform/tests/shadow-dom/declarative/declarative-with-disabled-shadow.tentative.html new file mode 100644 index 0000000000..849bffa5a7 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/declarative-with-disabled-shadow.tentative.html @@ -0,0 +1,31 @@ + +Declarative Shadow DOM with shadow disabled + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/declarative/getinnerhtml.tentative.html b/testing/web-platform/tests/shadow-dom/declarative/getinnerhtml.tentative.html new file mode 100644 index 0000000000..ad7734d51e --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/getinnerhtml.tentative.html @@ -0,0 +1,79 @@ + +getInnerHTML + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/declarative/innerhtml-before-closing-tag.tentative.html b/testing/web-platform/tests/shadow-dom/declarative/innerhtml-before-closing-tag.tentative.html new file mode 100644 index 0000000000..e87c425860 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/innerhtml-before-closing-tag.tentative.html @@ -0,0 +1,51 @@ + +Declarative Shadow DOM innerHTML + + + + + + + + +
+ +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/declarative/innerhtml-on-ordinary-template.tentative.html b/testing/web-platform/tests/shadow-dom/declarative/innerhtml-on-ordinary-template.tentative.html new file mode 100644 index 0000000000..87260013de --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/innerhtml-on-ordinary-template.tentative.html @@ -0,0 +1,49 @@ + +Declarative Shadow DOM innerHTML + + + + + + + + +
+ + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/declarative/move-template-before-closing-tag.tentative.html b/testing/web-platform/tests/shadow-dom/declarative/move-template-before-closing-tag.tentative.html new file mode 100644 index 0000000000..a3d7806f5d --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/move-template-before-closing-tag.tentative.html @@ -0,0 +1,91 @@ + +Declarative Shadow DOM: moving the template doesn't change attachment point + + + + + + + + + + +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+ +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/declarative/script-access.tentative.html b/testing/web-platform/tests/shadow-dom/declarative/script-access.tentative.html new file mode 100644 index 0000000000..6c927b1bd7 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/script-access.tentative.html @@ -0,0 +1,120 @@ + +Declarative Shadow DOM + + + + + + + + +
+ +
+ +
+ + + + + + +
+ +
+ +
+ +
+ + diff --git a/testing/web-platform/tests/shadow-dom/declarative/support/declarative-child-frame.html b/testing/web-platform/tests/shadow-dom/declarative/support/declarative-child-frame.html new file mode 100644 index 0000000000..603c47743b --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/support/declarative-child-frame.html @@ -0,0 +1,23 @@ +
+
+
+ +
+
+
+ + diff --git a/testing/web-platform/tests/shadow-dom/declarative/support/helpers.js b/testing/web-platform/tests/shadow-dom/declarative/support/helpers.js new file mode 100644 index 0000000000..0be3add620 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/support/helpers.js @@ -0,0 +1,4 @@ +function setInnerHTML(el,content) { + const fragment = (new DOMParser()).parseFromString(`
${content}
`, 'text/html', {includeShadowRoots: true}); + (el instanceof HTMLTemplateElement ? el.content : el).replaceChildren(...fragment.body.firstChild.childNodes); +} diff --git a/testing/web-platform/tests/shadow-dom/directionality-001-ref.html b/testing/web-platform/tests/shadow-dom/directionality-001-ref.html new file mode 100644 index 0000000000..7a2eaeb868 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/directionality-001-ref.html @@ -0,0 +1,6 @@ + +CSS Test Reference + +
123 456 789 101112
+
123 456 789 101112
+
123 456 789 101112
diff --git a/testing/web-platform/tests/shadow-dom/directionality-001.tentative.html b/testing/web-platform/tests/shadow-dom/directionality-001.tentative.html new file mode 100644 index 0000000000..d96926ad65 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/directionality-001.tentative.html @@ -0,0 +1,19 @@ + +Test: directionality propagation in Shadow DOM. + + + + +
789 101112
+
789 101112
+
789 101112
+ diff --git a/testing/web-platform/tests/shadow-dom/directionality-002-ref.html b/testing/web-platform/tests/shadow-dom/directionality-002-ref.html new file mode 100644 index 0000000000..454b2fecab --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/directionality-002-ref.html @@ -0,0 +1,6 @@ + +CSS Test Reference + + + +
diff --git a/testing/web-platform/tests/shadow-dom/directionality-002.tentative.html b/testing/web-platform/tests/shadow-dom/directionality-002.tentative.html new file mode 100644 index 0000000000..7ff036194b --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/directionality-002.tentative.html @@ -0,0 +1,25 @@ + +Directionality is properly computed for slotted children + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/event-composed-path-after-dom-mutation.html b/testing/web-platform/tests/shadow-dom/event-composed-path-after-dom-mutation.html new file mode 100644 index 0000000000..fd129e036a --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/event-composed-path-after-dom-mutation.html @@ -0,0 +1,59 @@ + +Shadow DOM: Event.composedPath() should return the same result even if DOM is mutated + + + + + +
+
+ +
+
+ + + +
+
+ +
+
+ + diff --git a/testing/web-platform/tests/shadow-dom/event-composed-path-with-related-target.html b/testing/web-platform/tests/shadow-dom/event-composed-path-with-related-target.html new file mode 100644 index 0000000000..f6dff13a93 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/event-composed-path-with-related-target.html @@ -0,0 +1,258 @@ + +Shadow DOM: Event path and Event.composedPath() (with related target) + + + + + +
+
+ +
+ + + + + +
+
+ +
+
+ + + +
+
+ +
+
+ +
+
+ +
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+
+ + + +
+
+ +
+
+ + diff --git a/testing/web-platform/tests/shadow-dom/event-composed-path.html b/testing/web-platform/tests/shadow-dom/event-composed-path.html new file mode 100644 index 0000000000..8c37b1c3bd --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/event-composed-path.html @@ -0,0 +1,281 @@ + +Shadow DOM: Event path and Event.composedPath() + + + + + +
+
+
+
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+
+ + + +
+
+ +
+
+
+ + + +
+
+ +
+
+
+ + + +
+
+ +
+
+
+ + diff --git a/testing/web-platform/tests/shadow-dom/event-composed.html b/testing/web-platform/tests/shadow-dom/event-composed.html new file mode 100644 index 0000000000..2d6a5e3658 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/event-composed.html @@ -0,0 +1,81 @@ + +Shadow DOM: Event composed + + + + +
+ +
+ diff --git a/testing/web-platform/tests/shadow-dom/event-dispatch-order.tentative.html b/testing/web-platform/tests/shadow-dom/event-dispatch-order.tentative.html new file mode 100644 index 0000000000..1e88740f53 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/event-dispatch-order.tentative.html @@ -0,0 +1,30 @@ + +Shadow DOM: event dispatch order for capture and non-capture listerns at a shadow host + + + + + + +
+ +
+ diff --git a/testing/web-platform/tests/shadow-dom/event-inside-shadow-tree.html b/testing/web-platform/tests/shadow-dom/event-inside-shadow-tree.html new file mode 100644 index 0000000000..a7405a5956 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/event-inside-shadow-tree.html @@ -0,0 +1,148 @@ + + + +Shadow DOM: Firing an event inside a shadow tree + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/event-inside-slotted-node.html b/testing/web-platform/tests/shadow-dom/event-inside-slotted-node.html new file mode 100644 index 0000000000..5f8d3b93c6 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/event-inside-slotted-node.html @@ -0,0 +1,258 @@ + + + + Shadow DOM: Firing an event inside a node assigned to a slot + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/event-on-pseudo-element-crash.html b/testing/web-platform/tests/shadow-dom/event-on-pseudo-element-crash.html new file mode 100644 index 0000000000..c03f51a64f --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/event-on-pseudo-element-crash.html @@ -0,0 +1,28 @@ + + + + + + +This test passes if the renderer does not crash. + +
+ +
+ + diff --git a/testing/web-platform/tests/shadow-dom/event-post-dispatch.html b/testing/web-platform/tests/shadow-dom/event-post-dispatch.html new file mode 100644 index 0000000000..239881c7e1 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/event-post-dispatch.html @@ -0,0 +1,226 @@ + +Shadow DOM: Event dispatch post result for event properties. + + + + + + +
+
+
+
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+
+ + + +
+
+ +
+
+ +
+
+ + diff --git a/testing/web-platform/tests/shadow-dom/event-with-related-target.html b/testing/web-platform/tests/shadow-dom/event-with-related-target.html new file mode 100644 index 0000000000..77da447602 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/event-with-related-target.html @@ -0,0 +1,256 @@ + + + + Shadow DOM: Firing an event with relatedTarget inside a shadow tree + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/delegatesFocus-highlight-sibling.html b/testing/web-platform/tests/shadow-dom/focus-navigation/delegatesFocus-highlight-sibling.html new file mode 100644 index 0000000000..dde18128ad --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/delegatesFocus-highlight-sibling.html @@ -0,0 +1,126 @@ + + + + + + + + + + + + +
+ +
+
+ + +
+
+ +
+ + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-fallback-default-tabindex.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-fallback-default-tabindex.html new file mode 100644 index 0000000000..e8e0293e77 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-fallback-default-tabindex.html @@ -0,0 +1,74 @@ + + + + + + + + +

Tests for moving focus by pressing tab key across shadow boundaries.
+To manually test, press tab key six times then shift+tab seven times.
+It should traverse focusable elements in the increasing numerical order and then in the reverse order.

+ +
+
2. Assigned to slot5 whose tabindex is 2.
+ +
+ diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-fallback.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-fallback.html new file mode 100644 index 0000000000..8b29558b50 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-fallback.html @@ -0,0 +1,71 @@ + + + + + + + + +
+

+ document tree: [i0 -> [x-foo]]
+ x-foo's shadow tree: [j1 -> j2 -> [s1]]
+ slot #s1: [k1 -> [x-bar] -> k0 -> [s2] -> [s3]]
+ x-bar's shadow tree: [m1 -> m2]
+ slot #s2: [i1 -> i2]
+ slot #s3: [l1]

+ v1 ideal nav forward: [i0 -> j1 -> j2 -> k1 -> x-bar -> m1 -> m2 -> k0 -> i1 -> i2 -> l1]
+

+ + +
+ + + +
+ + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested-2levels.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested-2levels.html new file mode 100644 index 0000000000..54def5ce7e --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested-2levels.html @@ -0,0 +1,63 @@ + + + + + + + + +
+ + +
+ +
+
+ +
+
+ + + +
+ button +
+
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested-delegatesFocus.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested-delegatesFocus.html new file mode 100644 index 0000000000..94d8ce8e1f --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested-delegatesFocus.html @@ -0,0 +1,51 @@ + + + + + + + + +
+ + +
+ +
+ + +
+
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested-fallback.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested-fallback.html new file mode 100644 index 0000000000..93a6240fe3 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested-fallback.html @@ -0,0 +1,71 @@ + + + + + + + + +

Tests for moving focus by pressing tab key across shadow boundaries.
+To manually test, press tab key six times then shift+tab six times.
+It should traverse focusable elements in the increasing numerical order and then in the reverse order.

+
+ +
1. Assigned to slot2.
+
6. Assigned to slot7 which is assigned to slot6.
+
+ diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested.html new file mode 100644 index 0000000000..7bfe5dc784 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-nested.html @@ -0,0 +1,51 @@ + + + + + + + + +
+ + +
+ +
+ + +
+
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-shadow-in-fallback.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-shadow-in-fallback.html new file mode 100644 index 0000000000..7192a42584 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-shadow-in-fallback.html @@ -0,0 +1,48 @@ + + + + + + + + +
+ + +
+ +
+ + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-shadow-in-slot.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-shadow-in-slot.html new file mode 100644 index 0000000000..4f320574ed --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-shadow-in-slot.html @@ -0,0 +1,47 @@ + + + + + + + + +
+ + +
+ +
+ + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-with-tabindex.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-with-tabindex.html new file mode 100644 index 0000000000..880fb83130 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slot-with-tabindex.html @@ -0,0 +1,65 @@ + + + + + + + + +
+

+ document tree: [i0 -> [x-foo]]
+ x-foo's shadow tree: [j1 -> [s1] -> [s2] -> j2 ->[x-bar]]
+ x-bar's shadow tree: [[s3] -> k1]
+ slot #s1: [i1 -> i2]
+ slot #s2: [i3]
+ slot #s3: [l1 -> l2]

+ v1 ideal nav forward: [i0 -> j1 -> i1 -> i2 -> i3 -> j2 -> x-bar -> l1 -> l2 -> k1]
+

+ + +
+ + + + +
+ + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slots-in-slot.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slots-in-slot.html new file mode 100644 index 0000000000..5cc8abbf01 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slots-in-slot.html @@ -0,0 +1,71 @@ + + + + + + + + +

Tests for moving focus by pressing tab key across nodes in slot scope.
+ +

outside
+
+ + +
single nested slot
+
single nested slot
+
+ +
single nested slot
+
+ + +
double nested slot
+
double nested slot
+
+
+ +
single nested slot
+ +
double nested slot
+ +
Triple nested slot
+
Triple nested slot
+
+
double nested slot
+
+
single nested slot
+
+
+
outside
+ + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slots.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slots.html new file mode 100644 index 0000000000..f2de50f6eb --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-slots.html @@ -0,0 +1,67 @@ + + + + + + + + +
+

+ document tree: [i0 -> [x-foo]]
+ x-foo's shadow tree: [j1 -> [s1] -> [s2] -> j2 ->[x-bar]]
+ x-bar's shadow tree: [k1 -> [s3]]
+ slot #s1: [i1 -> i2]
+ slot #s2: [i3]
+ slot #s3: [[s4]]
+ slot #s4: [i4 -> i5]

+ v1 ideal nav forward: [i0 -> j1 -> i1 -> i2 -> i3 -> j2 -> x-bar -> k1 -> i4 -> i5]
+

+ + +
+ + + + + + +
+ + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-web-component-radio.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-web-component-radio.html new file mode 100644 index 0000000000..9304cc2ce1 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-web-component-radio.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +
OUT
+
+ A + B + +
+ C + D + +
OUT
+ + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-with-delegatesFocus.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-with-delegatesFocus.html new file mode 100644 index 0000000000..e097261526 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation-with-delegatesFocus.html @@ -0,0 +1,358 @@ + + + + + + + + + +

This tests TAB focus navigation with delegatesFocus flag on shadow hosts

+

+
+ diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation.html new file mode 100644 index 0000000000..fabcf88170 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-navigation.html @@ -0,0 +1,73 @@ + + + + + + + + +
+

+ document tree: [i0 -> [x-foo]]
+ x-foo's shadow tree: [j5 -> [x-bar] -> j6]
+ x-bar's shadow tree: [k1 -> k0 -> [s2]]
+ slot #s2: [j1 -> j2 -> j3 -> j4 -> [s1] -> j0]

+ slot #s1: [i1 -> i2]
+ v1 ideal nav forward: [i0 -> j5 -> xbar -> k1 -> k0 -> j1 -> j2 -> j3 -> j4 -> i1 -> i2 -> j0 -> j6]
+

+ + +
+ + + +
+ + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-nested-slots.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-nested-slots.html new file mode 100644 index 0000000000..8c7c1d1a80 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-nested-slots.html @@ -0,0 +1,52 @@ + + + + + + + + + + + + + +
one
+ + + +
two
+
three
+
four
+
+
+
five
+ + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-reverse-unassignable-slot.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-reverse-unassignable-slot.html new file mode 100644 index 0000000000..2eec3acc88 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-reverse-unassignable-slot.html @@ -0,0 +1,35 @@ + + + + + + + + + + + + + +
+ + + + + + + +
+ + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-reverse-unassigned-slot.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-reverse-unassigned-slot.html new file mode 100644 index 0000000000..e19ea44288 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-reverse-unassigned-slot.html @@ -0,0 +1,39 @@ + + + + + + + + +
+ + +
+ +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-unassignable-slot.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-unassignable-slot.html new file mode 100644 index 0000000000..135569d94c --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-unassignable-slot.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/focus-with-negative-index.html b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-with-negative-index.html new file mode 100644 index 0000000000..95dc98fc02 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/focus-with-negative-index.html @@ -0,0 +1,92 @@ + + + + + + + + +
+

+ document tree: [i0 -> [x-foo]]
+ x-foo's shadow tree: [j5 -> [x-bar] -> j6]
+ x-bar's shadow tree: [k1 -> k0 -> [s2]]
+ slot #s2: [j1 -> j2 -> j3 -> j4 -> [s1] -> j0]

+ slot #s1: [i1 -> i2]
+ v1 ideal nav forward: [i0 -> j5 -> xbar -> k1 -> k0 -> j6]
+

+ + +
+ + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/resources/focus-utils.js b/testing/web-platform/tests/shadow-dom/focus-navigation/resources/focus-utils.js new file mode 100644 index 0000000000..c23581a15e --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/resources/focus-utils.js @@ -0,0 +1,153 @@ +'use strict'; + +async function navigateFocusForward() { + return new test_driver.Actions() + .keyDown('\uE004') + .keyUp('\uE004') + .send(); +} + +async function navigateFocusBackward() { + return new test_driver.Actions() + .keyDown('\uE050') + .keyDown('\uE004') + .keyUp('\uE004') + .keyUp('\uE050') + .send(); +} + +// If shadow root is open, can find element using element path +// If shadow root is open, can find the shadowRoot from the element + +function innermostActiveElement(element) { + element = element || document.activeElement; + if (isIFrameElement(element)) { + if (element.contentDocument.activeElement) + return innermostActiveElement(element.contentDocument.activeElement); + return element; + } + if (isShadowHost(element)) { + let shadowRoot = element.shadowRoot; + if (shadowRoot) { + if (shadowRoot.activeElement) + return innermostActiveElement(shadowRoot.activeElement); + } + } + return element; +} + +function isInnermostActiveElement(path) { + const element = getNodeInComposedTree(path); + if (!element) + return false; + return element === innermostActiveElement(); +} + +async function shouldNavigateFocus(fromElement, direction) { + if (!fromElement) + return false; + + fromElement.focus(); + if (fromElement !== innermostActiveElement()) + return false; + + if (direction == 'forward') + await navigateFocusForward(); + else + await navigateFocusBackward(); + + return true; +} + +async function assert_focus_navigation_element(fromPath, toPath, direction) { + const fromElement = getNodeInComposedTree(fromPath); + const result = await shouldNavigateFocus(fromElement, direction); + assert_true(result, 'Failed to focus ' + fromPath); + + const message = + `Focus should move ${direction} from ${fromPath} to ${toPath}`; + const toElement = getNodeInComposedTree(toPath); + assert_equals(innermostActiveElement(), toElement, message); +} + +async function assert_focus_navigation_elements(elements, direction) { + assert_true( + elements.length >= 2, + 'length of elements should be greater than or equal to 2.'); + for (var i = 0; i + 1 < elements.length; ++i) + await assert_focus_navigation_element(elements[i], elements[i + 1], direction); + +} + +async function assert_focus_navigation_forward(elements) { + return assert_focus_navigation_elements(elements, 'forward'); +} + +async function assert_focus_navigation_backward(elements) { + return assert_focus_navigation_elements(elements, 'backward'); +} + + +// If shadow root is closed, need to pass shadowRoot and element to find +// innermost active element + +function isShadowHostOfRoot(shadowRoot, node) { + return shadowRoot && shadowRoot.host.isEqualNode(node); +} + +function innermostActiveElementWithShadowRoot(shadowRoot, element) { + element = element || document.activeElement; + if (isIFrameElement(element)) { + if (element.contentDocument.activeElement) + return innermostActiveElementWithShadowRoot(shadowRoot, element.contentDocument.activeElement); + return element; + } + if (isShadowHostOfRoot(shadowRoot, element)) { + if (shadowRoot.activeElement) + return innermostActiveElementWithShadowRoot(shadowRoot, shadowRoot.activeElement); + } + return element; +} + +async function shouldNavigateFocusWithShadowRoot(from, direction) { + const [fromElement, shadowRoot] = from; + if (!fromElement) + return false; + + fromElement.focus(); + if (fromElement !== innermostActiveElementWithShadowRoot(shadowRoot)) + return false; + + if (direction == 'forward') + await navigateFocusForward(); + else + await navigateFocusBackward(); + + return true; +} + +async function assert_focus_navigation_element_with_shadow_root(from, to, direction) { + const result = await shouldNavigateFocusWithShadowRoot(from, direction); + const [fromElement] = from; + const [toElement, toShadowRoot] = to; + assert_true(result, 'Failed to focus ' + fromElement.id); + const message = + `Focus should move ${direction} from ${fromElement.id} to ${toElement.id}`; + assert_equals(innermostActiveElementWithShadowRoot(toShadowRoot), toElement, message); +} + +async function assert_focus_navigation_elements_with_shadow_root(elements, direction) { + assert_true( + elements.length >= 2, + 'length of elements should be greater than or equal to 2.'); + for (var i = 0; i + 1 < elements.length; ++i) + await assert_focus_navigation_element_with_shadow_root(elements[i], elements[i + 1], direction); +} + +async function assert_focus_navigation_forward_with_shadow_root(elements) { + return assert_focus_navigation_elements_with_shadow_root(elements, 'forward'); +} + +async function assert_focus_navigation_backward_with_shadow_root(elements) { + return assert_focus_navigation_elements_with_shadow_root(elements, 'backward'); +} \ No newline at end of file diff --git a/testing/web-platform/tests/shadow-dom/focus-navigation/resources/shadow-dom.js b/testing/web-platform/tests/shadow-dom/focus-navigation/resources/shadow-dom.js new file mode 100644 index 0000000000..2789f05850 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-navigation/resources/shadow-dom.js @@ -0,0 +1,165 @@ +function removeWhiteSpaceOnlyTextNodes(node) { + for (var i = 0; i < node.childNodes.length; i++) { + var child = node.childNodes[i]; + if (child.nodeType === Node.TEXT_NODE && + child.nodeValue.trim().length == 0) { + node.removeChild(child); + i--; + } else if ( + child.nodeType === Node.ELEMENT_NODE || + child.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + removeWhiteSpaceOnlyTextNodes(child); + } + } + if (node.shadowRoot) { + removeWhiteSpaceOnlyTextNodes(node.shadowRoot); + } +} + +function convertTemplatesToShadowRootsWithin(node) { + var nodes = node.querySelectorAll('template'); + for (var i = 0; i < nodes.length; ++i) { + var template = nodes[i]; + var mode = template.getAttribute('data-mode'); + var delegatesFocus = template.hasAttribute('data-delegatesFocus'); + var parent = template.parentNode; + parent.removeChild(template); + var shadowRoot; + if (!mode) { + shadowRoot = parent.attachShadow({ mode: 'open' }); + } else { + shadowRoot = + parent.attachShadow({ 'mode': mode, 'delegatesFocus': delegatesFocus }); + } + var expose = template.getAttribute('data-expose-as'); + if (expose) + window[expose] = shadowRoot; + if (template.id) + shadowRoot.id = template.id; + var fragments = document.importNode(template.content, true); + shadowRoot.appendChild(fragments); + + convertTemplatesToShadowRootsWithin(shadowRoot); + } +} + +function isShadowHost(node) { + return node && node.nodeType == Node.ELEMENT_NODE && node.shadowRoot; +} + +function isIFrameElement(element) { + return element && element.nodeName == 'IFRAME'; +} + +// Returns node from shadow/iframe tree "path". +function getNodeInComposedTree(path) { + var ids = path.split('/'); + var node = document.getElementById(ids[0]); + for (var i = 1; node != null && i < ids.length; ++i) { + if (isIFrameElement(node)) + node = node.contentDocument.getElementById(ids[i]); + else if (isShadowHost(node)) + node = node.shadowRoot.getElementById(ids[i]); + else + return null; + } + return node; +} + +function createTestTree(node) { + let ids = {}; + + function attachShadowFromTemplate(template) { + let parent = template.parentNode; + parent.removeChild(template); + let shadowRoot; + if (template.getAttribute('data-slot-assignment') === 'manual') { + shadowRoot = + parent.attachShadow({ + mode: template.getAttribute('data-mode'), + slotAssignment: 'manual' + }); + } else { + shadowRoot = + parent.attachShadow({ mode: template.getAttribute('data-mode') }); + } + let id = template.id; + if (id) { + shadowRoot.id = id; + ids[id] = shadowRoot; + } + shadowRoot.appendChild(document.importNode(template.content, true)); + return shadowRoot; + } + + function walk(root) { + if (root.id) { + ids[root.id] = root; + } + for (let e of Array.from(root.querySelectorAll('[id]'))) { + ids[e.id] = e; + } + for (let e of Array.from(root.querySelectorAll('template'))) { + walk(attachShadowFromTemplate(e)); + } + } + + walk(node.cloneNode(true)); + return ids; +} + +function dispatchEventWithLog(nodes, target, event) { + function labelFor(e) { + return e.id || e.tagName; + } + + let log = []; + let attachedNodes = []; + for (let label in nodes) { + let startingNode = nodes[label]; + for (let node = startingNode; node; node = node.parentNode) { + if (attachedNodes.indexOf(node) >= 0) + continue; + let id = node.id; + if (!id) + continue; + attachedNodes.push(node); + node.addEventListener(event.type, (e) => { + // Record [currentTarget, target, relatedTarget, composedPath()] + log.push([ + id, labelFor(e.target), + e.relatedTarget ? labelFor(e.relatedTarget) : null, + e.composedPath().map((n) => { + return labelFor(n); + }) + ]); + }); + } + } + target.dispatchEvent(event); + return log; +} + +// This function assumes that testharness.js is available. +function assert_event_path_equals(actual, expected) { + assert_equals(actual.length, expected.length); + for (let i = 0; i < actual.length; ++i) { + assert_equals( + actual[i][0], expected[i][0], + 'currentTarget at ' + i + ' should be same'); + assert_equals( + actual[i][1], expected[i][1], 'target at ' + i + ' should be same'); + assert_equals( + actual[i][2], expected[i][2], + 'relatedTarget at ' + i + ' should be same'); + assert_array_equals( + actual[i][3], expected[i][3], + 'composedPath at ' + i + ' should be same'); + } +} + +function assert_background_color(path, color) { + assert_equals( + window.getComputedStyle(getNodeInComposedTree(path)).backgroundColor, + color, 'backgroundColor for ' + path + ' should be ' + color); +} diff --git a/testing/web-platform/tests/shadow-dom/focus-within-shadow.html b/testing/web-platform/tests/shadow-dom/focus-within-shadow.html new file mode 100644 index 0000000000..e65165a786 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus-within-shadow.html @@ -0,0 +1,29 @@ + + + + + + + + +
+ + Content +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus/DocumentOrShadowRoot-activeElement.html b/testing/web-platform/tests/shadow-dom/focus/DocumentOrShadowRoot-activeElement.html new file mode 100644 index 0000000000..20456b057e --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/DocumentOrShadowRoot-activeElement.html @@ -0,0 +1,92 @@ + + +HTML Test: DocumentOrShadowRoot.activeElement + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/ShadowRoot-delegatesFocus.html b/testing/web-platform/tests/shadow-dom/focus/ShadowRoot-delegatesFocus.html new file mode 100644 index 0000000000..4b7fe4e50e --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/ShadowRoot-delegatesFocus.html @@ -0,0 +1,27 @@ + + +ShadowRoot's delegatesFocus attribute + + +
+
+
+ diff --git a/testing/web-platform/tests/shadow-dom/focus/blur-on-shadow-host-delegatesFocus.html b/testing/web-platform/tests/shadow-dom/focus/blur-on-shadow-host-delegatesFocus.html new file mode 100644 index 0000000000..289b554372 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/blur-on-shadow-host-delegatesFocus.html @@ -0,0 +1,38 @@ + + +HTML Test: Blur on shadow host + + + + + +
+ +
+ + diff --git a/testing/web-platform/tests/shadow-dom/focus/click-focus-delegatesFocus-click.html b/testing/web-platform/tests/shadow-dom/focus/click-focus-delegatesFocus-click.html new file mode 100644 index 0000000000..0578c15582 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/click-focus-delegatesFocus-click.html @@ -0,0 +1,138 @@ + + +HTML Test: click on shadow host with delegatesFocus + + + + + + + +
+
slotted
+
+
outside
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus/click-focus-delegatesFocus-tabindex-varies.html b/testing/web-platform/tests/shadow-dom/focus/click-focus-delegatesFocus-tabindex-varies.html new file mode 100644 index 0000000000..4051db128a --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/click-focus-delegatesFocus-tabindex-varies.html @@ -0,0 +1,68 @@ + + +HTML Test: click on shadow host with delegatesFocus + + + + + + + +
+
slotted
+
+
outside
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus/click-focus-delegatesFocus-tabindex-zero.html b/testing/web-platform/tests/shadow-dom/focus/click-focus-delegatesFocus-tabindex-zero.html new file mode 100644 index 0000000000..5f7914f2a4 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/click-focus-delegatesFocus-tabindex-zero.html @@ -0,0 +1,68 @@ + + +HTML Test: click on shadow host with delegatesFocus + + + + + + + +
+
slotted
+
+
outside
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus/delegatesFocus-tabindex-change.html b/testing/web-platform/tests/shadow-dom/focus/delegatesFocus-tabindex-change.html new file mode 100644 index 0000000000..f159c22164 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/delegatesFocus-tabindex-change.html @@ -0,0 +1,23 @@ + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-autofocus.html b/testing/web-platform/tests/shadow-dom/focus/focus-autofocus.html new file mode 100644 index 0000000000..75a50b84c6 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-autofocus.html @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-click-on-shadow-host.html b/testing/web-platform/tests/shadow-dom/focus/focus-click-on-shadow-host.html new file mode 100644 index 0000000000..7a318a0200 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-click-on-shadow-host.html @@ -0,0 +1,40 @@ + + +HTML Test: click on shadow host with delegatesFocus + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-method-delegatesFocus-nested-browsing-context.html b/testing/web-platform/tests/shadow-dom/focus/focus-method-delegatesFocus-nested-browsing-context.html new file mode 100644 index 0000000000..d2724f17d5 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-method-delegatesFocus-nested-browsing-context.html @@ -0,0 +1,36 @@ + + +HTML Test: focus() on shadow host within an iframe with delegatesFocus + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-method-delegatesFocus.html b/testing/web-platform/tests/shadow-dom/focus/focus-method-delegatesFocus.html new file mode 100644 index 0000000000..99667029ad --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-method-delegatesFocus.html @@ -0,0 +1,312 @@ + + +HTML Test: focus() on shadow host with delegatesFocus + + + + + + + +
+
slottedToSecondSlot
+
slottedToFirstSlot
+
+
outside
+ + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-method-with-delegatesFocus.html b/testing/web-platform/tests/shadow-dom/focus/focus-method-with-delegatesFocus.html new file mode 100644 index 0000000000..8caea8ccda --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-method-with-delegatesFocus.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host.html b/testing/web-platform/tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host.html new file mode 100644 index 0000000000..34f8c01294 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host.html @@ -0,0 +1,122 @@ + + + + + + + + + + + + +
+
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1.html b/testing/web-platform/tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1.html new file mode 100644 index 0000000000..ba900d6a6d --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1.html @@ -0,0 +1,25 @@ + + + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2.html b/testing/web-platform/tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2.html new file mode 100644 index 0000000000..f119008ee3 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2.html @@ -0,0 +1,27 @@ + + + + + + + + + + + +

Test passes if there is a filled green square and no red.

+
FAIL
+ + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3.html b/testing/web-platform/tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3.html new file mode 100644 index 0000000000..e72d1b39d4 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3.html @@ -0,0 +1,26 @@ + + + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-selector-delegatesFocus.html b/testing/web-platform/tests/shadow-dom/focus/focus-selector-delegatesFocus.html new file mode 100644 index 0000000000..bbc1346a46 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-selector-delegatesFocus.html @@ -0,0 +1,92 @@ + + + + + CSS Test (Selectors): :focus behavior with shadow hosts & delegatesFocus + + + + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-shadowhost-display-none.html b/testing/web-platform/tests/shadow-dom/focus/focus-shadowhost-display-none.html new file mode 100644 index 0000000000..40f1b01f66 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-shadowhost-display-none.html @@ -0,0 +1,68 @@ + + + + +
+ diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tab-on-shadow-host.html b/testing/web-platform/tests/shadow-dom/focus/focus-tab-on-shadow-host.html new file mode 100644 index 0000000000..0dffc0157f --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tab-on-shadow-host.html @@ -0,0 +1,31 @@ + + +HTML Test: Use tab to navigate the focus to an element inside shadow host with delegatesFocus + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-negative-delegatesFocus.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-negative-delegatesFocus.html new file mode 100644 index 0000000000..356b0bb329 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-negative-delegatesFocus.html @@ -0,0 +1,34 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom that delegates focus and all tabindex=-1 in shadow tree + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-negative.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-negative.html new file mode 100644 index 0000000000..ab25ea829b --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-negative.html @@ -0,0 +1,34 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom and negative tabindex in shadow scope + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-slot-one.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-slot-one.html new file mode 100644 index 0000000000..3c9e70867c --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-slot-one.html @@ -0,0 +1,37 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom and all tabindex=0 except for one of the slot + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-delegatesFocus.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-delegatesFocus.html new file mode 100644 index 0000000000..67899cff4a --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-delegatesFocus.html @@ -0,0 +1,36 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom that delegates focus and tabindex in shadow tree varies + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-tabindex-2.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-tabindex-2.html new file mode 100644 index 0000000000..1755aaf442 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-tabindex-2.html @@ -0,0 +1,66 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom with varying tabindex values + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-tabindex-3.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-tabindex-3.html new file mode 100644 index 0000000000..e0570395ec --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-tabindex-3.html @@ -0,0 +1,80 @@ + + +HTML Test: focus - the sequential focus navigation order with nested shadow dom with varying tabindex values + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-tabindex.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-tabindex.html new file mode 100644 index 0000000000..875e5b6814 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-tabindex.html @@ -0,0 +1,36 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom with varying tabindex values + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-delegatesFocus.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-delegatesFocus.html new file mode 100644 index 0000000000..5e6ab3a90f --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-delegatesFocus.html @@ -0,0 +1,34 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom that delegates focus and all tabindex=0 + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-negative.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-negative.html new file mode 100644 index 0000000000..b491c7d237 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-negative.html @@ -0,0 +1,35 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom and negative host tabindex + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-not-set-scrollable.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-not-set-scrollable.html new file mode 100644 index 0000000000..9a12d8b8f4 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-not-set-scrollable.html @@ -0,0 +1,38 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom and scrollable/non-focusable host + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-not-set.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-not-set.html new file mode 100644 index 0000000000..f257261477 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-not-set.html @@ -0,0 +1,37 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom and non-focusable host + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-one.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-one.html new file mode 100644 index 0000000000..1aa5292997 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-one.html @@ -0,0 +1,37 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom and all tabindex=0 except host (tabindex=1) + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-scrollable.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-scrollable.html new file mode 100644 index 0000000000..fa8090ca97 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-scrollable.html @@ -0,0 +1,36 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom and host is scrollable + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero.html b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero.html new file mode 100644 index 0000000000..d8b12ed8ac --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero.html @@ -0,0 +1,35 @@ + + +HTML Test: focus - the sequential focus navigation order with shadow dom and all tabindex=0 + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/focus/resources/shadow-utils.js b/testing/web-platform/tests/shadow-dom/focus/resources/shadow-utils.js new file mode 100644 index 0000000000..8033ce0169 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/focus/resources/shadow-utils.js @@ -0,0 +1,80 @@ +// Structure: +//
+//
+// #shadowRoot +//
+// +// (slotted)
+// +// (slotted)
+//
+//
+function prepareDOM(container, delegatesFocus) { + + const aboveHost = document.createElement("div"); + aboveHost.innerText = "aboveHost"; + const host = document.createElement("div"); + host.id = "host"; + const slottedBelow = document.createElement("div"); + slottedBelow.innerText = "slotted below"; + slottedBelow.slot = "below"; + const slottedAbove = document.createElement("div"); + slottedAbove.innerText = "slotted above"; + slottedAbove.slot = "above"; + + const belowHost = document.createElement("div"); + belowHost.innerText = "belowHost"; + container.appendChild(aboveHost); + container.appendChild(host); + container.appendChild(belowHost); + host.appendChild(slottedBelow); + host.appendChild(slottedAbove); + const shadowRoot = host.attachShadow({ mode: "open", delegatesFocus: delegatesFocus}); + const aboveSlot = document.createElement("div"); + aboveSlot.innerText = "aboveSlot"; + + const slotAbove = document.createElement("slot"); + slotAbove.name = "above"; + const slotBelow = document.createElement("slot"); + slotBelow.name = "below"; + + const belowSlot = document.createElement("div"); + belowSlot.innerText = "belowSlot"; + shadowRoot.appendChild(aboveSlot); + shadowRoot.appendChild(slotAbove); + shadowRoot.appendChild(slotBelow); + shadowRoot.appendChild(belowSlot); + + return [aboveHost, host, aboveSlot, slotAbove, slottedAbove, slotBelow, slottedBelow, belowSlot, belowHost]; +} + +function setTabIndex(elements, value) { + for (const el of elements) { + el.tabIndex = value; + } +} + +function removeTabIndex(elements) { + for (const el of elements) { + el.removeAttribute("tabindex"); + } +} + +function resetFocus(root = document) { + if (root.activeElement) + root.activeElement.blur(); +} + +function navigateFocusForward() { + // TAB = '\ue004' + return test_driver.send_keys(document.body, "\ue004"); +} + +async function assertFocusOrder(expectedOrder) { + const shadowRoot = document.getElementById("host").shadowRoot; + for (const el of expectedOrder) { + await navigateFocusForward(); + const focused = shadowRoot.activeElement ? shadowRoot.activeElement : document.activeElement; + assert_equals(focused, el); + } +} diff --git a/testing/web-platform/tests/shadow-dom/form-control-form-attribute.html b/testing/web-platform/tests/shadow-dom/form-control-form-attribute.html new file mode 100644 index 0000000000..2e782b2587 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/form-control-form-attribute.html @@ -0,0 +1,80 @@ + + +Form controls' form attribute + + +
+
form
+ +
+ + diff --git a/testing/web-platform/tests/shadow-dom/getElementById-dynamic-001.html b/testing/web-platform/tests/shadow-dom/getElementById-dynamic-001.html new file mode 100644 index 0000000000..c2acda2a9c --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/getElementById-dynamic-001.html @@ -0,0 +1,23 @@ + +Shadow DOM: ShadowRoot.getElementById in shadow trees keeps working after host is removed from tree + + + + + +
+ diff --git a/testing/web-platform/tests/shadow-dom/historical.html b/testing/web-platform/tests/shadow-dom/historical.html new file mode 100644 index 0000000000..4fa8be1dbc --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/historical.html @@ -0,0 +1,25 @@ + +Shadow DOM v0 features should NOT be present + + + diff --git a/testing/web-platform/tests/shadow-dom/imperative-slot-api-crash.html b/testing/web-platform/tests/shadow-dom/imperative-slot-api-crash.html new file mode 100644 index 0000000000..b029689211 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/imperative-slot-api-crash.html @@ -0,0 +1,23 @@ + + + + + +
+
+
+This test passes if it does not crash. + diff --git a/testing/web-platform/tests/shadow-dom/imperative-slot-api-slotchange.html b/testing/web-platform/tests/shadow-dom/imperative-slot-api-slotchange.html new file mode 100644 index 0000000000..236aaea18a --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/imperative-slot-api-slotchange.html @@ -0,0 +1,394 @@ + +Shadow DOM: Imperative Slot API slotchange event + + + + + + +
+
+ +
+
+
+
+
+ + + + + +
+
+ +
+
+
+ + diff --git a/testing/web-platform/tests/shadow-dom/imperative-slot-api.html b/testing/web-platform/tests/shadow-dom/imperative-slot-api.html new file mode 100644 index 0000000000..bcf052bbab --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/imperative-slot-api.html @@ -0,0 +1,303 @@ + +Shadow DOM: Imperative Slot API + + + + + +
+
+
+
+
+ + +
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+ diff --git a/testing/web-platform/tests/shadow-dom/imperative-slot-assign-not-slotable-crash.html b/testing/web-platform/tests/shadow-dom/imperative-slot-assign-not-slotable-crash.html new file mode 100644 index 0000000000..a493eeaf00 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/imperative-slot-assign-not-slotable-crash.html @@ -0,0 +1,15 @@ + + + + +

This test passes if it does not crash.

+ + + + diff --git a/testing/web-platform/tests/shadow-dom/imperative-slot-fallback-clear.html b/testing/web-platform/tests/shadow-dom/imperative-slot-fallback-clear.html new file mode 100644 index 0000000000..5f79b4f2fa --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/imperative-slot-fallback-clear.html @@ -0,0 +1,35 @@ + +Imperative Slot API: fallback should be cleared after slot assignment + + + + + +
+
+
+
+ + diff --git a/testing/web-platform/tests/shadow-dom/imperative-slot-initial-fallback.html b/testing/web-platform/tests/shadow-dom/imperative-slot-initial-fallback.html new file mode 100644 index 0000000000..87b37aa827 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/imperative-slot-initial-fallback.html @@ -0,0 +1,31 @@ + +Imperative Slot API: intial fallback should be correctly set up + + + + + +
+
+
+
+ + diff --git a/testing/web-platform/tests/shadow-dom/imperative-slot-layout-invalidation-001-ref.html b/testing/web-platform/tests/shadow-dom/imperative-slot-layout-invalidation-001-ref.html new file mode 100644 index 0000000000..98bc61ba4d --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/imperative-slot-layout-invalidation-001-ref.html @@ -0,0 +1,5 @@ + +CSS Test Reference +
+ two +
diff --git a/testing/web-platform/tests/shadow-dom/imperative-slot-layout-invalidation-001.html b/testing/web-platform/tests/shadow-dom/imperative-slot-layout-invalidation-001.html new file mode 100644 index 0000000000..c6a579b70c --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/imperative-slot-layout-invalidation-001.html @@ -0,0 +1,27 @@ + + +Imperative slotting API: Invalidation on re-assignment + + + + +
+ one +
+ diff --git a/testing/web-platform/tests/shadow-dom/innerHTML-setter.xhtml b/testing/web-platform/tests/shadow-dom/innerHTML-setter.xhtml new file mode 100644 index 0000000000..0122707e2a --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/innerHTML-setter.xhtml @@ -0,0 +1,81 @@ + + + + Test for Shadow DOM innerHTML setter in XML + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/shadow-dom/input-element-list.html b/testing/web-platform/tests/shadow-dom/input-element-list.html new file mode 100644 index 0000000000..b571534eb0 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/input-element-list.html @@ -0,0 +1,39 @@ + + +Input.list + + +
+ +
+ diff --git a/testing/web-platform/tests/shadow-dom/input-type-radio.html b/testing/web-platform/tests/shadow-dom/input-type-radio.html new file mode 100644 index 0000000000..9c90fcf060 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/input-type-radio.html @@ -0,0 +1,73 @@ + + + + + + + +
+ diff --git a/testing/web-platform/tests/shadow-dom/invalidate-shadow-dom-crash.html b/testing/web-platform/tests/shadow-dom/invalidate-shadow-dom-crash.html new file mode 100644 index 0000000000..ebbcabf131 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/invalidate-shadow-dom-crash.html @@ -0,0 +1,12 @@ + + +
+ +