From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- ...onstructor-and-callbacks-are-held-strongly.html | 84 +++ .../CustomElementRegistry-getName.tentative.html | 46 ++ .../custom-elements/CustomElementRegistry.html | 755 +++++++++++++++++++++ ...Document-createElement-customized-builtins.html | 104 +++ .../custom-elements/Document-createElement-svg.svg | 24 + .../custom-elements/Document-createElement.html | 344 ++++++++++ ...cument-createElementNS-customized-builtins.html | 43 ++ .../custom-elements/Document-createElementNS.html | 43 ++ .../ElementInternals-accessibility.html | 80 +++ .../HTMLElement-attachInternals.html | 82 +++ ...TMLElement-constructor-customized-bulitins.html | 62 ++ .../custom-elements/HTMLElement-constructor.html | 186 +++++ .../web-platform/tests/custom-elements/META.yml | 8 + .../tests/custom-elements/WEB_FEATURES.yml | 3 + .../tests/custom-elements/adopted-callback.html | 167 +++++ .../attribute-changed-callback.html | 271 ++++++++ .../tests/custom-elements/builtin-coverage.html | 182 +++++ .../connected-callbacks-html-fragment-parsing.html | 49 ++ .../connected-callbacks-template.html | 33 + .../tests/custom-elements/connected-callbacks.html | 88 +++ .../cross-realm-callback-report-exception.html | 83 +++ .../custom-element-reaction-queue.html | 190 ++++++ .../define-customized-builtins.html | 88 +++ .../custom-element-registry/define.html | 214 ++++++ .../custom-element-registry/per-global.html | 14 + .../custom-element-registry/upgrade.html | 157 +++++ ...customized-built-in-constructor-exceptions.html | 107 +++ .../custom-elements/disconnected-callbacks.html | 93 +++ .../element-internals-aria-element-reflection.html | 172 +++++ .../element-internals-shadowroot.html | 130 ++++ ...callback-reactions-inside-another-callback.html | 223 ++++++ .../ElementInternals-NotSupportedError.html | 24 + .../form-associated/ElementInternals-form.html | 61 ++ .../form-associated/ElementInternals-labels.html | 67 ++ ...mentInternals-reportValidity-bubble-notref.html | 26 + .../ElementInternals-reportValidity-bubble.html | 29 + ...lementInternals-setFormValue-nullish-value.html | 45 ++ .../ElementInternals-setFormValue.html | 587 ++++++++++++++++ ...tInternals-target-element-is-held-strongly.html | 27 + .../ElementInternals-validation.html | 356 ++++++++++ .../form-associated/disabled-delegatesFocus.html | 56 ++ .../form-associated/fieldset-elements.html | 50 ++ .../form-associated/focusability.html | 43 ++ .../form-associated/form-associated-callback.html | 249 +++++++ .../form-associated/form-disabled-callback.html | 154 +++++ .../form-associated/form-elements-namedItem.html | 66 ++ .../form-associated/form-reset-callback.html | 58 ++ .../form-associated/label-delegatesFocus.html | 41 ++ .../tests/custom-elements/historical.html | 35 + .../newtarget-customized-builtins.html | 116 ++++ .../custom-elements/htmlconstructor/newtarget.html | 130 ++++ .../microtasks-and-constructors.html | 123 ++++ .../overwritten-customElements-global.html | 61 ++ ...onstructs-custom-element-in-document-write.html | 43 ++ ...er-constructs-custom-element-synchronously.html | 51 ++ .../parser-constructs-custom-elements-with-is.html | 51 ++ .../parser/parser-constructs-custom-elements.html | 48 ++ .../parser-custom-element-in-foreign-content.html | 28 + .../parser-fallsback-to-unknown-element.html | 91 +++ .../parser-sets-attributes-and-children.html | 95 +++ .../parser/parser-uses-constructed-element.html | 75 ++ ...rser-uses-create-an-element-for-a-token-svg.svg | 27 + .../parser-uses-registry-of-owner-document.html | 154 +++++ ...alizing-html-fragments-customized-builtins.html | 37 + ...checkpoint-before-construction-xml-parser.xhtml | 81 +++ ...m-microtask-checkpoint-before-construction.html | 143 ++++ .../custom-elements/prevent-extensions-crash.html | 15 + .../pseudo-class-defined-customized-builtins.html | 81 +++ .../pseudo-class-defined-print-ref.html | 9 + .../pseudo-class-defined-print.html | 17 + .../custom-elements/pseudo-class-defined.html | 103 +++ .../custom-elements/range-and-constructors.html | 61 ++ .../tests/custom-elements/reaction-timing.html | 113 +++ .../tests/custom-elements/reactions/Animation.html | 66 ++ .../reactions/AriaMixin-element-attributes.html | 65 ++ .../reactions/AriaMixin-string-attributes.html | 66 ++ .../tests/custom-elements/reactions/Attr.html | 23 + .../reactions/CSSStyleDeclaration.html | 89 +++ .../tests/custom-elements/reactions/ChildNode.html | 35 + .../custom-elements/reactions/DOMStringMap.html | 96 +++ .../custom-elements/reactions/DOMTokenList.html | 210 ++++++ .../tests/custom-elements/reactions/Document.html | 157 +++++ .../tests/custom-elements/reactions/Element.html | 91 +++ .../reactions/ElementContentEditable.html | 21 + .../reactions/HTMLAnchorElement.html | 32 + .../custom-elements/reactions/HTMLElement.html | 38 ++ .../reactions/HTMLOptionElement.html | 35 + .../reactions/HTMLOptionsCollection.html | 122 ++++ .../reactions/HTMLOutputElement.html | 45 ++ .../reactions/HTMLSelectElement.html | 122 ++++ .../reactions/HTMLTableElement.html | 173 +++++ .../reactions/HTMLTableRowElement.html | 34 + .../reactions/HTMLTableSectionElement.html | 45 ++ .../reactions/HTMLTitleElement.html | 35 + .../custom-elements/reactions/NamedNodeMap.html | 39 ++ .../tests/custom-elements/reactions/Node.html | 49 ++ .../custom-elements/reactions/ParentNode.html | 27 + .../tests/custom-elements/reactions/Range.html | 54 ++ .../tests/custom-elements/reactions/Selection.html | 32 + .../custom-elements/reactions/ShadowRoot.html | 52 ++ .../customized-builtins/HTMLAreaElement.html | 69 ++ .../customized-builtins/HTMLBaseElement.html | 21 + .../customized-builtins/HTMLButtonElement.html | 80 +++ .../customized-builtins/HTMLCanvasElement.html | 16 + .../customized-builtins/HTMLDataElement.html | 15 + .../customized-builtins/HTMLDetailsElement.html | 15 + .../customized-builtins/HTMLEmbedElement.html | 35 + .../customized-builtins/HTMLFieldSetElement.html | 32 + .../customized-builtins/HTMLImageElement.html | 89 +++ .../customized-builtins/HTMLInputElement.html | 66 ++ .../customized-builtins/HTMLLIElement.html | 38 ++ .../customized-builtins/HTMLLabelElement.html | 29 + .../customized-builtins/HTMLMapElement.html | 17 + .../customized-builtins/HTMLMediaElement.html | 107 +++ .../customized-builtins/HTMLMetaElement.html | 77 +++ .../customized-builtins/HTMLMeterElement.html | 55 ++ .../customized-builtins/HTMLModElement.html | 18 + .../customized-builtins/HTMLOListElement.html | 17 + .../customized-builtins/HTMLOptGroupElement.html | 38 ++ .../customized-builtins/HTMLParamElement.html | 41 ++ .../customized-builtins/HTMLProgressElement.html | 25 + .../customized-builtins/HTMLQuoteElement.html | 16 + .../customized-builtins/HTMLSlotElement.html | 15 + .../customized-builtins/HTMLSourceElement.html | 191 ++++++ .../customized-builtins/HTMLStyleElement.html | 23 + .../customized-builtins/HTMLTableCellElement.html | 63 ++ .../customized-builtins/HTMLTableColElement.html | 25 + .../customized-builtins/HTMLTimeElement.html | 15 + .../reactions/resources/reactions.js | 458 +++++++++++++ .../custom-elements/reactions/with-exceptions.html | 35 + .../resources/custom-elements-helpers.js | 276 ++++++++ .../resources/empty-html-document.html | 5 + .../resources/my-custom-element-html-document.html | 6 + .../resources/navigation-destination.html | 9 + ...ustomElementRegistry-constructor.tentative.html | 27 + ...omElementRegistry-multi-register.tentative.html | 27 + .../ShadowRoot-createElement.tentative.html | 95 +++ .../ShadowRoot-init-registry.tentative.html | 52 ++ .../ShadowRoot-innerHTML-upgrade.tentative.html | 116 ++++ .../constructor-call.tentative.html | 42 ++ ...eentry-with-different-definition.tentative.html | 137 ++++ ...registry-define-upgrade-criteria.tentative.html | 258 +++++++ ...ed-registry-define-upgrade-order.tentative.html | 217 ++++++ .../state/ElementInternals-states.html | 83 +++ .../tests/custom-elements/state/META.yml | 1 + .../tests/custom-elements/state/README.md | 2 + .../state/custom-state-set-strong-ref.html | 34 + .../state/state-css-selector-shadow-dom.html | 74 ++ .../custom-elements/state/state-css-selector.html | 104 +++ .../custom-elements/state/state-pseudo-class.html | 146 ++++ ...up-insertion-counter-construct-xml-parser.xhtml | 130 ++++ ...dynamic-markup-insertion-counter-construct.html | 117 ++++ ...up-insertion-counter-reactions-xml-parser.xhtml | 130 ++++ ...dynamic-markup-insertion-counter-reactions.html | 117 ++++ .../tests/custom-elements/upgrading.html | 258 +++++++ .../Document-importNode-customized-builtins.html | 32 + .../upgrading/Document-importNode.html | 32 + .../Node-cloneNode-customized-builtins.html | 48 ++ .../custom-elements/upgrading/Node-cloneNode.html | 206 ++++++ .../upgrading/upgrading-enqueue-reactions.html | 158 +++++ .../upgrading-parser-created-element.html | 125 ++++ .../when-defined-reentry-crash.html | 25 + .../tests/custom-elements/xhtml-crash.xhtml | 16 + 163 files changed, 14551 insertions(+) create mode 100644 testing/web-platform/tests/custom-elements/CustomElementRegistry-constructor-and-callbacks-are-held-strongly.html create mode 100644 testing/web-platform/tests/custom-elements/CustomElementRegistry-getName.tentative.html create mode 100644 testing/web-platform/tests/custom-elements/CustomElementRegistry.html create mode 100644 testing/web-platform/tests/custom-elements/Document-createElement-customized-builtins.html create mode 100644 testing/web-platform/tests/custom-elements/Document-createElement-svg.svg create mode 100644 testing/web-platform/tests/custom-elements/Document-createElement.html create mode 100644 testing/web-platform/tests/custom-elements/Document-createElementNS-customized-builtins.html create mode 100644 testing/web-platform/tests/custom-elements/Document-createElementNS.html create mode 100644 testing/web-platform/tests/custom-elements/ElementInternals-accessibility.html create mode 100644 testing/web-platform/tests/custom-elements/HTMLElement-attachInternals.html create mode 100644 testing/web-platform/tests/custom-elements/HTMLElement-constructor-customized-bulitins.html create mode 100644 testing/web-platform/tests/custom-elements/HTMLElement-constructor.html create mode 100644 testing/web-platform/tests/custom-elements/META.yml create mode 100644 testing/web-platform/tests/custom-elements/WEB_FEATURES.yml create mode 100644 testing/web-platform/tests/custom-elements/adopted-callback.html create mode 100644 testing/web-platform/tests/custom-elements/attribute-changed-callback.html create mode 100644 testing/web-platform/tests/custom-elements/builtin-coverage.html create mode 100644 testing/web-platform/tests/custom-elements/connected-callbacks-html-fragment-parsing.html create mode 100644 testing/web-platform/tests/custom-elements/connected-callbacks-template.html create mode 100644 testing/web-platform/tests/custom-elements/connected-callbacks.html create mode 100644 testing/web-platform/tests/custom-elements/cross-realm-callback-report-exception.html create mode 100644 testing/web-platform/tests/custom-elements/custom-element-reaction-queue.html create mode 100644 testing/web-platform/tests/custom-elements/custom-element-registry/define-customized-builtins.html create mode 100644 testing/web-platform/tests/custom-elements/custom-element-registry/define.html create mode 100644 testing/web-platform/tests/custom-elements/custom-element-registry/per-global.html create mode 100644 testing/web-platform/tests/custom-elements/custom-element-registry/upgrade.html create mode 100644 testing/web-platform/tests/custom-elements/customized-built-in-constructor-exceptions.html create mode 100644 testing/web-platform/tests/custom-elements/disconnected-callbacks.html create mode 100644 testing/web-platform/tests/custom-elements/element-internals-aria-element-reflection.html create mode 100644 testing/web-platform/tests/custom-elements/element-internals-shadowroot.html create mode 100644 testing/web-platform/tests/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/ElementInternals-NotSupportedError.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/ElementInternals-form.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/ElementInternals-labels.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/ElementInternals-reportValidity-bubble-notref.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/ElementInternals-reportValidity-bubble.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/ElementInternals-setFormValue-nullish-value.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/ElementInternals-setFormValue.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/ElementInternals-target-element-is-held-strongly.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/ElementInternals-validation.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/disabled-delegatesFocus.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/fieldset-elements.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/focusability.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/form-associated-callback.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/form-disabled-callback.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/form-elements-namedItem.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/form-reset-callback.html create mode 100644 testing/web-platform/tests/custom-elements/form-associated/label-delegatesFocus.html create mode 100644 testing/web-platform/tests/custom-elements/historical.html create mode 100644 testing/web-platform/tests/custom-elements/htmlconstructor/newtarget-customized-builtins.html create mode 100644 testing/web-platform/tests/custom-elements/htmlconstructor/newtarget.html create mode 100644 testing/web-platform/tests/custom-elements/microtasks-and-constructors.html create mode 100644 testing/web-platform/tests/custom-elements/overwritten-customElements-global.html create mode 100644 testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-element-in-document-write.html create mode 100644 testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-element-synchronously.html create mode 100644 testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-elements-with-is.html create mode 100644 testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-elements.html create mode 100644 testing/web-platform/tests/custom-elements/parser/parser-custom-element-in-foreign-content.html create mode 100644 testing/web-platform/tests/custom-elements/parser/parser-fallsback-to-unknown-element.html create mode 100644 testing/web-platform/tests/custom-elements/parser/parser-sets-attributes-and-children.html create mode 100644 testing/web-platform/tests/custom-elements/parser/parser-uses-constructed-element.html create mode 100644 testing/web-platform/tests/custom-elements/parser/parser-uses-create-an-element-for-a-token-svg.svg create mode 100644 testing/web-platform/tests/custom-elements/parser/parser-uses-registry-of-owner-document.html create mode 100644 testing/web-platform/tests/custom-elements/parser/serializing-html-fragments-customized-builtins.html create mode 100644 testing/web-platform/tests/custom-elements/perform-microtask-checkpoint-before-construction-xml-parser.xhtml create mode 100644 testing/web-platform/tests/custom-elements/perform-microtask-checkpoint-before-construction.html create mode 100644 testing/web-platform/tests/custom-elements/prevent-extensions-crash.html create mode 100644 testing/web-platform/tests/custom-elements/pseudo-class-defined-customized-builtins.html create mode 100644 testing/web-platform/tests/custom-elements/pseudo-class-defined-print-ref.html create mode 100644 testing/web-platform/tests/custom-elements/pseudo-class-defined-print.html create mode 100644 testing/web-platform/tests/custom-elements/pseudo-class-defined.html create mode 100644 testing/web-platform/tests/custom-elements/range-and-constructors.html create mode 100644 testing/web-platform/tests/custom-elements/reaction-timing.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/Animation.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/AriaMixin-element-attributes.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/AriaMixin-string-attributes.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/Attr.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/CSSStyleDeclaration.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/ChildNode.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/DOMStringMap.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/DOMTokenList.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/Document.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/Element.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/ElementContentEditable.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/HTMLAnchorElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/HTMLElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/HTMLOptionElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/HTMLOptionsCollection.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/HTMLOutputElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/HTMLSelectElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/HTMLTableElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/HTMLTableRowElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/HTMLTableSectionElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/HTMLTitleElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/NamedNodeMap.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/Node.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/ParentNode.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/Range.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/Selection.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/ShadowRoot.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLAreaElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLBaseElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLButtonElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLCanvasElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLDataElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLDetailsElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLEmbedElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLFieldSetElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLImageElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLInputElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLLIElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLLabelElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMapElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMediaElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMetaElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMeterElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLModElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLOListElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLOptGroupElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLParamElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLProgressElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLQuoteElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLSlotElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLSourceElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLStyleElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLTableCellElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLTableColElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLTimeElement.html create mode 100644 testing/web-platform/tests/custom-elements/reactions/resources/reactions.js create mode 100644 testing/web-platform/tests/custom-elements/reactions/with-exceptions.html create mode 100644 testing/web-platform/tests/custom-elements/resources/custom-elements-helpers.js create mode 100644 testing/web-platform/tests/custom-elements/resources/empty-html-document.html create mode 100644 testing/web-platform/tests/custom-elements/resources/my-custom-element-html-document.html create mode 100644 testing/web-platform/tests/custom-elements/resources/navigation-destination.html create mode 100644 testing/web-platform/tests/custom-elements/scoped-registry/CustomElementRegistry-constructor.tentative.html create mode 100644 testing/web-platform/tests/custom-elements/scoped-registry/CustomElementRegistry-multi-register.tentative.html create mode 100644 testing/web-platform/tests/custom-elements/scoped-registry/ShadowRoot-createElement.tentative.html create mode 100644 testing/web-platform/tests/custom-elements/scoped-registry/ShadowRoot-init-registry.tentative.html create mode 100644 testing/web-platform/tests/custom-elements/scoped-registry/ShadowRoot-innerHTML-upgrade.tentative.html create mode 100644 testing/web-platform/tests/custom-elements/scoped-registry/constructor-call.tentative.html create mode 100644 testing/web-platform/tests/custom-elements/scoped-registry/constructor-reentry-with-different-definition.tentative.html create mode 100644 testing/web-platform/tests/custom-elements/scoped-registry/scoped-registry-define-upgrade-criteria.tentative.html create mode 100644 testing/web-platform/tests/custom-elements/scoped-registry/scoped-registry-define-upgrade-order.tentative.html create mode 100644 testing/web-platform/tests/custom-elements/state/ElementInternals-states.html create mode 100644 testing/web-platform/tests/custom-elements/state/META.yml create mode 100644 testing/web-platform/tests/custom-elements/state/README.md create mode 100644 testing/web-platform/tests/custom-elements/state/custom-state-set-strong-ref.html create mode 100644 testing/web-platform/tests/custom-elements/state/state-css-selector-shadow-dom.html create mode 100644 testing/web-platform/tests/custom-elements/state/state-css-selector.html create mode 100644 testing/web-platform/tests/custom-elements/state/state-pseudo-class.html create mode 100644 testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-construct-xml-parser.xhtml create mode 100644 testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html create mode 100644 testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions-xml-parser.xhtml create mode 100644 testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html create mode 100644 testing/web-platform/tests/custom-elements/upgrading.html create mode 100644 testing/web-platform/tests/custom-elements/upgrading/Document-importNode-customized-builtins.html create mode 100644 testing/web-platform/tests/custom-elements/upgrading/Document-importNode.html create mode 100644 testing/web-platform/tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html create mode 100644 testing/web-platform/tests/custom-elements/upgrading/Node-cloneNode.html create mode 100644 testing/web-platform/tests/custom-elements/upgrading/upgrading-enqueue-reactions.html create mode 100644 testing/web-platform/tests/custom-elements/upgrading/upgrading-parser-created-element.html create mode 100644 testing/web-platform/tests/custom-elements/when-defined-reentry-crash.html create mode 100644 testing/web-platform/tests/custom-elements/xhtml-crash.xhtml (limited to 'testing/web-platform/tests/custom-elements') diff --git a/testing/web-platform/tests/custom-elements/CustomElementRegistry-constructor-and-callbacks-are-held-strongly.html b/testing/web-platform/tests/custom-elements/CustomElementRegistry-constructor-and-callbacks-are-held-strongly.html new file mode 100644 index 0000000000..fb6af32fe1 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/CustomElementRegistry-constructor-and-callbacks-are-held-strongly.html @@ -0,0 +1,84 @@ + + +CustomElementInterface holds constructors and callbacks strongly, preventing them from being GCed if there are no other references + + + + + + +
+ + diff --git a/testing/web-platform/tests/custom-elements/CustomElementRegistry-getName.tentative.html b/testing/web-platform/tests/custom-elements/CustomElementRegistry-getName.tentative.html new file mode 100644 index 0000000000..9bd43d5108 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/CustomElementRegistry-getName.tentative.html @@ -0,0 +1,46 @@ + +Custom Elements: CustomElementRegistry.getName function + + + + + diff --git a/testing/web-platform/tests/custom-elements/CustomElementRegistry.html b/testing/web-platform/tests/custom-elements/CustomElementRegistry.html new file mode 100644 index 0000000000..5b75fc651f --- /dev/null +++ b/testing/web-platform/tests/custom-elements/CustomElementRegistry.html @@ -0,0 +1,755 @@ + + + +Custom Elements: CustomElementRegistry interface + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/Document-createElement-customized-builtins.html b/testing/web-platform/tests/custom-elements/Document-createElement-customized-builtins.html new file mode 100644 index 0000000000..779b8affcb --- /dev/null +++ b/testing/web-platform/tests/custom-elements/Document-createElement-customized-builtins.html @@ -0,0 +1,104 @@ + + + +Custom Elements: document.createElement should create a customized builtin element with synchronous custom elements flag set + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/Document-createElement-svg.svg b/testing/web-platform/tests/custom-elements/Document-createElement-svg.svg new file mode 100644 index 0000000000..0b53bd830f --- /dev/null +++ b/testing/web-platform/tests/custom-elements/Document-createElement-svg.svg @@ -0,0 +1,24 @@ + + +document.createElement in SVG for custom elements + + + + diff --git a/testing/web-platform/tests/custom-elements/Document-createElement.html b/testing/web-platform/tests/custom-elements/Document-createElement.html new file mode 100644 index 0000000000..7772f36e20 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/Document-createElement.html @@ -0,0 +1,344 @@ + + + +Custom Elements: document.createElement should create an element with synchronous custom elements flag set + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/Document-createElementNS-customized-builtins.html b/testing/web-platform/tests/custom-elements/Document-createElementNS-customized-builtins.html new file mode 100644 index 0000000000..ce7ab4aa22 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/Document-createElementNS-customized-builtins.html @@ -0,0 +1,43 @@ + +Custom Elements: document.createElementNS should support custom elements + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/Document-createElementNS.html b/testing/web-platform/tests/custom-elements/Document-createElementNS.html new file mode 100644 index 0000000000..bf937df0ba --- /dev/null +++ b/testing/web-platform/tests/custom-elements/Document-createElementNS.html @@ -0,0 +1,43 @@ + +Custom Elements: document.createElementNS should support custom elements + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/ElementInternals-accessibility.html b/testing/web-platform/tests/custom-elements/ElementInternals-accessibility.html new file mode 100644 index 0000000000..8a8f1c9aea --- /dev/null +++ b/testing/web-platform/tests/custom-elements/ElementInternals-accessibility.html @@ -0,0 +1,80 @@ + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/HTMLElement-attachInternals.html b/testing/web-platform/tests/custom-elements/HTMLElement-attachInternals.html new file mode 100644 index 0000000000..43ea55a67e --- /dev/null +++ b/testing/web-platform/tests/custom-elements/HTMLElement-attachInternals.html @@ -0,0 +1,82 @@ + + + + + +
+ + diff --git a/testing/web-platform/tests/custom-elements/HTMLElement-constructor-customized-bulitins.html b/testing/web-platform/tests/custom-elements/HTMLElement-constructor-customized-bulitins.html new file mode 100644 index 0000000000..9244dfe4ad --- /dev/null +++ b/testing/web-platform/tests/custom-elements/HTMLElement-constructor-customized-bulitins.html @@ -0,0 +1,62 @@ + + + +Custom Elements: HTMLElement must allow subclassing + + + + + + + +
+ + + + diff --git a/testing/web-platform/tests/custom-elements/HTMLElement-constructor.html b/testing/web-platform/tests/custom-elements/HTMLElement-constructor.html new file mode 100644 index 0000000000..a387a1239a --- /dev/null +++ b/testing/web-platform/tests/custom-elements/HTMLElement-constructor.html @@ -0,0 +1,186 @@ + + + +Custom Elements: HTMLElement must allow subclassing + + + + + + + +
+ + + + diff --git a/testing/web-platform/tests/custom-elements/META.yml b/testing/web-platform/tests/custom-elements/META.yml new file mode 100644 index 0000000000..e30f6fc97f --- /dev/null +++ b/testing/web-platform/tests/custom-elements/META.yml @@ -0,0 +1,8 @@ +spec: https://html.spec.whatwg.org/multipage/custom-elements.html +suggested_reviewers: + - snuggs + - domenic + - hayatoito + - kojiishi + - rniwa + - takayoshikochi diff --git a/testing/web-platform/tests/custom-elements/WEB_FEATURES.yml b/testing/web-platform/tests/custom-elements/WEB_FEATURES.yml new file mode 100644 index 0000000000..37708a919e --- /dev/null +++ b/testing/web-platform/tests/custom-elements/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: custom-elements + files: "**" diff --git a/testing/web-platform/tests/custom-elements/adopted-callback.html b/testing/web-platform/tests/custom-elements/adopted-callback.html new file mode 100644 index 0000000000..1ed4634dba --- /dev/null +++ b/testing/web-platform/tests/custom-elements/adopted-callback.html @@ -0,0 +1,167 @@ + + + +Custom Elements: adoptedCallback + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/attribute-changed-callback.html b/testing/web-platform/tests/custom-elements/attribute-changed-callback.html new file mode 100644 index 0000000000..db2a01196a --- /dev/null +++ b/testing/web-platform/tests/custom-elements/attribute-changed-callback.html @@ -0,0 +1,271 @@ + + + +Custom Elements: attributeChangedCallback + + + + + + + + +
+ + + + diff --git a/testing/web-platform/tests/custom-elements/builtin-coverage.html b/testing/web-platform/tests/custom-elements/builtin-coverage.html new file mode 100644 index 0000000000..e3001a2c48 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/builtin-coverage.html @@ -0,0 +1,182 @@ + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/connected-callbacks-html-fragment-parsing.html b/testing/web-platform/tests/custom-elements/connected-callbacks-html-fragment-parsing.html new file mode 100644 index 0000000000..f24cc209c8 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/connected-callbacks-html-fragment-parsing.html @@ -0,0 +1,49 @@ + + + +Custom Elements: the HTML fragment parsing algorithm must not create a custom element synchronously + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/connected-callbacks-template.html b/testing/web-platform/tests/custom-elements/connected-callbacks-template.html new file mode 100644 index 0000000000..ed404332db --- /dev/null +++ b/testing/web-platform/tests/custom-elements/connected-callbacks-template.html @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/connected-callbacks.html b/testing/web-platform/tests/custom-elements/connected-callbacks.html new file mode 100644 index 0000000000..d6e68262a8 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/connected-callbacks.html @@ -0,0 +1,88 @@ + + + +Custom Elements: connectedCallback + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/cross-realm-callback-report-exception.html b/testing/web-platform/tests/custom-elements/cross-realm-callback-report-exception.html new file mode 100644 index 0000000000..3067a7af9d --- /dev/null +++ b/testing/web-platform/tests/custom-elements/cross-realm-callback-report-exception.html @@ -0,0 +1,83 @@ + + +Exceptions raised in constructors / lifecycle callbacks are reported in their global objects + + + + + + diff --git a/testing/web-platform/tests/custom-elements/custom-element-reaction-queue.html b/testing/web-platform/tests/custom-elements/custom-element-reaction-queue.html new file mode 100644 index 0000000000..246b15a0af --- /dev/null +++ b/testing/web-platform/tests/custom-elements/custom-element-reaction-queue.html @@ -0,0 +1,190 @@ + + + +Custom Elements: Each element must have its own custom element reaction queue + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/custom-element-registry/define-customized-builtins.html b/testing/web-platform/tests/custom-elements/custom-element-registry/define-customized-builtins.html new file mode 100644 index 0000000000..b691033871 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/custom-element-registry/define-customized-builtins.html @@ -0,0 +1,88 @@ + +Custom Elements: Element Definition Customized Builtins + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/custom-element-registry/define.html b/testing/web-platform/tests/custom-elements/custom-element-registry/define.html new file mode 100644 index 0000000000..d3d923bd91 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/custom-element-registry/define.html @@ -0,0 +1,214 @@ + +Custom Elements: Element definition + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/custom-element-registry/per-global.html b/testing/web-platform/tests/custom-elements/custom-element-registry/per-global.html new file mode 100644 index 0000000000..3570dcf811 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/custom-element-registry/per-global.html @@ -0,0 +1,14 @@ + + +Custom Elements: CustomElementRegistry is per global + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/custom-element-registry/upgrade.html b/testing/web-platform/tests/custom-elements/custom-element-registry/upgrade.html new file mode 100644 index 0000000000..e020d95a57 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/custom-element-registry/upgrade.html @@ -0,0 +1,157 @@ + + +customElements.upgrade() + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/customized-built-in-constructor-exceptions.html b/testing/web-platform/tests/custom-elements/customized-built-in-constructor-exceptions.html new file mode 100644 index 0000000000..fbc1a6fd87 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/customized-built-in-constructor-exceptions.html @@ -0,0 +1,107 @@ + +Customized built-in element constructor behavior + + + + + + +

+ + + + + + + + + +
+ + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/disconnected-callbacks.html b/testing/web-platform/tests/custom-elements/disconnected-callbacks.html new file mode 100644 index 0000000000..7f5a4d0f8e --- /dev/null +++ b/testing/web-platform/tests/custom-elements/disconnected-callbacks.html @@ -0,0 +1,93 @@ + + + +Custom Elements: disconnectedCallback + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/element-internals-aria-element-reflection.html b/testing/web-platform/tests/custom-elements/element-internals-aria-element-reflection.html new file mode 100644 index 0000000000..76905a93bd --- /dev/null +++ b/testing/web-platform/tests/custom-elements/element-internals-aria-element-reflection.html @@ -0,0 +1,172 @@ + + + + + Element Reflection for aria-activedescendant and aria-errormessage on ElementInternals + + + + + + + + + + +
Active descendant
+
Controls
+
Described by
+
Details
+
Error message
+
Flow to
+
Labelled By
+
Owns
+ + + + +
+
+
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/custom-elements/element-internals-shadowroot.html b/testing/web-platform/tests/custom-elements/element-internals-shadowroot.html new file mode 100644 index 0000000000..7ec0896244 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/element-internals-shadowroot.html @@ -0,0 +1,130 @@ + + +ElementInternals.shadowRoot + + + + + + diff --git a/testing/web-platform/tests/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html b/testing/web-platform/tests/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html new file mode 100644 index 0000000000..2fd932f29a --- /dev/null +++ b/testing/web-platform/tests/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html @@ -0,0 +1,223 @@ + + + +Custom Elements: must enqueue an element on the appropriate element queue after checking callback is null and the attribute name + + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-NotSupportedError.html b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-NotSupportedError.html new file mode 100644 index 0000000000..51be7183c1 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-NotSupportedError.html @@ -0,0 +1,24 @@ + + + + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-form.html b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-form.html new file mode 100644 index 0000000000..fd9363b450 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-form.html @@ -0,0 +1,61 @@ + +form attribute of ElementInternals + + + + + + +
+ + +
+ + + + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-labels.html b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-labels.html new file mode 100644 index 0000000000..b27be5f2fc --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-labels.html @@ -0,0 +1,67 @@ + +labels attribute of ElementInternals, and label association + + + +
+ + diff --git a/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-reportValidity-bubble-notref.html b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-reportValidity-bubble-notref.html new file mode 100644 index 0000000000..dda2332965 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-reportValidity-bubble-notref.html @@ -0,0 +1,26 @@ + +Both focusable and unfocusable custom elements can show validation bubbles + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-reportValidity-bubble.html b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-reportValidity-bubble.html new file mode 100644 index 0000000000..adad00d90e --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-reportValidity-bubble.html @@ -0,0 +1,29 @@ + +Both focusable and unfocusable custom elements can show validation bubbles + + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-setFormValue-nullish-value.html b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-setFormValue-nullish-value.html new file mode 100644 index 0000000000..28c12c4600 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-setFormValue-nullish-value.html @@ -0,0 +1,45 @@ + + + + ElementInternals.setFormValue(nullish value) should clear submission value + + + + + + +
+ +
+ +
+ +
+ + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-setFormValue.html b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-setFormValue.html new file mode 100644 index 0000000000..8a13973f08 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-setFormValue.html @@ -0,0 +1,587 @@ + + + + +
+ diff --git a/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-target-element-is-held-strongly.html b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-target-element-is-held-strongly.html new file mode 100644 index 0000000000..714f929e06 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-target-element-is-held-strongly.html @@ -0,0 +1,27 @@ + +Target element of ElementsInternals is held strongly and doesn't get GCed if there are no other references + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-validation.html b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-validation.html new file mode 100644 index 0000000000..8114a5dbd8 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/ElementInternals-validation.html @@ -0,0 +1,356 @@ + +Form validation features of ElementInternals, and :valid :invalid pseudo classes + + + +
+ + diff --git a/testing/web-platform/tests/custom-elements/form-associated/disabled-delegatesFocus.html b/testing/web-platform/tests/custom-elements/form-associated/disabled-delegatesFocus.html new file mode 100644 index 0000000000..3f2b765a63 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/disabled-delegatesFocus.html @@ -0,0 +1,56 @@ + + +delegatesFocus on disabled form-associated custom elements + + + + + + + +
+ Text +
+ + diff --git a/testing/web-platform/tests/custom-elements/form-associated/fieldset-elements.html b/testing/web-platform/tests/custom-elements/form-associated/fieldset-elements.html new file mode 100644 index 0000000000..dc42a57b70 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/fieldset-elements.html @@ -0,0 +1,50 @@ + + + + + + + +
+
+ + +
+ + + +
+
+ + + + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/focusability.html b/testing/web-platform/tests/custom-elements/form-associated/focusability.html new file mode 100644 index 0000000000..cc12b7d51b --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/focusability.html @@ -0,0 +1,43 @@ + +Focusability of form-associated custom elements + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/form-associated-callback.html b/testing/web-platform/tests/custom-elements/form-associated/form-associated-callback.html new file mode 100644 index 0000000000..7feec50fef --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/form-associated-callback.html @@ -0,0 +1,249 @@ + +formAssociatedCallback, and form IDL attribute of ElementInternals + + + + +
+ +
+
+ + + +
+
+ +
+ +
+ + +
+
+ + + +
+
+
+ + + + +
+ + + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/form-disabled-callback.html b/testing/web-platform/tests/custom-elements/form-associated/form-disabled-callback.html new file mode 100644 index 0000000000..a30b678f13 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/form-disabled-callback.html @@ -0,0 +1,154 @@ + +formDisabledCallback, and :disabled :enabled pseudo classes + + + + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/form-elements-namedItem.html b/testing/web-platform/tests/custom-elements/form-associated/form-elements-namedItem.html new file mode 100644 index 0000000000..ab39422b5e --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/form-elements-namedItem.html @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/form-reset-callback.html b/testing/web-platform/tests/custom-elements/form-associated/form-reset-callback.html new file mode 100644 index 0000000000..8b8497f8b6 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/form-reset-callback.html @@ -0,0 +1,58 @@ + + + + + + diff --git a/testing/web-platform/tests/custom-elements/form-associated/label-delegatesFocus.html b/testing/web-platform/tests/custom-elements/form-associated/label-delegatesFocus.html new file mode 100644 index 0000000000..74d31363c9 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/form-associated/label-delegatesFocus.html @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/historical.html b/testing/web-platform/tests/custom-elements/historical.html new file mode 100644 index 0000000000..5a961b13ad --- /dev/null +++ b/testing/web-platform/tests/custom-elements/historical.html @@ -0,0 +1,35 @@ + +Custom Elements v0 features + + + diff --git a/testing/web-platform/tests/custom-elements/htmlconstructor/newtarget-customized-builtins.html b/testing/web-platform/tests/custom-elements/htmlconstructor/newtarget-customized-builtins.html new file mode 100644 index 0000000000..60c63936d4 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/htmlconstructor/newtarget-customized-builtins.html @@ -0,0 +1,116 @@ + +Custom Elements: [HTMLConstructor] derives prototype from NewTarget + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/htmlconstructor/newtarget.html b/testing/web-platform/tests/custom-elements/htmlconstructor/newtarget.html new file mode 100644 index 0000000000..b6e7f34537 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/htmlconstructor/newtarget.html @@ -0,0 +1,130 @@ + +Custom Elements: [HTMLConstructor] derives prototype from NewTarget + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/microtasks-and-constructors.html b/testing/web-platform/tests/custom-elements/microtasks-and-constructors.html new file mode 100644 index 0000000000..78d2cba42c --- /dev/null +++ b/testing/web-platform/tests/custom-elements/microtasks-and-constructors.html @@ -0,0 +1,123 @@ + +Custom elements: performing a microtask checkpoint after construction + + + + + + + +
+ + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/overwritten-customElements-global.html b/testing/web-platform/tests/custom-elements/overwritten-customElements-global.html new file mode 100644 index 0000000000..dcb97b6652 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/overwritten-customElements-global.html @@ -0,0 +1,61 @@ + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-element-in-document-write.html b/testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-element-in-document-write.html new file mode 100644 index 0000000000..14c830b9ba --- /dev/null +++ b/testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-element-in-document-write.html @@ -0,0 +1,43 @@ + + + +Custom Elements: Changes to the HTML parser + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-element-synchronously.html b/testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-element-synchronously.html new file mode 100644 index 0000000000..206aa17f20 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-element-synchronously.html @@ -0,0 +1,51 @@ + + + +Custom Elements: Changes to the HTML parser + + + + + + + + +
+ +
+ + +
+
+ + + diff --git a/testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-elements-with-is.html b/testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-elements-with-is.html new file mode 100644 index 0000000000..96c00278a3 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-elements-with-is.html @@ -0,0 +1,51 @@ + + + +Custom Elements: Changes to the HTML parser + + + + + + + + +
+ + + + + + diff --git a/testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-elements.html b/testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-elements.html new file mode 100644 index 0000000000..3f13c50a0e --- /dev/null +++ b/testing/web-platform/tests/custom-elements/parser/parser-constructs-custom-elements.html @@ -0,0 +1,48 @@ + + + +Custom Elements: Changes to the HTML parser + + + + + + + + +
+ + + + + + diff --git a/testing/web-platform/tests/custom-elements/parser/parser-custom-element-in-foreign-content.html b/testing/web-platform/tests/custom-elements/parser/parser-custom-element-in-foreign-content.html new file mode 100644 index 0000000000..2ae0f1309c --- /dev/null +++ b/testing/web-platform/tests/custom-elements/parser/parser-custom-element-in-foreign-content.html @@ -0,0 +1,28 @@ + +Custom Elements: Custom element in foreign content + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/parser/parser-fallsback-to-unknown-element.html b/testing/web-platform/tests/custom-elements/parser/parser-fallsback-to-unknown-element.html new file mode 100644 index 0000000000..82e970f1ae --- /dev/null +++ b/testing/web-platform/tests/custom-elements/parser/parser-fallsback-to-unknown-element.html @@ -0,0 +1,91 @@ + + + +Custom Elements: Changes to the HTML parser + + + + + + + + +
+ + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/parser/parser-sets-attributes-and-children.html b/testing/web-platform/tests/custom-elements/parser/parser-sets-attributes-and-children.html new file mode 100644 index 0000000000..987bf8525f --- /dev/null +++ b/testing/web-platform/tests/custom-elements/parser/parser-sets-attributes-and-children.html @@ -0,0 +1,95 @@ + + + +Custom Elements: Changes to the HTML parser + + + + + + + + + + +
+ +hello world + + + diff --git a/testing/web-platform/tests/custom-elements/parser/parser-uses-constructed-element.html b/testing/web-platform/tests/custom-elements/parser/parser-uses-constructed-element.html new file mode 100644 index 0000000000..dd98f15cd9 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/parser/parser-uses-constructed-element.html @@ -0,0 +1,75 @@ + + + +Custom Elements: HTML parser must construct a custom element instead of upgrading + + + + + + + + +
+ + + + + + diff --git a/testing/web-platform/tests/custom-elements/parser/parser-uses-create-an-element-for-a-token-svg.svg b/testing/web-platform/tests/custom-elements/parser/parser-uses-create-an-element-for-a-token-svg.svg new file mode 100644 index 0000000000..526de0f63f --- /dev/null +++ b/testing/web-platform/tests/custom-elements/parser/parser-uses-create-an-element-for-a-token-svg.svg @@ -0,0 +1,27 @@ + + +XML parser should use "create an element for a token" + + + + + +
+
diff --git a/testing/web-platform/tests/custom-elements/parser/parser-uses-registry-of-owner-document.html b/testing/web-platform/tests/custom-elements/parser/parser-uses-registry-of-owner-document.html new file mode 100644 index 0000000000..bb256da295 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/parser/parser-uses-registry-of-owner-document.html @@ -0,0 +1,154 @@ + + + +Custom Elements: HTML parser must use the owner document's custom element registry + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/parser/serializing-html-fragments-customized-builtins.html b/testing/web-platform/tests/custom-elements/parser/serializing-html-fragments-customized-builtins.html new file mode 100644 index 0000000000..6992dd6df6 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/parser/serializing-html-fragments-customized-builtins.html @@ -0,0 +1,37 @@ + + + + + +
+ + diff --git a/testing/web-platform/tests/custom-elements/perform-microtask-checkpoint-before-construction-xml-parser.xhtml b/testing/web-platform/tests/custom-elements/perform-microtask-checkpoint-before-construction-xml-parser.xhtml new file mode 100644 index 0000000000..63bb1d143f --- /dev/null +++ b/testing/web-platform/tests/custom-elements/perform-microtask-checkpoint-before-construction-xml-parser.xhtml @@ -0,0 +1,81 @@ + + + +Custom Elements: create an element for a token must perform a microtask checkpoint + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/perform-microtask-checkpoint-before-construction.html b/testing/web-platform/tests/custom-elements/perform-microtask-checkpoint-before-construction.html new file mode 100644 index 0000000000..83d823ad9f --- /dev/null +++ b/testing/web-platform/tests/custom-elements/perform-microtask-checkpoint-before-construction.html @@ -0,0 +1,143 @@ + + + +Custom Elements: create an element for a token must perform a microtask checkpoint + + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/prevent-extensions-crash.html b/testing/web-platform/tests/custom-elements/prevent-extensions-crash.html new file mode 100644 index 0000000000..ae8b96b413 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/prevent-extensions-crash.html @@ -0,0 +1,15 @@ + + +Check for crash at step #12 of HTML Constructors + + + + + + + + +This test passes if it does not crash. diff --git a/testing/web-platform/tests/custom-elements/pseudo-class-defined-customized-builtins.html b/testing/web-platform/tests/custom-elements/pseudo-class-defined-customized-builtins.html new file mode 100644 index 0000000000..cab343533a --- /dev/null +++ b/testing/web-platform/tests/custom-elements/pseudo-class-defined-customized-builtins.html @@ -0,0 +1,81 @@ + + + + + + diff --git a/testing/web-platform/tests/custom-elements/pseudo-class-defined-print-ref.html b/testing/web-platform/tests/custom-elements/pseudo-class-defined-print-ref.html new file mode 100644 index 0000000000..1ed6da5958 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/pseudo-class-defined-print-ref.html @@ -0,0 +1,9 @@ + + +
diff --git a/testing/web-platform/tests/custom-elements/pseudo-class-defined-print.html b/testing/web-platform/tests/custom-elements/pseudo-class-defined-print.html new file mode 100644 index 0000000000..24e1bb7b03 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/pseudo-class-defined-print.html @@ -0,0 +1,17 @@ + + + + + diff --git a/testing/web-platform/tests/custom-elements/pseudo-class-defined.html b/testing/web-platform/tests/custom-elements/pseudo-class-defined.html new file mode 100644 index 0000000000..89d027adaf --- /dev/null +++ b/testing/web-platform/tests/custom-elements/pseudo-class-defined.html @@ -0,0 +1,103 @@ + + + + + + diff --git a/testing/web-platform/tests/custom-elements/range-and-constructors.html b/testing/web-platform/tests/custom-elements/range-and-constructors.html new file mode 100644 index 0000000000..cc51424851 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/range-and-constructors.html @@ -0,0 +1,61 @@ + + + +Custom elements: Range APIs should invoke constructor in tree order + + + + + + + + + +
+ + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reaction-timing.html b/testing/web-platform/tests/custom-elements/reaction-timing.html new file mode 100644 index 0000000000..454cc26c0f --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reaction-timing.html @@ -0,0 +1,113 @@ + + + +Custom Elements: Custom element reactions must be invoked before returning to author scripts + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/Animation.html b/testing/web-platform/tests/custom-elements/reactions/Animation.html new file mode 100644 index 0000000000..f8d3bb86ed --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/Animation.html @@ -0,0 +1,66 @@ + + + +Custom Elements: CEReactions on Element interface + + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/AriaMixin-element-attributes.html b/testing/web-platform/tests/custom-elements/reactions/AriaMixin-element-attributes.html new file mode 100644 index 0000000000..eec6dee03b --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/AriaMixin-element-attributes.html @@ -0,0 +1,65 @@ + + + +Custom Elements: CEReactions on Element interface + + + + + + + + + + +
+
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/AriaMixin-string-attributes.html b/testing/web-platform/tests/custom-elements/reactions/AriaMixin-string-attributes.html new file mode 100644 index 0000000000..f71bf2daa9 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/AriaMixin-string-attributes.html @@ -0,0 +1,66 @@ + + + +Custom Elements: CEReactions on Element interface + + + + + + + + + + +
+
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/Attr.html b/testing/web-platform/tests/custom-elements/reactions/Attr.html new file mode 100644 index 0000000000..c9fa37f961 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/Attr.html @@ -0,0 +1,23 @@ + + + +Custom Elements: CEReactions on Attr interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/CSSStyleDeclaration.html b/testing/web-platform/tests/custom-elements/reactions/CSSStyleDeclaration.html new file mode 100644 index 0000000000..95274d8c75 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/CSSStyleDeclaration.html @@ -0,0 +1,89 @@ + + + +Custom Elements: CEReactions on CSSStyleDeclaration interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/ChildNode.html b/testing/web-platform/tests/custom-elements/reactions/ChildNode.html new file mode 100644 index 0000000000..f808b67a80 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/ChildNode.html @@ -0,0 +1,35 @@ + + + +Custom Elements: CEReactions on ChildNode interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/DOMStringMap.html b/testing/web-platform/tests/custom-elements/reactions/DOMStringMap.html new file mode 100644 index 0000000000..5e34dfe2ba --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/DOMStringMap.html @@ -0,0 +1,96 @@ + + + +Custom Elements: CEReactions on DOMStringMap interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/DOMTokenList.html b/testing/web-platform/tests/custom-elements/reactions/DOMTokenList.html new file mode 100644 index 0000000000..14a643c4a8 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/DOMTokenList.html @@ -0,0 +1,210 @@ + + + +Custom Elements: CEReactions on DOMTokenList interface + + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/Document.html b/testing/web-platform/tests/custom-elements/reactions/Document.html new file mode 100644 index 0000000000..4c5d2eb6e2 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/Document.html @@ -0,0 +1,157 @@ + + + +Custom Elements: CEReactions on Document interface + + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/Element.html b/testing/web-platform/tests/custom-elements/reactions/Element.html new file mode 100644 index 0000000000..e1576734d0 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/Element.html @@ -0,0 +1,91 @@ + + + +Custom Elements: CEReactions on Element interface + + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/ElementContentEditable.html b/testing/web-platform/tests/custom-elements/reactions/ElementContentEditable.html new file mode 100644 index 0000000000..bdb10761cb --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/ElementContentEditable.html @@ -0,0 +1,21 @@ + + + +Custom Elements: CEReactions on ElementContentEditable interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/HTMLAnchorElement.html b/testing/web-platform/tests/custom-elements/reactions/HTMLAnchorElement.html new file mode 100644 index 0000000000..c6eeb1dce9 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/HTMLAnchorElement.html @@ -0,0 +1,32 @@ + + + +Custom Elements: CEReactions on HTMLAnchorElement interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/HTMLElement.html b/testing/web-platform/tests/custom-elements/reactions/HTMLElement.html new file mode 100644 index 0000000000..b89f240912 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/HTMLElement.html @@ -0,0 +1,38 @@ + + + +Custom Elements: CEReactions on HTMLElement interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/HTMLOptionElement.html b/testing/web-platform/tests/custom-elements/reactions/HTMLOptionElement.html new file mode 100644 index 0000000000..418ef282b3 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/HTMLOptionElement.html @@ -0,0 +1,35 @@ + + + +Custom Elements: CEReactions on HTMLOptionElement interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/HTMLOptionsCollection.html b/testing/web-platform/tests/custom-elements/reactions/HTMLOptionsCollection.html new file mode 100644 index 0000000000..0d64259d06 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/HTMLOptionsCollection.html @@ -0,0 +1,122 @@ + + + +Custom Elements: CEReactions on HTMLOptionsCollection interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/HTMLOutputElement.html b/testing/web-platform/tests/custom-elements/reactions/HTMLOutputElement.html new file mode 100644 index 0000000000..02e669bc7a --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/HTMLOutputElement.html @@ -0,0 +1,45 @@ + + + +Custom Elements: CEReactions on HTMLOutputElement interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/HTMLSelectElement.html b/testing/web-platform/tests/custom-elements/reactions/HTMLSelectElement.html new file mode 100644 index 0000000000..7c79634f66 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/HTMLSelectElement.html @@ -0,0 +1,122 @@ + + + +Custom Elements: CEReactions on HTMLSelectElement interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/HTMLTableElement.html b/testing/web-platform/tests/custom-elements/reactions/HTMLTableElement.html new file mode 100644 index 0000000000..6adf2623d6 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/HTMLTableElement.html @@ -0,0 +1,173 @@ + + + +Custom Elements: CEReactions on HTMLTableElement interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/HTMLTableRowElement.html b/testing/web-platform/tests/custom-elements/reactions/HTMLTableRowElement.html new file mode 100644 index 0000000000..a9a00a5da3 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/HTMLTableRowElement.html @@ -0,0 +1,34 @@ + + + +Custom Elements: CEReactions on HTMLTableRowElement interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/HTMLTableSectionElement.html b/testing/web-platform/tests/custom-elements/reactions/HTMLTableSectionElement.html new file mode 100644 index 0000000000..cbb0a146e8 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/HTMLTableSectionElement.html @@ -0,0 +1,45 @@ + + + +Custom Elements: CEReactions on HTMLTableSectionElement interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/HTMLTitleElement.html b/testing/web-platform/tests/custom-elements/reactions/HTMLTitleElement.html new file mode 100644 index 0000000000..6678944c91 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/HTMLTitleElement.html @@ -0,0 +1,35 @@ + + + +Custom Elements: CEReactions on HTMLTitleElement interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/NamedNodeMap.html b/testing/web-platform/tests/custom-elements/reactions/NamedNodeMap.html new file mode 100644 index 0000000000..fa21b3ada9 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/NamedNodeMap.html @@ -0,0 +1,39 @@ + + + +Custom Elements: CEReactions on NamedNodeMap interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/Node.html b/testing/web-platform/tests/custom-elements/reactions/Node.html new file mode 100644 index 0000000000..94da3d020e --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/Node.html @@ -0,0 +1,49 @@ + + + +Custom Elements: CEReactions on Node interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/ParentNode.html b/testing/web-platform/tests/custom-elements/reactions/ParentNode.html new file mode 100644 index 0000000000..b143b5a982 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/ParentNode.html @@ -0,0 +1,27 @@ + + + +Custom Elements: CEReactions on ParentNode interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/Range.html b/testing/web-platform/tests/custom-elements/reactions/Range.html new file mode 100644 index 0000000000..c4a8252ff6 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/Range.html @@ -0,0 +1,54 @@ + + + +Custom Elements: CEReactions on Range interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/Selection.html b/testing/web-platform/tests/custom-elements/reactions/Selection.html new file mode 100644 index 0000000000..84214201aa --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/Selection.html @@ -0,0 +1,32 @@ + + + +Custom Elements: CEReactions on Selection interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/ShadowRoot.html b/testing/web-platform/tests/custom-elements/reactions/ShadowRoot.html new file mode 100644 index 0000000000..9997d9c836 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/ShadowRoot.html @@ -0,0 +1,52 @@ + + + +Custom Elements: CEReactions on ShadowRoot interface + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLAreaElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLAreaElement.html new file mode 100644 index 0000000000..3d53ff87ff --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLAreaElement.html @@ -0,0 +1,69 @@ + +Custom Elements: CEReactions on HTMLAreaElement interface + + + + + + + + + + +yellow pic + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLBaseElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLBaseElement.html new file mode 100644 index 0000000000..8d8470074c --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLBaseElement.html @@ -0,0 +1,21 @@ + + +Custom Elements: CEReactions on HTMLBaseElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLButtonElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLButtonElement.html new file mode 100644 index 0000000000..62f8b7b0c9 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLButtonElement.html @@ -0,0 +1,80 @@ + +Custom Elements: CEReactions on HTMLButtonElement interface + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLCanvasElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLCanvasElement.html new file mode 100644 index 0000000000..6c7119252e --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLCanvasElement.html @@ -0,0 +1,16 @@ + +Custom Elements: CEReactions on HTMLCanvasElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLDataElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLDataElement.html new file mode 100644 index 0000000000..f078c6aa02 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLDataElement.html @@ -0,0 +1,15 @@ + +Custom Elements: CEReactions on HTMLDataElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLDetailsElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLDetailsElement.html new file mode 100644 index 0000000000..4d81e3e627 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLDetailsElement.html @@ -0,0 +1,15 @@ + +Custom Elements: CEReactions on HTMLDetailsElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLEmbedElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLEmbedElement.html new file mode 100644 index 0000000000..923bde7583 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLEmbedElement.html @@ -0,0 +1,35 @@ + +Custom Elements: CEReactions on HTMLEmbedElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLFieldSetElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLFieldSetElement.html new file mode 100644 index 0000000000..517523551b --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLFieldSetElement.html @@ -0,0 +1,32 @@ + +Custom Elements: CEReactions on HTMLFieldSetElement interface + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLImageElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLImageElement.html new file mode 100644 index 0000000000..656e29eb17 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLImageElement.html @@ -0,0 +1,89 @@ + +Custom Elements: CEReactions on HTMLImageElement interface + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLInputElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLInputElement.html new file mode 100644 index 0000000000..adf43ee74d --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLInputElement.html @@ -0,0 +1,66 @@ + + +Custom Elements: CEReactions on HTMLInputElement interface + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLLIElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLLIElement.html new file mode 100644 index 0000000000..adba2addf6 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLLIElement.html @@ -0,0 +1,38 @@ + +Custom Elements: CEReactions on HTMLLIElement interface + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLLabelElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLLabelElement.html new file mode 100644 index 0000000000..2fe2741dad --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLLabelElement.html @@ -0,0 +1,29 @@ + +Custom Elements: CEReactions on HTMLLabelElement interface + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMapElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMapElement.html new file mode 100644 index 0000000000..5b2e674afb --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMapElement.html @@ -0,0 +1,17 @@ + +Custom Elements: CEReactions on HTMLMapElement interface + + + + + + + + +yellow pic +green pic + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMediaElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMediaElement.html new file mode 100644 index 0000000000..58e002c52c --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMediaElement.html @@ -0,0 +1,107 @@ + +Custom Elements: CEReactions on HTMLMediaElement interface + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMetaElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMetaElement.html new file mode 100644 index 0000000000..b6e8c06546 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMetaElement.html @@ -0,0 +1,77 @@ + +Custom Elements: CEReactions on HTMLMetaElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMeterElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMeterElement.html new file mode 100644 index 0000000000..707e56c605 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLMeterElement.html @@ -0,0 +1,55 @@ + +Custom Elements: CEReactions on HTMLMeterElement interface + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLModElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLModElement.html new file mode 100644 index 0000000000..cfdbba4464 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLModElement.html @@ -0,0 +1,18 @@ + +Custom Elements: CEReactions on HTMLModElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLOListElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLOListElement.html new file mode 100644 index 0000000000..b62f31b489 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLOListElement.html @@ -0,0 +1,17 @@ + +Custom Elements: CEReactions on HTMLOListElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLOptGroupElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLOptGroupElement.html new file mode 100644 index 0000000000..ca34e81e3b --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLOptGroupElement.html @@ -0,0 +1,38 @@ + +Custom Elements: CEReactions on HTMLOptGroupElement interface + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLParamElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLParamElement.html new file mode 100644 index 0000000000..eb3a13962f --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLParamElement.html @@ -0,0 +1,41 @@ + +Custom Elements: CEReactions on HTMLParamElement interface + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLProgressElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLProgressElement.html new file mode 100644 index 0000000000..42683f4ede --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLProgressElement.html @@ -0,0 +1,25 @@ + +Custom Elements: CEReactions on HTMLProgressElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLQuoteElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLQuoteElement.html new file mode 100644 index 0000000000..f9c3d7538c --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLQuoteElement.html @@ -0,0 +1,16 @@ + +Custom Elements: CEReactions on HTMLQuoteElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLSlotElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLSlotElement.html new file mode 100644 index 0000000000..56871873b4 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLSlotElement.html @@ -0,0 +1,15 @@ + +Custom Elements: CEReactions on HTMLSlotElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLSourceElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLSourceElement.html new file mode 100644 index 0000000000..f7d567ebcb --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLSourceElement.html @@ -0,0 +1,191 @@ + +Custom Elements: CEReactions on HTMLSourceElement interface + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLStyleElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLStyleElement.html new file mode 100644 index 0000000000..d68d5cb76d --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLStyleElement.html @@ -0,0 +1,23 @@ + +Custom Elements: CEReactions on HTMLStyleElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLTableCellElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLTableCellElement.html new file mode 100644 index 0000000000..95a8459df8 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLTableCellElement.html @@ -0,0 +1,63 @@ + +Custom Elements: CEReactions on HTMLTableCellElement interface + + + + + + + + +
+
+
+ diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLTableColElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLTableColElement.html new file mode 100644 index 0000000000..8e4d1359d8 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLTableColElement.html @@ -0,0 +1,25 @@ + +Custom Elements: CEReactions on HTMLTableColElement interface + + + + + + + + +
+ diff --git a/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLTimeElement.html b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLTimeElement.html new file mode 100644 index 0000000000..b2f4cc8af7 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/customized-builtins/HTMLTimeElement.html @@ -0,0 +1,15 @@ + +Custom Elements: CEReactions on HTMLTimeElement interface + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/reactions/resources/reactions.js b/testing/web-platform/tests/custom-elements/reactions/resources/reactions.js new file mode 100644 index 0000000000..0e4b94e02a --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/resources/reactions.js @@ -0,0 +1,458 @@ + +let testNumber = 1; + +function testNodeConnector(testFunction, name) { + let container = document.createElement('div'); + container.appendChild(document.createElement('div')); + document.body.appendChild(container); + + test(function () { + var element = define_new_custom_element(); + var instance = document.createElement(element.name); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(container, instance); + assert_array_equals(element.takeLog().types(), ['connected']); + }, name + ' must enqueue a connected reaction'); + + test(function () { + var element = define_new_custom_element(); + var instance = document.createElement(element.name); + assert_array_equals(element.takeLog().types(), ['constructed']); + var newDoc = document.implementation.createHTMLDocument(); + testFunction(container, instance); + assert_array_equals(element.takeLog().types(), ['connected']); + testFunction(newDoc.documentElement, instance); + assert_array_equals(element.takeLog().types(), ['disconnected', 'adopted', 'connected']); + }, name + ' must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document'); + + container.parentNode.removeChild(container); +} + +function testNodeDisconnector(testFunction, name) { + let container = document.createElement('div'); + container.appendChild(document.createElement('div')); + document.body.appendChild(container); + + test(function () { + var element = define_new_custom_element(); + var instance = document.createElement(element.name); + assert_array_equals(element.takeLog().types(), ['constructed']); + container.appendChild(instance); + assert_array_equals(element.takeLog().types(), ['connected']); + testFunction(instance, window); + assert_array_equals(element.takeLog().types(), ['disconnected']); + }, name + ' must enqueue a disconnected reaction'); + + container.parentNode.removeChild(container); +} + +function testInsertingMarkup(testFunction, name) { + let container = document.createElement('div'); + container.appendChild(document.createElement('div')); + document.body.appendChild(container); + + test(function () { + var element = define_new_custom_element(); + testFunction(container, `<${element.name}>`); + assert_array_equals(element.takeLog().types(), ['constructed', 'connected']); + }, name + ' must enqueue a connected reaction for a newly constructed custom element'); + + test(function () { + var element = define_new_custom_element(['title']); + testFunction(container, `<${element.name} id="hello" title="hi">`); + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['constructed', 'attributeChanged', 'connected']); + assert_attribute_log_entry(logEntries[1], {name: 'title', oldValue: null, newValue: 'hi', namespace: null}); + }, name + ' must enqueue a attributeChanged reaction for a newly constructed custom element'); + + container.parentNode.removeChild(container); +} + +function testParsingMarkup(testFunction, name) { + test(function () { + var element = define_new_custom_element(['id']); + assert_array_equals(element.takeLog().types(), []); + var instance = testFunction(document, `<${element.name} id="hello" class="foo">`); + assert_equals(Object.getPrototypeOf(instance.querySelector(element.name)), element.class.prototype); + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['constructed', 'attributeChanged']); + assert_attribute_log_entry(logEntries[1], {name: 'id', oldValue: null, newValue: 'hello', namespace: null}); + }, name + ' must construct a custom element'); +} + +function testCloner(testFunction, name) { + let container = document.createElement('div'); + container.appendChild(document.createElement('div')); + document.body.appendChild(container); + + test(function () { + var element = define_new_custom_element(['id']); + var instance = document.createElement(element.name); + container.appendChild(instance); + + instance.setAttribute('id', 'foo'); + assert_array_equals(element.takeLog().types(), ['constructed', 'connected', 'attributeChanged']); + var newInstance = testFunction(instance); + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['constructed', 'attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'id', oldValue: null, newValue: 'foo', namespace: null}); + }, name + ' must enqueue an attributeChanged reaction when cloning an element with an observed attribute'); + + test(function () { + var element = define_new_custom_element(['id']); + var instance = document.createElement(element.name); + container.appendChild(instance); + + instance.setAttribute('lang', 'en'); + assert_array_equals(element.takeLog().types(), ['constructed', 'connected']); + var newInstance = testFunction(instance); + assert_array_equals(element.takeLog().types(), ['constructed']); + }, name + ' must not enqueue an attributeChanged reaction when cloning an element with an unobserved attribute'); + + test(function () { + var element = define_new_custom_element(['title', 'class']); + var instance = document.createElement(element.name); + container.appendChild(instance); + + instance.setAttribute('lang', 'en'); + instance.className = 'foo'; + instance.setAttribute('title', 'hello world'); + assert_array_equals(element.takeLog().types(), ['constructed', 'connected', 'attributeChanged', 'attributeChanged']); + var newInstance = testFunction(instance); + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['constructed', 'attributeChanged', 'attributeChanged']); + assert_attribute_log_entry(logEntries[1], {name: 'class', oldValue: null, newValue: 'foo', namespace: null}); + assert_attribute_log_entry(logEntries[2], {name: 'title', oldValue: null, newValue: 'hello world', namespace: null}); + }, name + ' must enqueue an attributeChanged reaction when cloning an element only for observed attributes'); +} + +function testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, validValue1, contentValue1, validValue2, contentValue2, name, elementName, interfaceName, optionalSupportPredicate) { + test(function () { + if (optionalSupportPredicate) { + assert_implements_optional(optionalSupportPredicate()); + } + if (elementName === undefined) { + var element = define_new_custom_element([contentAttributeName]); + var instance = document.createElement(element.name); + } else { + var element = define_build_in_custom_element([contentAttributeName], interfaceName, elementName); + var instance = document.createElement(elementName, { is: element.name }); + } + assert_array_equals(element.takeLog().types(), ['constructed']); + instance[jsAttributeName] = validValue1; + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + + assert_attribute_log_entry(logEntries.last(), {name: contentAttributeName, oldValue: null, newValue: contentValue1, namespace: null}); + }, name + ' must enqueue an attributeChanged reaction when adding ' + contentAttributeName + ' content attribute'); + + test(function () { + if (optionalSupportPredicate) { + assert_implements_optional(optionalSupportPredicate()); + } + if (elementName === undefined) { + var element = define_new_custom_element([contentAttributeName]); + var instance = document.createElement(element.name); + } else { + var element = define_build_in_custom_element([contentAttributeName], interfaceName, elementName); + var instance = document.createElement(elementName, { is: element.name }); + } + instance[jsAttributeName] = validValue1; + assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); + instance[jsAttributeName] = validValue2; + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: contentAttributeName, oldValue: contentValue1, newValue: contentValue2, namespace: null}); + }, name + ' must enqueue an attributeChanged reaction when replacing an existing attribute'); +} + +function testReflectAttribute(jsAttributeName, contentAttributeName, validValue1, validValue2, name, elementName, interfaceName, optionalSupportPredicate) { + testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, validValue1, validValue1, validValue2, validValue2, name, elementName, interfaceName, optionalSupportPredicate); +} + +function testReflectBooleanAttribute(jsAttributeName, contentAttributeName, name, elementName, interfaceName) { + testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, true, '', false, null, name, elementName, interfaceName); +} + +function testReflectAttributeWithContentValuesAndDependentAttributes(jsAttributeName, contentAttributeName, validValue1, contentValue1, validValue2, contentValue2, name, elementName, getParentElement, setAttributes, interfaceName) { + let parentElement = getParentElement(); + + test(() => { + let element = define_build_in_custom_element([contentAttributeName], interfaceName, elementName); + let instance = document.createElement(elementName, { is: element.name }); + + assert_array_equals(element.takeLog().types(), ['constructed']); + parentElement.appendChild(instance); + assert_array_equals(element.takeLog().types(), ['connected']); + setAttributes(instance); + instance[jsAttributeName] = validValue1; + let logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), { name: contentAttributeName, oldValue: null, newValue: contentValue1, namespace: null }); + + }, name + ' must enqueue an attributeChanged reaction when adding a new attribute'); + + test(() => { + let element = define_build_in_custom_element([contentAttributeName], interfaceName, elementName); + let instance = document.createElement(elementName, { is: element.name }); + parentElement.appendChild(instance); + setAttributes(instance); + instance[jsAttributeName] = validValue1; + + assert_array_equals(element.takeLog().types(), ['constructed', 'connected', 'attributeChanged']); + instance[jsAttributeName] = validValue2; + let logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), { name: contentAttributeName, oldValue: contentValue1, newValue: contentValue2, namespace: null }); + + }, name + ' must enqueue an attributeChanged reaction when replacing an existing attribute'); +} + +function testReflectAttributeWithDependentAttributes(jsAttributeName, contentAttributeName, validValue1, validValue2, name, elementName, getParentElement, setAttributes, interfaceName) { + testReflectAttributeWithContentValuesAndDependentAttributes(jsAttributeName, contentAttributeName, validValue1, validValue1, validValue2, validValue2, name, elementName, getParentElement, setAttributes, interfaceName); +} + +function testReflectBooleanAttributeWithDependentAttributes(jsAttributeName, contentAttributeName, name, elementName, getParentElement, setAttributes, interfaceName) { + testReflectAttributeWithContentValuesAndDependentAttributes(jsAttributeName, contentAttributeName, true, '', false, null, name, elementName, getParentElement, setAttributes, interfaceName); +} + +function testReflectAttributeWithContentValuesAndParentNode(jsAttributeName, contentAttributeName, validValue1, contentValue1, validValue2, contentValue2, name, elementName, getParentElement, interfaceName) { + let parentElement = getParentElement(); + + test(() => { + let element = define_build_in_custom_element([contentAttributeName], interfaceName, elementName); + let instance = document.createElement(elementName, { is: element.name }); + + assert_array_equals(element.takeLog().types(), ['constructed']); + parentElement.appendChild(instance); + assert_array_equals(element.takeLog().types(), ['connected']); + instance[jsAttributeName] = validValue1; + let logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), { name: contentAttributeName, oldValue: null, newValue: contentValue1, namespace: null }); +}, name + ' must enqueue an attributeChanged reaction when adding a new attribute'); + + test(() => { + let element = define_build_in_custom_element([contentAttributeName], interfaceName, elementName); + let instance = document.createElement(elementName, { is: element.name }); + parentElement.appendChild(instance); + + assert_array_equals(element.takeLog().types(), ['constructed', 'connected']); + instance[jsAttributeName] = validValue1; + assert_array_equals(element.takeLog().types(), ['attributeChanged']); + instance[jsAttributeName] = validValue2; + let logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), { name: contentAttributeName, oldValue: contentValue1, newValue: contentValue2, namespace: null }); + }, name + ' must enqueue an attributeChanged reaction when replacing an existing attribute'); +} + +function testReflectAttributeWithParentNode(jsAttributeName, contentAttributeName, validValue1, validValue2, name, elementName, getParentElement, interfaceName) { + testReflectAttributeWithContentValuesAndParentNode(jsAttributeName, contentAttributeName, validValue1, validValue1, validValue2, validValue2, name, elementName, getParentElement, interfaceName); +} + +function testReflectBooleanAttributeWithParentNode(jsAttributeName, contentAttributeName, name, elementName, getParentElement, interfaceName) { + testReflectAttributeWithContentValuesAndParentNode(jsAttributeName, contentAttributeName, true, '', false, null, name, elementName, getParentElement, interfaceName); +} + +function testAttributeAdder(testFunction, name) { + test(function () { + var element = define_new_custom_element(['id']); + var instance = document.createElement(element.name); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(instance, 'id', 'foo'); + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'id', oldValue: null, newValue: 'foo', namespace: null}); + }, name + ' must enqueue an attributeChanged reaction when adding an attribute'); + + test(function () { + var element = define_new_custom_element(['class']); + var instance = document.createElement(element.name); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(instance, 'data-lang', 'en'); + assert_array_equals(element.takeLog().types(), []); + }, name + ' must not enqueue an attributeChanged reaction when adding an unobserved attribute'); + + test(function () { + var element = define_new_custom_element(['title']); + var instance = document.createElement(element.name); + instance.setAttribute('title', 'hello'); + assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); + testFunction(instance, 'title', 'world'); + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'title', oldValue: 'hello', newValue: 'world', namespace: null}); + }, name + ' must enqueue an attributeChanged reaction when replacing an existing attribute'); + + test(function () { + var element = define_new_custom_element([]); + var instance = document.createElement(element.name); + instance.setAttribute('data-lang', 'zh'); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(instance, 'data-lang', 'en'); + assert_array_equals(element.takeLog().types(), []); + }, name + ' must enqueue an attributeChanged reaction when replacing an existing unobserved attribute'); +} + +function testAttributeMutator(testFunction, name) { + test(function () { + var element = define_new_custom_element(['title']); + var instance = document.createElement(element.name); + instance.setAttribute('title', 'hello'); + assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); + testFunction(instance, 'title', 'world'); + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'title', oldValue: 'hello', newValue: 'world', namespace: null}); + }, name + ' must enqueue an attributeChanged reaction when replacing an existing attribute'); + + test(function () { + var element = define_new_custom_element(['class']); + var instance = document.createElement(element.name); + instance.setAttribute('data-lang', 'zh'); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(instance, 'data-lang', 'en'); + assert_array_equals(element.takeLog().types(), []); + }, name + ' must not enqueue an attributeChanged reaction when replacing an existing unobserved attribute'); +} + +function testAttributeRemover(testFunction, name, options) { + if (options && !options.onlyExistingAttribute) { + test(function () { + var element = define_new_custom_element(['title']); + var instance = document.createElement(element.name); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(instance, 'title'); + assert_array_equals(element.takeLog().types(), []); + }, name + ' must not enqueue an attributeChanged reaction when removing an attribute that does not exist'); + } + + test(function () { + var element = define_new_custom_element([]); + var instance = document.createElement(element.name); + instance.setAttribute('data-lang', 'hello'); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(instance, 'data-lang'); + assert_array_equals(element.takeLog().types(), []); + }, name + ' must not enqueue an attributeChanged reaction when removing an unobserved attribute'); + + test(function () { + var element = define_new_custom_element(['title']); + var instance = document.createElement(element.name); + instance.setAttribute('title', 'hello'); + assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); + testFunction(instance, 'title'); + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'title', oldValue: 'hello', newValue: null, namespace: null}); + }, name + ' must enqueue an attributeChanged reaction when removing an existing attribute'); + + test(function () { + var element = define_new_custom_element([]); + var instance = document.createElement(element.name); + instance.setAttribute('data-lang', 'ja'); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(instance, 'data-lang'); + assert_array_equals(element.takeLog().types(), []); + }, name + ' must not enqueue an attributeChanged reaction when removing an existing unobserved attribute'); +} + +function test_mutating_style_property_value(testFunction, name, options) { + const propertyName = (options || {}).propertyName || 'color'; + const idlName = (options || {}).idlName || 'color'; + const value1 = (options || {}).value1 || 'blue'; + const rule1 = `${propertyName}: ${value1};`; + const value2 = (options || {}).value2 || 'red'; + const rule2 = `${propertyName}: ${value2};`; + + test(function () { + var element = define_new_custom_element(['style']); + var instance = document.createElement(element.name); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(instance, propertyName, idlName, value1); + assert_equals(instance.getAttribute('style'), rule1); + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'style', oldValue: null, newValue: rule1, namespace: null}); + }, name + ' must enqueue an attributeChanged reaction when it adds the observed style attribute'); + + test(function () { + var element = define_new_custom_element(['title']); + var instance = document.createElement(element.name); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(instance, propertyName, idlName, value1); + assert_equals(instance.getAttribute('style'), rule1); + assert_array_equals(element.takeLog().types(), []); + }, name + ' must not enqueue an attributeChanged reaction when it adds the style attribute but the style attribute is not observed'); + + test(function () { + var element = define_new_custom_element(['style']); + var instance = document.createElement(element.name); + testFunction(instance, propertyName, idlName, value1); + assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); + testFunction(instance, propertyName, idlName, value2); + assert_equals(instance.getAttribute('style'), rule2); + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'style', oldValue: rule1, newValue: rule2, namespace: null}); + }, name + ' must enqueue an attributeChanged reaction when it mutates the observed style attribute'); + + test(function () { + var element = define_new_custom_element([]); + var instance = document.createElement(element.name); + testFunction(instance, propertyName, idlName, value1); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(instance, propertyName, idlName, value2); + assert_equals(instance.getAttribute('style'), rule2); + assert_array_equals(element.takeLog().types(), []); + }, name + ' must not enqueue an attributeChanged reaction when it mutates the style attribute but the style attribute is not observed'); +} + +function test_removing_style_property_value(testFunction, name) { + test(function () { + var element = define_new_custom_element(['style']); + var instance = document.createElement(element.name); + instance.setAttribute('style', 'color: red; display: none;'); + assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); + testFunction(instance, 'color', 'color'); + assert_equals(instance.getAttribute('style'), 'display: none;'); // Don't make this empty since browser behaviors are inconsistent now. + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'style', oldValue: 'color: red; display: none;', newValue: 'display: none;', namespace: null}); + }, name + ' must enqueue an attributeChanged reaction when it removes a property from the observed style attribute'); + + test(function () { + var element = define_new_custom_element(['class']); + var instance = document.createElement(element.name); + instance.setAttribute('style', 'color: red; display: none;'); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(instance, 'color', 'color'); + assert_equals(instance.getAttribute('style'), 'display: none;'); // Don't make this empty since browser behaviors are inconsistent now. + assert_array_equals(element.takeLog().types(), []); + }, name + ' must not enqueue an attributeChanged reaction when it removes a property from the style attribute but the style attribute is not observed'); +} + +function test_mutating_style_property_priority(testFunction, name) { + test(function () { + var element = define_new_custom_element(['style']); + var instance = document.createElement(element.name); + instance.setAttribute('style', 'color: red'); + assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); + testFunction(instance, 'color', 'color', true); + assert_equals(instance.getAttribute('style'), 'color: red !important;'); + var logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'style', oldValue: 'color: red', newValue: 'color: red !important;', namespace: null}); + }, name + ' must enqueue an attributeChanged reaction when it makes a property important and the style attribute is observed'); + + test(function () { + var element = define_new_custom_element(['id']); + var instance = document.createElement(element.name); + instance.setAttribute('style', 'color: red'); + assert_array_equals(element.takeLog().types(), ['constructed']); + testFunction(instance, 'color', 'color', true); + assert_equals(instance.getAttribute('style'), 'color: red !important;'); + assert_array_equals(element.takeLog().types(), []); + }, name + ' must enqueue an attributeChanged reaction when it makes a property important but the style attribute is not observed'); +} diff --git a/testing/web-platform/tests/custom-elements/reactions/with-exceptions.html b/testing/web-platform/tests/custom-elements/reactions/with-exceptions.html new file mode 100644 index 0000000000..131348b1c4 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/reactions/with-exceptions.html @@ -0,0 +1,35 @@ + + +Custom Elements: CEReactions interaction with exceptions + + + + + + + + +
+ + diff --git a/testing/web-platform/tests/custom-elements/resources/custom-elements-helpers.js b/testing/web-platform/tests/custom-elements/resources/custom-elements-helpers.js new file mode 100644 index 0000000000..48775af162 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/resources/custom-elements-helpers.js @@ -0,0 +1,276 @@ +function create_window_in_test(t, srcdoc) { + let p = new Promise((resolve) => { + let f = document.createElement('iframe'); + f.srcdoc = srcdoc ? srcdoc : ''; + f.onload = (event) => { + let w = f.contentWindow; + t.add_cleanup(() => f.remove()); + resolve(w); + }; + document.body.appendChild(f); + }); + return p; +} + +function create_window_in_test_async(test, mime, doc) { + return new Promise((resolve) => { + let iframe = document.createElement('iframe'); + blob = new Blob([doc], {type: mime}); + iframe.src = URL.createObjectURL(blob); + iframe.onload = (event) => { + let contentWindow = iframe.contentWindow; + test.add_cleanup(() => iframe.remove()); + resolve(contentWindow); + }; + document.body.appendChild(iframe); + }); +} + +function test_with_window(f, name, srcdoc) { + promise_test((t) => { + return create_window_in_test(t, srcdoc) + .then((w) => { + f(w, w.document); + }); + }, name); +} + +function define_custom_element_in_window(window, name, observedAttributes) { + let log = []; + + class CustomElement extends window.HTMLElement { + constructor() { + super(); + log.push(create_constructor_log(this)); + } + attributeChangedCallback(...args) { + log.push(create_attribute_changed_callback_log(this, ...args)); + } + connectedCallback() { log.push(create_connected_callback_log(this)); } + disconnectedCallback() { log.push(create_disconnected_callback_log(this)); } + adoptedCallback(oldDocument, newDocument) { log.push({type: 'adopted', element: this, oldDocument: oldDocument, newDocument: newDocument}); } + } + CustomElement.observedAttributes = observedAttributes; + + window.customElements.define(name, CustomElement); + + return { + name: name, + class: CustomElement, + takeLog: function () { + let currentLog = log; log = []; + currentLog.types = () => currentLog.map((entry) => entry.type); + currentLog.last = () => currentLog[currentLog.length - 1]; + return currentLog; + } + }; +} + +function create_constructor_log(element) { + return {type: 'constructed', element: element}; +} + +function assert_constructor_log_entry(log, element) { + assert_equals(log.type, 'constructed'); + assert_equals(log.element, element); +} + +function create_connected_callback_log(element) { + return {type: 'connected', element: element}; +} + +function assert_connected_log_entry(log, element) { + assert_equals(log.type, 'connected'); + assert_equals(log.element, element); +} + +function create_disconnected_callback_log(element) { + return {type: 'disconnected', element: element}; +} + +function assert_disconnected_log_entry(log, element) { + assert_equals(log.type, 'disconnected'); + assert_equals(log.element, element); +} + +function assert_adopted_log_entry(log, element) { + assert_equals(log.type, 'adopted'); + assert_equals(log.element, element); +} + +function create_adopted_callback_log(element) { + return {type: 'adopted', element: element}; +} + +function create_attribute_changed_callback_log(element, name, oldValue, newValue, namespace) { + return { + type: 'attributeChanged', + element: element, + name: name, + namespace: namespace, + oldValue: oldValue, + newValue: newValue, + actualValue: element.getAttributeNS(namespace, name) + }; +} + +function assert_attribute_log_entry(log, expected) { + assert_equals(log.type, 'attributeChanged'); + assert_equals(log.name, expected.name); + assert_equals(log.oldValue, expected.oldValue); + assert_equals(log.newValue, expected.newValue); + assert_equals(log.actualValue, expected.newValue); + assert_equals(log.namespace, expected.namespace); +} + + +function define_new_custom_element(observedAttributes) { + let log = []; + let name = 'custom-element-' + define_new_custom_element._element_number++; + + class CustomElement extends HTMLElement { + constructor() { + super(); + log.push({type: 'constructed', element: this}); + } + attributeChangedCallback(...args) { + log.push(create_attribute_changed_callback_log(this, ...args)); + } + connectedCallback() { log.push({type: 'connected', element: this}); } + disconnectedCallback() { log.push({type: 'disconnected', element: this}); } + adoptedCallback(oldDocument, newDocument) { log.push({type: 'adopted', element: this, oldDocument: oldDocument, newDocument: newDocument}); } + } + CustomElement.observedAttributes = observedAttributes; + + customElements.define(name, CustomElement); + + return { + name: name, + class: CustomElement, + takeLog: function () { + let currentLog = log; log = []; + currentLog.types = () => currentLog.map((entry) => entry.type); + currentLog.last = () => currentLog[currentLog.length - 1]; + return currentLog; + } + }; +} +define_new_custom_element._element_number = 1; + +function define_build_in_custom_element(observedAttributes, extendedElement, extendsOption) { + let log = []; + let name = 'custom-element-' + define_build_in_custom_element._element_number++; + + class CustomElement extends extendedElement { + constructor() { + super(); + log.push({type: 'constructed', element: this}); + } + attributeChangedCallback(...args) { + log.push(create_attribute_changed_callback_log(this, ...args)); + } + connectedCallback() { log.push({type: 'connected', element: this}); } + disconnectedCallback() { log.push({type: 'disconnected', element: this}); } + adoptedCallback(oldDocument, newDocument) { log.push({type: 'adopted', element: this, oldDocument: oldDocument, newDocument: newDocument}); } + } + CustomElement.observedAttributes = observedAttributes; + customElements.define(name, CustomElement, { extends: extendsOption}); + + return { + name: name, + class: CustomElement, + takeLog: function () { + let currentLog = log; log = []; + currentLog.types = () => currentLog.map((entry) => entry.type); + currentLog.last = () => currentLog[currentLog.length - 1]; + return currentLog; + } + }; +} +define_build_in_custom_element._element_number = 1; + +function document_types() { + return [ + { + name: 'the document', + create: function () { return Promise.resolve(document); }, + isOwner: true, + hasBrowsingContext: true, + }, + { + name: 'the document of the template elements', + create: function () { + return new Promise(function (resolve) { + var template = document.createElementNS('http://www.w3.org/1999/xhtml', 'template'); + var doc = template.content.ownerDocument; + if (!doc.documentElement) + doc.appendChild(doc.createElement('html')); + resolve(doc); + }); + }, + hasBrowsingContext: false, + }, + { + name: 'a new document', + create: function () { + return new Promise(function (resolve) { + var doc = new Document(); + doc.appendChild(doc.createElement('html')); + resolve(doc); + }); + }, + hasBrowsingContext: false, + }, + { + name: 'a cloned document', + create: function () { + return new Promise(function (resolve) { + var doc = document.cloneNode(false); + doc.appendChild(doc.createElement('html')); + resolve(doc); + }); + }, + hasBrowsingContext: false, + }, + { + name: 'a document created by createHTMLDocument', + create: function () { + return Promise.resolve(document.implementation.createHTMLDocument()); + }, + hasBrowsingContext: false, + }, + { + name: 'an HTML document created by createDocument', + create: function () { + return Promise.resolve(document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html', null)); + }, + hasBrowsingContext: false, + }, + { + name: 'the document of an iframe', + create: function () { + return new Promise(function (resolve, reject) { + var iframe = document.createElement('iframe'); + iframe.onload = function () { resolve(iframe.contentDocument); } + iframe.onerror = function () { reject('Failed to load an empty iframe'); } + document.body.appendChild(iframe); + }); + }, + hasBrowsingContext: true, + }, + { + name: 'an HTML document fetched by XHR', + create: function () { + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', 'resources/empty-html-document.html'); + xhr.overrideMimeType('text/xml'); + xhr.onload = function () { resolve(xhr.responseXML); } + xhr.onerror = function () { reject('Failed to fetch the document'); } + xhr.send(); + }); + }, + hasBrowsingContext: false, + } + ]; +} diff --git a/testing/web-platform/tests/custom-elements/resources/empty-html-document.html b/testing/web-platform/tests/custom-elements/resources/empty-html-document.html new file mode 100644 index 0000000000..eaca3f49fd --- /dev/null +++ b/testing/web-platform/tests/custom-elements/resources/empty-html-document.html @@ -0,0 +1,5 @@ + + + + + diff --git a/testing/web-platform/tests/custom-elements/resources/my-custom-element-html-document.html b/testing/web-platform/tests/custom-elements/resources/my-custom-element-html-document.html new file mode 100644 index 0000000000..b9bfdf90a2 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/resources/my-custom-element-html-document.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/testing/web-platform/tests/custom-elements/resources/navigation-destination.html b/testing/web-platform/tests/custom-elements/resources/navigation-destination.html new file mode 100644 index 0000000000..50e28f0ed8 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/resources/navigation-destination.html @@ -0,0 +1,9 @@ + + + +

Navigated!

+ + + diff --git a/testing/web-platform/tests/custom-elements/scoped-registry/CustomElementRegistry-constructor.tentative.html b/testing/web-platform/tests/custom-elements/scoped-registry/CustomElementRegistry-constructor.tentative.html new file mode 100644 index 0000000000..d80a1fbe6c --- /dev/null +++ b/testing/web-platform/tests/custom-elements/scoped-registry/CustomElementRegistry-constructor.tentative.html @@ -0,0 +1,27 @@ + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/scoped-registry/CustomElementRegistry-multi-register.tentative.html b/testing/web-platform/tests/custom-elements/scoped-registry/CustomElementRegistry-multi-register.tentative.html new file mode 100644 index 0000000000..bd97017308 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/scoped-registry/CustomElementRegistry-multi-register.tentative.html @@ -0,0 +1,27 @@ + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/scoped-registry/ShadowRoot-createElement.tentative.html b/testing/web-platform/tests/custom-elements/scoped-registry/ShadowRoot-createElement.tentative.html new file mode 100644 index 0000000000..335773f9c6 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/scoped-registry/ShadowRoot-createElement.tentative.html @@ -0,0 +1,95 @@ + +Tests ShadowRoot.createElement APIs work with scoped custom element registries + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/scoped-registry/ShadowRoot-init-registry.tentative.html b/testing/web-platform/tests/custom-elements/scoped-registry/ShadowRoot-init-registry.tentative.html new file mode 100644 index 0000000000..f9bc5b5b56 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/scoped-registry/ShadowRoot-init-registry.tentative.html @@ -0,0 +1,52 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/scoped-registry/ShadowRoot-innerHTML-upgrade.tentative.html b/testing/web-platform/tests/custom-elements/scoped-registry/ShadowRoot-innerHTML-upgrade.tentative.html new file mode 100644 index 0000000000..e21c9dd033 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/scoped-registry/ShadowRoot-innerHTML-upgrade.tentative.html @@ -0,0 +1,116 @@ + + + + + + + + +
+ + diff --git a/testing/web-platform/tests/custom-elements/scoped-registry/constructor-call.tentative.html b/testing/web-platform/tests/custom-elements/scoped-registry/constructor-call.tentative.html new file mode 100644 index 0000000000..19a8e3f4d8 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/scoped-registry/constructor-call.tentative.html @@ -0,0 +1,42 @@ + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/scoped-registry/constructor-reentry-with-different-definition.tentative.html b/testing/web-platform/tests/custom-elements/scoped-registry/constructor-reentry-with-different-definition.tentative.html new file mode 100644 index 0000000000..dc93e3c702 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/scoped-registry/constructor-reentry-with-different-definition.tentative.html @@ -0,0 +1,137 @@ + + + + + + + + +
+
+ + diff --git a/testing/web-platform/tests/custom-elements/scoped-registry/scoped-registry-define-upgrade-criteria.tentative.html b/testing/web-platform/tests/custom-elements/scoped-registry/scoped-registry-define-upgrade-criteria.tentative.html new file mode 100644 index 0000000000..d3d5d4fb96 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/scoped-registry/scoped-registry-define-upgrade-criteria.tentative.html @@ -0,0 +1,258 @@ + +Tests which nodes are upgraded after adding a scoped custom element definition + + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/scoped-registry/scoped-registry-define-upgrade-order.tentative.html b/testing/web-platform/tests/custom-elements/scoped-registry/scoped-registry-define-upgrade-order.tentative.html new file mode 100644 index 0000000000..4fb0f49f9f --- /dev/null +++ b/testing/web-platform/tests/custom-elements/scoped-registry/scoped-registry-define-upgrade-order.tentative.html @@ -0,0 +1,217 @@ + +Tests element upgrade order after adding a scoped custom element definition + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/state/ElementInternals-states.html b/testing/web-platform/tests/custom-elements/state/ElementInternals-states.html new file mode 100644 index 0000000000..1521a8098a --- /dev/null +++ b/testing/web-platform/tests/custom-elements/state/ElementInternals-states.html @@ -0,0 +1,83 @@ + + + + + + diff --git a/testing/web-platform/tests/custom-elements/state/META.yml b/testing/web-platform/tests/custom-elements/state/META.yml new file mode 100644 index 0000000000..df335b339e --- /dev/null +++ b/testing/web-platform/tests/custom-elements/state/META.yml @@ -0,0 +1 @@ +spec: https://html.spec.whatwg.org/multipage/custom-elements.html#custom-state-pseudo-class diff --git a/testing/web-platform/tests/custom-elements/state/README.md b/testing/web-platform/tests/custom-elements/state/README.md new file mode 100644 index 0000000000..4104881e03 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/state/README.md @@ -0,0 +1,2 @@ +Tests for [Custom State Pseudo +Class](https://html.spec.whatwg.org/multipage/custom-elements.html#custom-state-pseudo-class) diff --git a/testing/web-platform/tests/custom-elements/state/custom-state-set-strong-ref.html b/testing/web-platform/tests/custom-elements/state/custom-state-set-strong-ref.html new file mode 100644 index 0000000000..da25943ffa --- /dev/null +++ b/testing/web-platform/tests/custom-elements/state/custom-state-set-strong-ref.html @@ -0,0 +1,34 @@ + + + + + + + + CustomStateSet doesn't crash after GC on detached node + + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/state/state-css-selector-shadow-dom.html b/testing/web-platform/tests/custom-elements/state/state-css-selector-shadow-dom.html new file mode 100644 index 0000000000..9d86b5d260 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/state/state-css-selector-shadow-dom.html @@ -0,0 +1,74 @@ + + + + + + + + :state() css selector applies in shadow roots + + + + + + I should be green + + + + diff --git a/testing/web-platform/tests/custom-elements/state/state-css-selector.html b/testing/web-platform/tests/custom-elements/state/state-css-selector.html new file mode 100644 index 0000000000..d29c927223 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/state/state-css-selector.html @@ -0,0 +1,104 @@ + + + + + + + + :state() css selector applies + + + + + + I should be green +

I should be blue

+

I should be blue

+ + + + diff --git a/testing/web-platform/tests/custom-elements/state/state-pseudo-class.html b/testing/web-platform/tests/custom-elements/state/state-pseudo-class.html new file mode 100644 index 0000000000..4e2ee0b779 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/state/state-pseudo-class.html @@ -0,0 +1,146 @@ + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-construct-xml-parser.xhtml b/testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-construct-xml-parser.xhtml new file mode 100644 index 0000000000..c2913a1312 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-construct-xml-parser.xhtml @@ -0,0 +1,130 @@ + + + +Custom Elements: create an element for a token must increment and decrement document's throw-on-dynamic-markup-insertion counter + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html b/testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html new file mode 100644 index 0000000000..3e9254e2a5 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html @@ -0,0 +1,117 @@ + + + + Custom Elements: create an element for a token must increment and decrement document's throw-on-dynamic-markup-insertion counter + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions-xml-parser.xhtml b/testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions-xml-parser.xhtml new file mode 100644 index 0000000000..4a3c8ec43b --- /dev/null +++ b/testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions-xml-parser.xhtml @@ -0,0 +1,130 @@ + + + +Custom Elements: create an element for a token must increment and decrement document's throw-on-dynamic-markup-insertion counter + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html b/testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html new file mode 100644 index 0000000000..e798d332e3 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html @@ -0,0 +1,117 @@ + + + +Custom Elements: create an element for a token must increment and decrement document's throw-on-dynamic-markup-insertion counter + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/upgrading.html b/testing/web-platform/tests/custom-elements/upgrading.html new file mode 100644 index 0000000000..9a28fcbe12 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/upgrading.html @@ -0,0 +1,258 @@ + + + +Custom Elements: Enqueue a custom element upgrade reaction + + + + + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/upgrading/Document-importNode-customized-builtins.html b/testing/web-platform/tests/custom-elements/upgrading/Document-importNode-customized-builtins.html new file mode 100644 index 0000000000..91c9ea8aee --- /dev/null +++ b/testing/web-platform/tests/custom-elements/upgrading/Document-importNode-customized-builtins.html @@ -0,0 +1,32 @@ + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/upgrading/Document-importNode.html b/testing/web-platform/tests/custom-elements/upgrading/Document-importNode.html new file mode 100644 index 0000000000..3da4ccf46a --- /dev/null +++ b/testing/web-platform/tests/custom-elements/upgrading/Document-importNode.html @@ -0,0 +1,32 @@ + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html b/testing/web-platform/tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html new file mode 100644 index 0000000000..5e1122cc84 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html @@ -0,0 +1,48 @@ + + + +Custom Elements: Upgrading + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/upgrading/Node-cloneNode.html b/testing/web-platform/tests/custom-elements/upgrading/Node-cloneNode.html new file mode 100644 index 0000000000..1a05e96964 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/upgrading/Node-cloneNode.html @@ -0,0 +1,206 @@ + + + +Custom Elements: Upgrading + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/upgrading/upgrading-enqueue-reactions.html b/testing/web-platform/tests/custom-elements/upgrading/upgrading-enqueue-reactions.html new file mode 100644 index 0000000000..8238eee624 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/upgrading/upgrading-enqueue-reactions.html @@ -0,0 +1,158 @@ + + + +Custom Elements: Upgrading custom elements should enqueue attributeChanged and connected callbacks + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/custom-elements/upgrading/upgrading-parser-created-element.html b/testing/web-platform/tests/custom-elements/upgrading/upgrading-parser-created-element.html new file mode 100644 index 0000000000..0f7f95786d --- /dev/null +++ b/testing/web-platform/tests/custom-elements/upgrading/upgrading-parser-created-element.html @@ -0,0 +1,125 @@ + + + +Custom Elements: Upgrading unresolved elements + + + + + + + +
+ + + + + + + + + + diff --git a/testing/web-platform/tests/custom-elements/when-defined-reentry-crash.html b/testing/web-platform/tests/custom-elements/when-defined-reentry-crash.html new file mode 100644 index 0000000000..38614cbbd7 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/when-defined-reentry-crash.html @@ -0,0 +1,25 @@ + + +Check for crashes when a whenDefined promise resolving re-entries + + + + + +Test passes if it does not crash. diff --git a/testing/web-platform/tests/custom-elements/xhtml-crash.xhtml b/testing/web-platform/tests/custom-elements/xhtml-crash.xhtml new file mode 100644 index 0000000000..8b45d2ecc8 --- /dev/null +++ b/testing/web-platform/tests/custom-elements/xhtml-crash.xhtml @@ -0,0 +1,16 @@ + + + + + + + -- cgit v1.2.3