From f0f68a84af35b82fc39896ac62770a2916ef9dd8 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Tue, 10 Jan 2023 02:47:00 -0800 Subject: [PATCH] Resync web-platform-tests/custom-elements https://bugs.webkit.org/show_bug.cgi?id=250362 Reviewed by Tim Nguyen. Resync web platform tests for custom elements as of ea3e60a85b107903fa9855e0f2c7dba4fae1f921. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-customized-builtins-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-customized-builtins.html: Added. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement.html: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-customized-builtins-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-customized-builtins.html: Copied from LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS.html: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-customized-builtins-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-customized-builtins.html: Added. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define.html: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-customized-builtins-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-customized-builtins.html: Copied from LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments-customized-builtins-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments-customized-builtins.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-customized-builtins-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-customized-builtins.html: Copied from LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined.html: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLModElement-expected.txt: Removed. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptGroupElement-expected.txt: Removed. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLAreaElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLAreaElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLAreaElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLAreaElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLBaseElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLBaseElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLBaseElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLBaseElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLButtonElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLButtonElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLButtonElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLButtonElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLCanvasElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLCanvasElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLCanvasElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLCanvasElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLDataElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLDataElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLDataElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLDataElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLDetailsElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLDetailsElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLDetailsElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLDetailsElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLEmbedElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLEmbedElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLEmbedElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLEmbedElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLFieldSetElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLFieldSetElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLFieldSetElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLFieldSetElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLImageElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLImageElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLImageElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLImageElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLInputElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLInputElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLInputElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLInputElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLLIElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLLIElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLLIElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLLIElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLLabelElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLLabelElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLLabelElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLLabelElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMapElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMapElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMapElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMapElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMediaElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMediaElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMediaElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMediaElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMetaElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMetaElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMetaElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMetaElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMeterElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMeterElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMeterElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMeterElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLModElement-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLModElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLModElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLOListElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOListElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLOListElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOListElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLOptGroupElement-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLOptGroupElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptGroupElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLParamElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLParamElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLParamElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLParamElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLProgressElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLProgressElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLProgressElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLProgressElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLQuoteElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLQuoteElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLQuoteElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLQuoteElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLSlotElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLSlotElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLSlotElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLSlotElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLSourceElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLSourceElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLSourceElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLSourceElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLStyleElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLStyleElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLStyleElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLStyleElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTableCellElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableCellElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTableCellElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableCellElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTableColElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableColElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTableColElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableColElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTimeElement-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTimeElement-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTimeElement.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTimeElement.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/w3c-import.log: Added. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode-customized-builtins-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode-customized-builtins.html: Copied from LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode.html. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode.html: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html: Added. * LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/w3c-import.log: Canonical link: https://commits.webkit.org/258711@main --- ...teElement-customized-builtins-expected.txt | 6 + ...ent-createElement-customized-builtins.html | 104 ++++++++++++++++ .../Document-createElement-expected.txt | 4 - .../Document-createElement.html | 75 ----------- ...ElementNS-customized-builtins-expected.txt | 5 + ...t-createElementNS-customized-builtins.html | 43 +++++++ .../Document-createElementNS-expected.txt | 3 - .../Document-createElementNS.html | 33 ----- .../define-customized-builtins-expected.txt | 33 +++++ .../define-customized-builtins.html | 88 +++++++++++++ .../define-expected.txt | 31 ----- .../custom-element-registry/define.html | 30 ----- .../custom-element-registry/w3c-import.log | 1 + ...newtarget-customized-builtins-expected.txt | 12 ++ .../newtarget-customized-builtins.html | 116 ++++++++++++++++++ .../htmlconstructor/newtarget-expected.txt | 10 -- .../htmlconstructor/newtarget.html | 103 ---------------- .../htmlconstructor/w3c-import.log | 1 + ...ragments-customized-builtins-expected.txt} | 0 ...g-html-fragments-customized-builtins.html} | 0 .../custom-elements/parser/w3c-import.log | 2 +- ...s-defined-customized-builtins-expected.txt | 19 +++ ...udo-class-defined-customized-builtins.html | 81 ++++++++++++ .../pseudo-class-defined-expected.txt | 16 --- .../custom-elements/pseudo-class-defined.html | 42 +++---- .../reactions/HTMLModElement-expected.txt | 10 -- .../HTMLOptGroupElement-expected.txt | 7 -- .../HTMLAreaElement-expected.txt | 0 .../HTMLAreaElement.html | 4 +- .../HTMLBaseElement-expected.txt | 0 .../HTMLBaseElement.html | 4 +- .../HTMLButtonElement-expected.txt | 0 .../HTMLButtonElement.html | 4 +- .../HTMLCanvasElement-expected.txt | 0 .../HTMLCanvasElement.html | 4 +- .../HTMLDataElement-expected.txt | 0 .../HTMLDataElement.html | 4 +- .../HTMLDetailsElement-expected.txt | 0 .../HTMLDetailsElement.html | 4 +- .../HTMLEmbedElement-expected.txt | 0 .../HTMLEmbedElement.html | 4 +- .../HTMLFieldSetElement-expected.txt | 0 .../HTMLFieldSetElement.html | 4 +- .../HTMLImageElement-expected.txt | 0 .../HTMLImageElement.html | 4 +- .../HTMLInputElement-expected.txt | 0 .../HTMLInputElement.html | 4 +- .../HTMLLIElement-expected.txt | 0 .../HTMLLIElement.html | 4 +- .../HTMLLabelElement-expected.txt | 0 .../HTMLLabelElement.html | 4 +- .../HTMLMapElement-expected.txt | 0 .../HTMLMapElement.html | 4 +- .../HTMLMediaElement-expected.txt | 0 .../HTMLMediaElement.html | 4 +- .../HTMLMetaElement-expected.txt | 0 .../HTMLMetaElement.html | 4 +- .../HTMLMeterElement-expected.txt | 0 .../HTMLMeterElement.html | 4 +- .../HTMLModElement-expected.txt | 5 + .../HTMLModElement.html | 0 .../HTMLOListElement-expected.txt | 0 .../HTMLOListElement.html | 4 +- .../HTMLOptGroupElement-expected.txt | 5 + .../HTMLOptGroupElement.html | 0 .../HTMLParamElement-expected.txt | 0 .../HTMLParamElement.html | 4 +- .../HTMLProgressElement-expected.txt | 0 .../HTMLProgressElement.html | 4 +- .../HTMLQuoteElement-expected.txt | 0 .../HTMLQuoteElement.html | 4 +- .../HTMLSlotElement-expected.txt | 0 .../HTMLSlotElement.html | 4 +- .../HTMLSourceElement-expected.txt | 0 .../HTMLSourceElement.html | 4 +- .../HTMLStyleElement-expected.txt | 0 .../HTMLStyleElement.html | 4 +- .../HTMLTableCellElement-expected.txt | 0 .../HTMLTableCellElement.html | 4 +- .../HTMLTableColElement-expected.txt | 0 .../HTMLTableColElement.html | 4 +- .../HTMLTimeElement-expected.txt | 0 .../HTMLTimeElement.html | 4 +- .../customized-builtins/w3c-import.log | 44 +++++++ .../custom-elements/reactions/w3c-import.log | 28 ----- ...mportNode-customized-builtins-expected.txt | 4 + ...cument-importNode-customized-builtins.html | 32 +++++ .../Document-importNode-expected.txt | 2 - .../upgrading/Document-importNode.html | 24 ---- ...cloneNode-customized-builtins-expected.txt | 3 + .../Node-cloneNode-customized-builtins.html | 48 ++++++++ .../upgrading/Node-cloneNode-expected.txt | 1 - .../upgrading/Node-cloneNode.html | 29 ----- .../custom-elements/upgrading/w3c-import.log | 2 + .../custom-elements/w3c-import.log | 3 + 95 files changed, 723 insertions(+), 486 deletions(-) create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-customized-builtins-expected.txt create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-customized-builtins.html create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-customized-builtins-expected.txt create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-customized-builtins.html create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-customized-builtins-expected.txt create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-customized-builtins.html create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-customized-builtins-expected.txt create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-customized-builtins.html rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/{serializing-html-fragments-expected.txt => serializing-html-fragments-customized-builtins-expected.txt} (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/{serializing-html-fragments.html => serializing-html-fragments-customized-builtins.html} (100%) create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-customized-builtins-expected.txt create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-customized-builtins.html delete mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLModElement-expected.txt delete mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptGroupElement-expected.txt rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLAreaElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLAreaElement.html (95%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLBaseElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLBaseElement.html (87%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLButtonElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLButtonElement.html (95%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLCanvasElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLCanvasElement.html (85%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLDataElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLDataElement.html (82%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLDetailsElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLDetailsElement.html (82%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLEmbedElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLEmbedElement.html (89%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLFieldSetElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLFieldSetElement.html (88%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLImageElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLImageElement.html (96%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLInputElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLInputElement.html (96%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLLIElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLLIElement.html (90%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLLabelElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLLabelElement.html (88%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLMapElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLMapElement.html (85%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLMediaElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLMediaElement.html (97%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLMetaElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLMetaElement.html (95%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLMeterElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLMeterElement.html (93%) create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLModElement-expected.txt rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLModElement.html (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLOListElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLOListElement.html (86%) create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLOptGroupElement-expected.txt rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLOptGroupElement.html (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLParamElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLParamElement.html (91%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLProgressElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLProgressElement.html (85%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLQuoteElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLQuoteElement.html (87%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLSlotElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLSlotElement.html (82%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLSourceElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLSourceElement.html (98%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLStyleElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLStyleElement.html (84%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLTableCellElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLTableCellElement.html (94%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLTableColElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLTableColElement.html (86%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLTimeElement-expected.txt (100%) rename LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/{ => customized-builtins}/HTMLTimeElement.html (83%) create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/w3c-import.log create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode-customized-builtins-expected.txt create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode-customized-builtins.html create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins-expected.txt create mode 100644 LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-customized-builtins-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-customized-builtins-expected.txt new file mode 100644 index 0000000000000..3c1a875c74ba7 --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-customized-builtins-expected.txt @@ -0,0 +1,6 @@ + +PASS document.createElement must create an instance of autonomous custom elements when it has is attribute +FAIL document.createElement()'s second argument is to be ignored when it's a string assert_true: expected true got false +FAIL document.createElement must report an exception thrown by a custom built-in element constructor assert_throws_exactly: function "function () { new ThrowCustomBuiltinElement; }" threw object "TypeError: Illegal constructor" but we expected it to throw object "[object Object]" +FAIL document.createElement with unknown "is" value should create "undefined" state element assert_true: Undefined element is upgraded on connecting to a document expected true got false + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-customized-builtins.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-customized-builtins.html new file mode 100644 index 0000000000000..779b8affcba16 --- /dev/null +++ b/LayoutTests/imported/w3c/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/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-expected.txt index 919e4ec1f75bd..341e3b234993e 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-expected.txt @@ -1,7 +1,5 @@ PASS document.createElement must create an instance of custom elements -PASS document.createElement must create an instance of autonomous custom elements when it has is attribute -FAIL document.createElement()'s second argument is to be ignored when it's a string assert_true: expected true got false PASS document.createElement must report a TypeError when the result of Construct is not a DOM node PASS document.createElement must report a TypeError when the result of Construct is a TextNode PASS document.createElement must report a NotSupportedError when attribute is added by setAttribute during construction @@ -36,7 +34,5 @@ PASS document.createElement must report a NotSupportedError when the element is PASS document.createElement must not report a NotSupportedError when the element is adopted back from a an HTML document fetched by XHR during construction PASS document.createElement must report a NotSupportedError when the local name of the element does not match that of the custom element PASS document.createElement must report an exception thrown by a custom element constructor -FAIL document.createElement must report an exception thrown by a custom built-in element constructor assert_throws_exactly: function "function () { new ThrowCustomBuiltinElement; }" threw object "TypeError: Illegal constructor" but we expected it to throw object "[object Object]" -FAIL document.createElement with unknown "is" value should create "undefined" state element assert_true: Undefined element is upgraded on connecting to a document expected true got false PASS document.createElement with undefined options value should be upgraded. diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement.html index 64b6f25b5e7bc..7772f36e20d9b 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement.html @@ -29,42 +29,6 @@ }, 'document.createElement must create an instance of custom elements'); -test(function () { - class AutonomousCustomElement extends HTMLElement {}; - class IsCustomElement extends HTMLElement {}; - - customElements.define('autonomous-custom-element', AutonomousCustomElement); - customElements.define('is-custom-element', IsCustomElement); - - var instance = document.createElement('autonomous-custom-element', { is: 'is-custom-element'}); - - assert_true(instance instanceof AutonomousCustomElement); - assert_equals(instance.localName, 'autonomous-custom-element'); - assert_equals(instance.namespaceURI, 'http://www.w3.org/1999/xhtml', 'A custom element HTML must use HTML namespace'); - - var instance2 = document.createElement('undefined-element', { is: 'is-custom-element'}); - assert_false(instance2.matches(':defined')); - class DefinedLater extends HTMLElement {} - customElements.define('undefined-element', DefinedLater); - document.body.appendChild(instance2); - assert_true(instance2 instanceof DefinedLater); -}, 'document.createElement must create an instance of autonomous custom elements when it has is attribute'); - -test(() => { - class SuperP extends HTMLParagraphElement {} - customElements.define("super-p", SuperP, { extends: "p" }); - - const superP = document.createElement("p", { is: "super-p" }); - assert_true(superP instanceof HTMLParagraphElement); - assert_true(superP instanceof SuperP); - assert_equals(superP.localName, "p"); - - const notSuperP = document.createElement("p", "super-p"); - assert_true(notSuperP instanceof HTMLParagraphElement); - assert_false(notSuperP instanceof SuperP); - assert_equals(notSuperP.localName, "p"); -}, "document.createElement()'s second argument is to be ignored when it's a string"); - function assert_reports(expected, testFunction, message) { var uncaughtError = null; window.onerror = function (message, url, lineNumber, columnNumber, error) { uncaughtError = error; return true; } @@ -363,45 +327,6 @@ }, 'document.createElement must report an exception thrown by a custom element constructor'); -test(function () { - var exceptionToThrow = {name: 'exception thrown by a custom constructor'}; - class ThrowCustomBuiltinElement extends HTMLDivElement { - constructor() - { - super(); - if (exceptionToThrow) - throw exceptionToThrow; - } - }; - customElements.define('throw-custom-builtin-element', ThrowCustomBuiltinElement, { extends: 'div' }); - - assert_throws_exactly(exceptionToThrow, function () { new ThrowCustomBuiltinElement; }); - var instance; - assert_reports(exceptionToThrow, function () { instance = document.createElement('div', { is: 'throw-custom-builtin-element' }); }); - assert_equals(instance.localName, 'div'); - assert_true(instance instanceof HTMLDivElement); - - exceptionToThrow = false; - var instance = document.createElement('div', { is: 'throw-custom-builtin-element' }); - assert_true(instance instanceof ThrowCustomBuiltinElement); - assert_equals(instance.localName, 'div'); - -}, 'document.createElement must report an exception thrown by a custom built-in element constructor'); - -test(() => { - class MyElement extends HTMLDivElement {} - - // createElement with unknown 'is' should not throw. - // https://github.com/w3c/webcomponents/issues/608 - let div = document.createElement('div', { is: 'my-div' }); - assert_false(div instanceof MyElement); - assert_false(div.hasAttribute('is')); - - customElements.define('my-div', MyElement, { extends: 'div' }); - document.body.appendChild(div); - assert_true(div instanceof MyElement, 'Undefined element is upgraded on connecting to a document'); -}, 'document.createElement with unknown "is" value should create "undefined" state element'); - test(() => { class MyElement extends HTMLElement { constructor() { diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-customized-builtins-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-customized-builtins-expected.txt new file mode 100644 index 0000000000000..43272d4fc2bd0 --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-customized-builtins-expected.txt @@ -0,0 +1,5 @@ + +FAIL builtin: document.createElementNS should create custom elements with prefixes. assert_true: expected true got false +PASS builtin: document.createElementNS should check namespaces. +FAIL document.createElementNS()'s third argument is to be ignored when it's a string assert_true: expected true got false + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-customized-builtins.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-customized-builtins.html new file mode 100644 index 0000000000000..ce7ab4aa222ee --- /dev/null +++ b/LayoutTests/imported/w3c/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/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-expected.txt index 85672421636fc..6f7ac2ac9db1c 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-expected.txt @@ -3,7 +3,4 @@ PASS autonomous: document.createElementNS should create custom elements with pre PASS autonomous: document.createElementNS should check namespaces. PASS autonomous: document.createElementNS should not create HTMLUnknownElement for a valid custom element name PASS autonomous: document.createElementNS with undefined options value should be upgraded. -FAIL builtin: document.createElementNS should create custom elements with prefixes. assert_true: expected true got false -PASS builtin: document.createElementNS should check namespaces. -FAIL document.createElementNS()'s third argument is to be ignored when it's a string assert_true: expected true got false diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS.html index 32613c47e2410..bf937df0ba3f5 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS.html @@ -39,38 +39,5 @@ assert_true(instance instanceof MyElement3); }, 'autonomous: document.createElementNS with undefined options value should be upgraded.'); -test(() => { - class MyBuiltinElement extends HTMLElement {}; - - customElements.define('my-builtin', MyBuiltinElement, { extends: 'address' }); - let element = document.createElementNS('http://www.w3.org/1999/xhtml', 'p:address', { is: 'my-builtin'}); - assert_true(element instanceof MyBuiltinElement); - assert_equals(element.prefix, 'p'); - assert_false(element.hasAttribute('is')); -}, 'builtin: document.createElementNS should create custom elements with prefixes.'); - -test(() => { - class MyBuiltinElement2 extends HTMLElement {}; - - customElements.define('my-builtin2', MyBuiltinElement2, { extends: 'address'}); - let element = document.createElementNS('urn:example', 'address', { is: 'my-builtin2' }); - assert_false(element instanceof MyBuiltinElement2); - assert_false(element.hasAttribute('is')); -}, 'builtin: document.createElementNS should check namespaces.'); - -test(() => { - class SuperP extends HTMLParagraphElement {} - customElements.define("super-p", SuperP, { extends: "p" }); - - const superP = document.createElementNS("http://www.w3.org/1999/xhtml", "p", { is: "super-p" }); - assert_true(superP instanceof HTMLParagraphElement); - assert_true(superP instanceof SuperP); - assert_equals(superP.localName, "p"); - - const notSuperP = document.createElementNS("http://www.w3.org/1999/xhtml", "p", "super-p"); - assert_true(notSuperP instanceof HTMLParagraphElement); - assert_false(notSuperP instanceof SuperP); - assert_equals(notSuperP.localName, "p"); -}, "document.createElementNS()'s third argument is to be ignored when it's a string"); diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-customized-builtins-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-customized-builtins-expected.txt new file mode 100644 index 0000000000000..631010be1514b --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-customized-builtins-expected.txt @@ -0,0 +1,33 @@ + +FAIL If extends is a-, should throw a NotSupportedError assert_throws_dom: function "() => { + customElements.define('test-define-extend-valid-name', class {}, { extends: name }); + }" did not throw +PASS If extends is a-a, should throw a NotSupportedError +PASS If extends is aa-, should throw a NotSupportedError +PASS If extends is aa-a, should throw a NotSupportedError +PASS If extends is a-.-_, should throw a NotSupportedError +PASS If extends is a-0123456789, should throw a NotSupportedError +PASS If extends is a-漢字, should throw a NotSupportedError +PASS If extends is a-𠀋, should throw a NotSupportedError +FAIL If extends is bgsound, should throw a NotSupportedError assert_throws_dom: function "() => { + customElements.define('test-define-extend-' + name, class {}, { extends: name }); + }" did not throw +FAIL If extends is blink, should throw a NotSupportedError assert_throws_dom: function "() => { + customElements.define('test-define-extend-' + name, class {}, { extends: name }); + }" did not throw +FAIL If extends is isindex, should throw a NotSupportedError assert_throws_dom: function "() => { + customElements.define('test-define-extend-' + name, class {}, { extends: name }); + }" did not throw +FAIL If extends is multicol, should throw a NotSupportedError assert_throws_dom: function "() => { + customElements.define('test-define-extend-' + name, class {}, { extends: name }); + }" did not throw +FAIL If extends is nextid, should throw a NotSupportedError assert_throws_dom: function "() => { + customElements.define('test-define-extend-' + name, class {}, { extends: name }); + }" did not throw +FAIL If extends is spacer, should throw a NotSupportedError assert_throws_dom: function "() => { + customElements.define('test-define-extend-' + name, class {}, { extends: name }); + }" did not throw +FAIL If extends is elementnametobeunknownelement, should throw a NotSupportedError assert_throws_dom: function "() => { + customElements.define('test-define-extend-' + name, class {}, { extends: name }); + }" did not throw + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-customized-builtins.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-customized-builtins.html new file mode 100644 index 0000000000000..b691033871c05 --- /dev/null +++ b/LayoutTests/imported/w3c/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/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-expected.txt index 4a5d8200347aa..23ce50bf18d82 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-expected.txt @@ -42,37 +42,6 @@ PASS Element names: defining an element named font-face-name should throw a Synt PASS Element names: defining an element named missing-glyph should throw a SyntaxError PASS If the name is already defined, should throw a NotSupportedError PASS If the constructor is already defined, should throw a NotSupportedError -FAIL If extends is a-, should throw a NotSupportedError assert_throws_dom: function "() => { - customElements.define('test-define-extend-valid-name', class {}, { extends: name }); - }" did not throw -PASS If extends is a-a, should throw a NotSupportedError -PASS If extends is aa-, should throw a NotSupportedError -PASS If extends is aa-a, should throw a NotSupportedError -PASS If extends is a-.-_, should throw a NotSupportedError -PASS If extends is a-0123456789, should throw a NotSupportedError -PASS If extends is a-漢字, should throw a NotSupportedError -PASS If extends is a-𠀋, should throw a NotSupportedError -FAIL If extends is bgsound, should throw a NotSupportedError assert_throws_dom: function "() => { - customElements.define('test-define-extend-' + name, class {}, { extends: name }); - }" did not throw -FAIL If extends is blink, should throw a NotSupportedError assert_throws_dom: function "() => { - customElements.define('test-define-extend-' + name, class {}, { extends: name }); - }" did not throw -FAIL If extends is isindex, should throw a NotSupportedError assert_throws_dom: function "() => { - customElements.define('test-define-extend-' + name, class {}, { extends: name }); - }" did not throw -FAIL If extends is multicol, should throw a NotSupportedError assert_throws_dom: function "() => { - customElements.define('test-define-extend-' + name, class {}, { extends: name }); - }" did not throw -FAIL If extends is nextid, should throw a NotSupportedError assert_throws_dom: function "() => { - customElements.define('test-define-extend-' + name, class {}, { extends: name }); - }" did not throw -FAIL If extends is spacer, should throw a NotSupportedError assert_throws_dom: function "() => { - customElements.define('test-define-extend-' + name, class {}, { extends: name }); - }" did not throw -FAIL If extends is elementnametobeunknownelement, should throw a NotSupportedError assert_throws_dom: function "() => { - customElements.define('test-define-extend-' + name, class {}, { extends: name }); - }" did not throw PASS If constructor.prototype throws, should rethrow PASS If Type(constructor.prototype) is undefined, should throw a TypeError PASS If Type(constructor.prototype) is string, should throw a TypeError diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define.html index 2aad1c18025af..d3d923bd916fd 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define.html @@ -130,36 +130,6 @@ }); }, 'If the constructor is already defined, should throw a NotSupportedError'); - // 9.1. If extends is a valid custom element name, - // then throw a NotSupportedError. - validCustomElementNames.forEach(name => { - test(() => { - assert_throws_dom(expectNotSupportedError, testWindow.DOMException, () => { - customElements.define('test-define-extend-valid-name', class {}, { extends: name }); - }); - }, `If extends is ${name}, should throw a NotSupportedError`); - }); - - // 9.2. If the element interface for extends and the HTML namespace is HTMLUnknownElement - // (e.g., if extends does not indicate an element definition in this specification), - // then throw a NotSupportedError. - [ - // https://html.spec.whatwg.org/multipage/dom.html#elements-in-the-dom:htmlunknownelement - 'bgsound', - 'blink', - 'isindex', - 'multicol', - 'nextid', - 'spacer', - 'elementnametobeunknownelement', - ].forEach(name => { - test(() => { - assert_throws_dom(expectNotSupportedError, testWindow.DOMException, () => { - customElements.define('test-define-extend-' + name, class {}, { extends: name }); - }); - }, `If extends is ${name}, should throw a NotSupportedError`); - }); - // 12.1. Let prototype be Get(constructor, "prototype"). Rethrow any exceptions. const err = new Error('check this is rethrown'); err.name = 'rethrown'; diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/w3c-import.log index 75f0472854a17..dce453488018e 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/w3c-import.log +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/w3c-import.log @@ -14,6 +14,7 @@ Property values requiring vendor prefixes: None ------------------------------------------------------------------------ List of files: +/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define-customized-builtins.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/per-global.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/upgrade.html diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-customized-builtins-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-customized-builtins-expected.txt new file mode 100644 index 0000000000000..2d428e1b29620 --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-customized-builtins-expected.txt @@ -0,0 +1,12 @@ + +FAIL If prototype is not object (null), derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" +FAIL If prototype is not object (null), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" +FAIL If prototype is not object (undefined), derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" +FAIL If prototype is not object (undefined), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" +FAIL If prototype is not object (5), derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" +FAIL If prototype is not object (5), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" +FAIL If prototype is not object (string), derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" +FAIL If prototype is not object (string), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" +PASS HTMLParagraphElement constructor must not get .prototype until it finishes its extends sanity checks, calling proxy constructor directly +PASS HTMLParagraphElement constructor must not get .prototype until it finishes its extends sanity checks, calling via Reflect + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-customized-builtins.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-customized-builtins.html new file mode 100644 index 0000000000000..60c63936d4caa --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-customized-builtins.html @@ -0,0 +1,116 @@ + +Custom Elements: [HTMLConstructor] derives prototype from NewTarget + + + + + + + + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt index 8c9c3ad6faa47..5dd487b930ace 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt @@ -9,14 +9,4 @@ PASS If prototype is not object (5), derives the fallback from NewTarget's realm PASS If prototype is not object (5), derives the fallback from NewTarget's GetFunctionRealm (autonomous custom elements) PASS If prototype is not object (string), derives the fallback from NewTarget's realm (autonomous custom elements) PASS If prototype is not object (string), derives the fallback from NewTarget's GetFunctionRealm (autonomous custom elements) -FAIL If prototype is not object (null), derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" -FAIL If prototype is not object (null), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" -FAIL If prototype is not object (undefined), derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" -FAIL If prototype is not object (undefined), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" -FAIL If prototype is not object (5), derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" -FAIL If prototype is not object (5), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" -FAIL If prototype is not object (string), derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" -FAIL If prototype is not object (string), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" -PASS HTMLParagraphElement constructor must not get .prototype until it finishes its extends sanity checks, calling proxy constructor directly -PASS HTMLParagraphElement constructor must not get .prototype until it finishes its extends sanity checks, calling via Reflect diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html index d2eb022d85444..b6e7f3453756e 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html @@ -126,108 +126,5 @@ }, "If prototype is not object (" + notAnObject + "), derives the fallback from NewTarget's GetFunctionRealm (autonomous custom elements)"); }); -[null, undefined, 5, "string"].forEach(function (notAnObject) { - test_with_window(w => { - // We have to return an object during define(), but not during super() - let returnNotAnObject = false; - - function TestElement() { - const o = Reflect.construct(w.HTMLParagraphElement, [], new.target); - - assert_equals(Object.getPrototypeOf(o), window.HTMLParagraphElement.prototype, - "Must use the HTMLParagraphElement from the realm of NewTarget"); - assert_not_equals(Object.getPrototypeOf(o), w.HTMLParagraphElement.prototype, - "Must not use the HTMLParagraphElement from the realm of the active function object (w.HTMLParagraphElement)"); - - return o; - } - - const ElementWithDynamicPrototype = new Proxy(TestElement, { - get: function (target, name) { - if (name == "prototype") - return returnNotAnObject ? notAnObject : {}; - return target[name]; - } - }); - - w.customElements.define("test-element", ElementWithDynamicPrototype, { extends: "p" }); - - returnNotAnObject = true; - new ElementWithDynamicPrototype(); - }, "If prototype is not object (" + notAnObject + "), derives the fallback from NewTarget's realm (customized built-in elements)"); - - test_with_window(w => { - // We have to return an object during define(), but not during super() - let returnNotAnObject = false; - - function TestElement() { - const o = Reflect.construct(w.HTMLParagraphElement, [], new.target); - - assert_equals(Object.getPrototypeOf(o), window.HTMLParagraphElement.prototype, - "Must use the HTMLParagraphElement from the realm of NewTarget"); - assert_not_equals(Object.getPrototypeOf(o), w.HTMLParagraphElement.prototype, - "Must not use the HTMLParagraphElement from the realm of the active function object (w.HTMLParagraphElement)"); - - return o; - } - - // Create the proxy in the subframe, which should not affect what our - // prototype ends up as. - const ElementWithDynamicPrototype = new w.Proxy(TestElement, { - get: function (target, name) { - if (name == "prototype") - return returnNotAnObject ? notAnObject : {}; - return target[name]; - } - }); - - w.customElements.define("test-element", ElementWithDynamicPrototype, { extends: "p" }); - - returnNotAnObject = true; - new ElementWithDynamicPrototype(); - }, "If prototype is not object (" + notAnObject + "), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements)"); -}); - -test_with_window(w => { - class SomeCustomElement extends HTMLParagraphElement {}; - var getCount = 0; - var countingProxy = new Proxy(SomeCustomElement, { - get: function(target, prop, receiver) { - if (prop == "prototype") { - ++getCount; - } - return Reflect.get(target, prop, receiver); - } - }); - w.customElements.define("failure-counting-element", countingProxy); - // define() gets the prototype of the constructor it's passed, so - // reset the counter. - getCount = 0; - assert_throws_js(TypeError, - function () { new countingProxy() }, - "Should not be able to construct an HTMLParagraphElement not named 'p'"); - assert_equals(getCount, 0, "Should never have gotten .prototype"); -}, 'HTMLParagraphElement constructor must not get .prototype until it finishes its extends sanity checks, calling proxy constructor directly'); - -test_with_window(w => { - class SomeCustomElement extends HTMLParagraphElement {}; - var getCount = 0; - var countingProxy = new Proxy(SomeCustomElement, { - get: function(target, prop, receiver) { - if (prop == "prototype") { - ++getCount; - } - return Reflect.get(target, prop, receiver); - } - }); - w.customElements.define("failure-counting-element", countingProxy); - // define() gets the prototype of the constructor it's passed, so - // reset the counter. - getCount = 0; - assert_throws_js(TypeError, - function () { Reflect.construct(HTMLParagraphElement, [], countingProxy) }, - "Should not be able to construct an HTMLParagraphElement not named 'p'"); - assert_equals(getCount, 0, "Should never have gotten .prototype"); -}, 'HTMLParagraphElement constructor must not get .prototype until it finishes its extends sanity checks, calling via Reflect'); diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/w3c-import.log index 9ec9fa81d4f58..99cfdb26a58af 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/w3c-import.log +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/w3c-import.log @@ -14,4 +14,5 @@ Property values requiring vendor prefixes: None ------------------------------------------------------------------------ List of files: +/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-customized-builtins.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments-customized-builtins-expected.txt similarity index 100% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments-expected.txt rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments-customized-builtins-expected.txt diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments-customized-builtins.html similarity index 100% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments.html rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments-customized-builtins.html diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/w3c-import.log index 4fbde24732416..82197270f5e85 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/w3c-import.log +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/w3c-import.log @@ -24,4 +24,4 @@ List of files: /LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-uses-constructed-element.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-uses-create-an-element-for-a-token-svg.svg /LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document.html -/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments.html +/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments-customized-builtins.html diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-customized-builtins-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-customized-builtins-expected.txt new file mode 100644 index 0000000000000..7ae3d99a1d649 --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-customized-builtins-expected.txt @@ -0,0 +1,19 @@ + + +FAIL should not be :defined assert_equals: matches(":defined") expected false but got true +FAIL createElement("abbr", is:"my-abbr") should not be :defined assert_equals: matches(":defined") expected false but got true +FAIL createElementNS("http://www.w3.org/1999/xhtml", "abbr", is:"my-abbr") should not be :defined assert_equals: matches(":defined") expected false but got true +PASS createElementNS("http://www.w3.org/2000/svg", "abbr", is:"my-abbr") should be :defined +PASS Upgraded createElement("abbr", is:"my-abbr") should be :defined +PASS Upgraded createElementNS("http://www.w3.org/1999/xhtml", "abbr", is:"my-abbr") should be :defined +FAIL Without browsing context: createElement("abbr", is:"my-abbr") should not be :defined assert_equals: matches(":defined") expected false but got true +FAIL Without browsing context: createElementNS("http://www.w3.org/1999/xhtml", "abbr", is:"my-abbr") should not be :defined assert_equals: matches(":defined") expected false but got true +PASS Without browsing context: createElementNS("http://www.w3.org/2000/svg", "abbr", is:"my-abbr") should be :defined +FAIL

should not be :defined assert_equals: matches(":defined") expected false but got true +FAIL createElement("p", is:"") should not be :defined assert_equals: matches(":defined") expected false but got true +FAIL createElementNS("http://www.w3.org/1999/xhtml", "p", is:"") should not be :defined assert_equals: matches(":defined") expected false but got true +PASS createElementNS("http://www.w3.org/2000/svg", "p", is:"") should be :defined +FAIL Without browsing context: createElement("p", is:"") should not be :defined assert_equals: matches(":defined") expected false but got true +FAIL Without browsing context: createElementNS("http://www.w3.org/1999/xhtml", "p", is:"") should not be :defined assert_equals: matches(":defined") expected false but got true +PASS Without browsing context: createElementNS("http://www.w3.org/2000/svg", "p", is:"") should be :defined + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-customized-builtins.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-customized-builtins.html new file mode 100644 index 0000000000000..cab343533a9d7 --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-customized-builtins.html @@ -0,0 +1,81 @@ + + + + + + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-expected.txt index 63d78261fe120..2ed70a6110de5 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-expected.txt @@ -24,20 +24,4 @@ PASS createElementNS("http://www.w3.org/2000/svg", "font-face") should be :defin PASS Without browsing context: createElement("font-face") should be :defined PASS Without browsing context: createElementNS("http://www.w3.org/1999/xhtml", "font-face") should be :defined PASS Without browsing context: createElementNS("http://www.w3.org/2000/svg", "font-face") should be :defined -FAIL should not be :defined assert_equals: matches(":defined") expected false but got true -FAIL createElement("abbr", { is: "my-abbr" }) should not be :defined assert_equals: matches(":defined") expected false but got true -FAIL createElementNS("http://www.w3.org/1999/xhtml", "abbr", { is: "my-abbr" }) should not be :defined assert_equals: matches(":defined") expected false but got true -PASS createElementNS("http://www.w3.org/2000/svg", "abbr", { is: "my-abbr" }) should be :defined -PASS Upgraded createElement("abbr", { is: "my-abbr" }) should be :defined -PASS Upgraded createElementNS("http://www.w3.org/1999/xhtml", "abbr", { is: "my-abbr" }) should be :defined -FAIL Without browsing context: createElement("abbr", { is: "my-abbr" }) should not be :defined assert_equals: matches(":defined") expected false but got true -FAIL Without browsing context: createElementNS("http://www.w3.org/1999/xhtml", "abbr", { is: "my-abbr" }) should not be :defined assert_equals: matches(":defined") expected false but got true -PASS Without browsing context: createElementNS("http://www.w3.org/2000/svg", "abbr", { is: "my-abbr" }) should be :defined -FAIL

should not be :defined assert_equals: matches(":defined") expected false but got true -FAIL createElement("p", { is: "" }) should not be :defined assert_equals: matches(":defined") expected false but got true -FAIL createElementNS("http://www.w3.org/1999/xhtml", "p", { is: "" }) should not be :defined assert_equals: matches(":defined") expected false but got true -PASS createElementNS("http://www.w3.org/2000/svg", "p", { is: "" }) should be :defined -FAIL Without browsing context: createElement("p", { is: "" }) should not be :defined assert_equals: matches(":defined") expected false but got true -FAIL Without browsing context: createElementNS("http://www.w3.org/1999/xhtml", "p", { is: "" }) should not be :defined assert_equals: matches(":defined") expected false but got true -PASS Without browsing context: createElementNS("http://www.w3.org/2000/svg", "p", { is: "" }) should be :defined diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined.html index f5bf2750a058b..89d027adafaaa 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined.html @@ -8,8 +8,6 @@ { tag_name: 'div', defined: true }, { tag_name: 'a-a', defined: false }, { tag_name: 'font-face', defined: true }, - { tag_name: 'abbr', is: 'my-abbr', defined: false }, - { tag_name: 'p', is: '', defined: false }, ]; // Setup iframe to test the parser. @@ -22,19 +20,18 @@ :defined { color:${defined}; } :not(:defined) { color:${not_defined}; } ` - + testList.map(d => `<${d.tag_name}${d.is !== undefined ? ' is=' + d.is : ''}>`).join(''); + + testList.map(d => `<${d.tag_name}>`).join(''); setup({ explicit_done: true }); iframe.onload = () => { const doc = iframe.contentDocument; const doc_without_browsing_context = doc.implementation.createHTMLDocument(); for (const data of testList) { // Test elements inserted by parser. - test_defined(data.defined, doc.getElementsByTagName(data.tag_name)[0], - `<${data.tag_name}${data.is ? ' is=' + data.is : ''}>`); + test_defined(data.defined, doc.getElementsByTagName(data.tag_name)[0], `<${data.tag_name}>`); // Test DOM createElement() methods. - let try_upgrade = !data.defined && (data.is === undefined || data.is.length > 0); - test_defined_for_createElement(data.defined, try_upgrade, doc, data.tag_name, data.is); + let try_upgrade = !data.defined; + test_defined_for_createElement(data.defined, try_upgrade, doc, data.tag_name); // Documents without browsing context should behave the same. test_defined_for_createElement(data.defined, false, doc_without_browsing_context, data.tag_name, data.is, 'Without browsing context: '); @@ -44,39 +41,30 @@ }; function test_defined_for_createElement(defined, should_test_change, doc, tag_name, is, description = '') { - let has_is = is !== undefined; - let is_desc = has_is ? `, { is: "${is}" }` : ''; // Test document.createElement(). - let element = has_is ? doc.createElement(tag_name, { is: is }) : doc.createElement(tag_name); + let element = doc.createElement(tag_name); doc.body.appendChild(element); - test_defined(defined, element, `${description}createElement("${tag_name}"${is_desc})`); + test_defined(defined, element, `${description}createElement("${tag_name}")`); // Test document.createElementNS(). - let html_element = has_is ? doc.createElementNS('http://www.w3.org/1999/xhtml', tag_name, { is: is }) - : doc.createElementNS('http://www.w3.org/1999/xhtml', tag_name); + let html_element = doc.createElementNS('http://www.w3.org/1999/xhtml', tag_name); doc.body.appendChild(html_element); - test_defined(defined, html_element, `${description}createElementNS("http://www.w3.org/1999/xhtml", "${tag_name}"${is_desc})`); + test_defined(defined, html_element, `${description}createElementNS("http://www.w3.org/1999/xhtml", "${tag_name}")`); // If the element namespace is not HTML, it should be "uncustomized"; i.e., "defined". - let svg_element = has_is ? doc.createElementNS('http://www.w3.org/2000/svg', tag_name, { is: is }) - : doc.createElementNS('http://www.w3.org/2000/svg', tag_name); + let svg_element = doc.createElementNS('http://www.w3.org/2000/svg', tag_name); doc.body.appendChild(svg_element); - test_defined(true, svg_element, `${description}createElementNS("http://www.w3.org/2000/svg", "${tag_name}"${is_desc})`); + test_defined(true, svg_element, `${description}createElementNS("http://www.w3.org/2000/svg", "${tag_name}")`); // Test ":defined" changes when the custom element was defined. if (should_test_change) { let w = doc.defaultView; assert_false(!w, 'defaultView required to test change'); - if (is) { - w.customElements.define(is, class extends w.HTMLElement {}, { extends: tag_name }); - } else { - w.customElements.define(tag_name, class extends w.HTMLElement { - constructor() { super(); } - }); - } - - test_defined(true, element, `Upgraded ${description}createElement("${tag_name}"${is_desc})`); - test_defined(true, html_element, `Upgraded ${description}createElementNS("http://www.w3.org/1999/xhtml", "${tag_name}"${is_desc})`); + w.customElements.define(tag_name, class extends w.HTMLElement { + constructor() { super(); } + }); + test_defined(true, element, `Upgraded ${description}createElement("${tag_name}")`); + test_defined(true, html_element, `Upgraded ${description}createElementNS("http://www.w3.org/1999/xhtml", "${tag_name}")`); } } diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLModElement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLModElement-expected.txt deleted file mode 100644 index 76dde7c4c2c48..0000000000000 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLModElement-expected.txt +++ /dev/null @@ -1,10 +0,0 @@ - -FAIL cite on ins use HTMLModElement must enqueue an attributeChanged reaction when adding cite content attribute assert_array_equals: lengths differ, expected array ["constructed"] length 1, got [] length 0 -FAIL cite on ins use HTMLModElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected array ["constructed", "attributeChanged"] length 2, got [] length 0 -FAIL dateTime on ins use HTMLModElement must enqueue an attributeChanged reaction when adding datetime content attribute assert_array_equals: lengths differ, expected array ["constructed"] length 1, got [] length 0 -FAIL dateTime on ins use HTMLModElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected array ["constructed", "attributeChanged"] length 2, got [] length 0 -FAIL cite on del use HTMLModElement must enqueue an attributeChanged reaction when adding cite content attribute assert_array_equals: lengths differ, expected array ["constructed"] length 1, got [] length 0 -FAIL cite on del use HTMLModElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected array ["constructed", "attributeChanged"] length 2, got [] length 0 -FAIL dateTime on del use HTMLModElement must enqueue an attributeChanged reaction when adding datetime content attribute assert_array_equals: lengths differ, expected array ["constructed"] length 1, got [] length 0 -FAIL dateTime on del use HTMLModElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected array ["constructed", "attributeChanged"] length 2, got [] length 0 - diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptGroupElement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptGroupElement-expected.txt deleted file mode 100644 index c0a88a0f7ed91..0000000000000 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptGroupElement-expected.txt +++ /dev/null @@ -1,7 +0,0 @@ - - -FAIL disabled on HTMLOptGroupElement must enqueue an attributeChanged reaction when adding a new attribute assert_array_equals: lengths differ, expected array ["constructed"] length 1, got [] length 0 -FAIL disabled on HTMLOptGroupElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected array ["constructed", "connected", "attributeChanged"] length 3, got [] length 0 -FAIL label on HTMLOptGroupElement must enqueue an attributeChanged reaction when adding a new attribute assert_array_equals: lengths differ, expected array ["constructed"] length 1, got [] length 0 -FAIL label on HTMLOptGroupElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected array ["constructed", "connected"] length 2, got [] length 0 - diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLAreaElement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLAreaElement-expected.txt similarity index 100% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLAreaElement-expected.txt rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLAreaElement-expected.txt diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLAreaElement.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLAreaElement.html similarity index 95% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLAreaElement.html rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLAreaElement.html index 95059b7c8d086..3d53ff87ff08b 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLAreaElement.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLAreaElement.html @@ -6,8 +6,8 @@ - - + + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLBaseElement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLBaseElement-expected.txt similarity index 100% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLBaseElement-expected.txt rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLBaseElement-expected.txt diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLBaseElement.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLBaseElement.html similarity index 87% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLBaseElement.html rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLBaseElement.html index 82ab922804305..8d8470074ccb2 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLBaseElement.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLBaseElement.html @@ -6,8 +6,8 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLInputElement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLInputElement-expected.txt similarity index 100% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLInputElement-expected.txt rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLInputElement-expected.txt diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLInputElement.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLInputElement.html similarity index 96% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLInputElement.html rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLInputElement.html index 13d1591b01fdf..adf43ee74d27a 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLInputElement.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLInputElement.html @@ -7,8 +7,8 @@ - - + + - - + + - - + +

diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMapElement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMapElement-expected.txt similarity index 100% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMapElement-expected.txt rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMapElement-expected.txt diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMapElement.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMapElement.html similarity index 85% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMapElement.html rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMapElement.html index f6bd04bd1f9c9..5b2e674afb79e 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMapElement.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMapElement.html @@ -5,8 +5,8 @@ - - + + yellow pic green pic diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMediaElement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMediaElement-expected.txt similarity index 100% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMediaElement-expected.txt rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMediaElement-expected.txt diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMediaElement.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMediaElement.html similarity index 97% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMediaElement.html rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMediaElement.html index 4f29b35f28b74..58e002c52ca2f 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLMediaElement.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMediaElement.html @@ -6,8 +6,8 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLStyleElement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLStyleElement-expected.txt similarity index 100% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLStyleElement-expected.txt rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLStyleElement-expected.txt diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLStyleElement.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLStyleElement.html similarity index 84% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLStyleElement.html rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLStyleElement.html index 718b3cefc7b76..d68d5cb76dd3d 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLStyleElement.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLStyleElement.html @@ -5,8 +5,8 @@ - - + + - - + +
diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableColElement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTableColElement-expected.txt similarity index 100% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableColElement-expected.txt rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTableColElement-expected.txt diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableColElement.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTableColElement.html similarity index 86% rename from LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableColElement.html rename to LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTableColElement.html index 017c7999f4de9..8e4d1359d8b91 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableColElement.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTableColElement.html @@ -5,8 +5,8 @@ - - + +
- - + + + + + + + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode-expected.txt index 0049384818751..7495d9b783b38 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode-expected.txt @@ -1,6 +1,4 @@ PASS autonomous: document.importNode() should import custom elements successfully PASS autonomous: document.importNode() should import "undefined" custom elements successfully -FAIL built-in: document.importNode() should import custom elements successfully assert_true: expected true got false -FAIL built-in: document.importNode() should import "undefined" custom elements successfully assert_true: expected true got false diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode.html index b80f90648d110..3da4ccf46a860 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode.html @@ -28,29 +28,5 @@ let imported = doc.importNode(original); assert_true(imported instanceof MyElement3); }, 'autonomous: document.importNode() should import "undefined" custom elements successfully'); - -test_with_window((w, doc) => { - class MyDiv extends HTMLDivElement {} - class MyDiv2 extends w.HTMLDivElement {} - customElements.define('my-div', MyDiv, { extends: 'div' }); - w.customElements.define('my-div', MyDiv2, { extends: 'div' }); - - let original = document.createElement('div', { is: 'my-div' }); - assert_true(original instanceof MyDiv); - - let imported = doc.importNode(original); - assert_true(imported instanceof MyDiv2); -}, 'built-in: document.importNode() should import custom elements successfully'); - -test_with_window((w, doc) => { - class MyDiv2 extends w.HTMLDivElement {} - w.customElements.define('my-div2', MyDiv2, { extends: 'div' }); - - let original = document.createElement('div', { is: 'my-div2' }); - assert_equals(original.constructor, HTMLDivElement); - - let imported = doc.importNode(original); - assert_true(imported instanceof MyDiv2); -}, 'built-in: document.importNode() should import "undefined" custom elements successfully'); diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins-expected.txt new file mode 100644 index 0000000000000..331aa9084ff4a --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins-expected.txt @@ -0,0 +1,3 @@ + +FAIL Node.prototype.cloneNode(false) must be able to clone as a customized built-in element when it has an inconsistent "is" attribute assert_true: expected true got false + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html new file mode 100644 index 0000000000000..5e1122cc84b3c --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html @@ -0,0 +1,48 @@ + + + +Custom Elements: Upgrading + + + + + + + + +
+ + + diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt index cd0c6d83b100e..a4e9a0ea67022 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt @@ -1,7 +1,6 @@ PASS Node.prototype.cloneNode(false) must be able to clone a custom element PASS Node.prototype.cloneNode(false) must be able to clone as a autonomous custom element when it contains is attribute -FAIL Node.prototype.cloneNode(false) must be able to clone as a customized built-in element when it has an inconsistent "is" attribute assert_true: expected true got false PASS Node.prototype.cloneNode(false) must be able to clone a custom element inside an iframe PASS Node.prototype.cloneNode(true) must be able to clone a descendent custom element PASS Node.prototype.cloneNode(true) must set parentNode, previousSibling, and nextSibling before upgrading custom elements diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html index 364cecd76debd..1a05e96964f84 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html @@ -49,35 +49,6 @@ 'A cloned custom element must be an instance of the custom element'); }, 'Node.prototype.cloneNode(false) must be able to clone as a autonomous custom element when it contains is attribute'); -test(function () { - class MyDiv1 extends HTMLDivElement {}; - class MyDiv2 extends HTMLDivElement {}; - class MyDiv3 extends HTMLDivElement {}; - customElements.define('my-div1', MyDiv1, { extends: 'div' }); - customElements.define('my-div2', MyDiv2, { extends: 'div' }); - - let instance = document.createElement('div', { is: 'my-div1'}); - assert_true(instance instanceof MyDiv1); - instance.setAttribute('is', 'my-div2'); - let clone = instance.cloneNode(false); - assert_not_equals(instance, clone); - assert_true(clone instanceof MyDiv1, - 'A cloned custom element must be an instance of the custom element even with an inconsistent "is" attribute'); - - let instance3 = document.createElement('div', { is: 'my-div3'}); - assert_false(instance3 instanceof MyDiv3); - instance3.setAttribute('is', 'my-div2'); - let clone3 = instance3.cloneNode(false); - assert_not_equals(instance3, clone); - customElements.define('my-div3', MyDiv3, { extends: 'div' }); - document.body.appendChild(instance3); - document.body.appendChild(clone3); - assert_true(instance3 instanceof MyDiv3, - 'An undefined element must be upgraded even with an inconsistent "is" attribute'); - assert_true(clone3 instanceof MyDiv3, - 'A cloned undefined element must be upgraded even with an inconsistent "is" attribute'); -}, 'Node.prototype.cloneNode(false) must be able to clone as a customized built-in element when it has an inconsistent "is" attribute'); - test_with_window(function (contentWindow) { var contentDocument = contentWindow.document; class MyCustomElement extends contentWindow.HTMLElement {} diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/w3c-import.log index 35ab929a7b29c..175abc42fde63 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/w3c-import.log +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/w3c-import.log @@ -14,7 +14,9 @@ Property values requiring vendor prefixes: None ------------------------------------------------------------------------ List of files: +/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode-customized-builtins.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode.html +/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-enqueue-reactions.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html diff --git a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/w3c-import.log index 8cb1fe1bb9031..f9f5e10f2149b 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/custom-elements/w3c-import.log +++ b/LayoutTests/imported/w3c/web-platform-tests/custom-elements/w3c-import.log @@ -16,8 +16,10 @@ None List of files: /LayoutTests/imported/w3c/web-platform-tests/custom-elements/CustomElementRegistry-constructor-and-callbacks-are-held-strongly.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/CustomElementRegistry.html +/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-customized-builtins.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-svg.svg /LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement.html +/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS-customized-builtins.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/ElementInternals-accessibility.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/HTMLElement-attachInternals.html @@ -39,6 +41,7 @@ List of files: /LayoutTests/imported/w3c/web-platform-tests/custom-elements/perform-microtask-checkpoint-before-construction-xml-parser.xhtml /LayoutTests/imported/w3c/web-platform-tests/custom-elements/perform-microtask-checkpoint-before-construction.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/prevent-extensions-crash.html +/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-customized-builtins.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-print-expected.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-print-ref.html /LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined-print.html