Closed Bug 1543570 Opened 6 years ago Closed 5 years ago

Add test for custom element upgrade exception when construction does not result in an Element

Categories

(Core :: DOM: Core & HTML, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox68 --- wontfix
firefox74 --- fixed

People

(Reporter: karlt, Assigned: edgar)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

https://treeherder.mozilla.org/#/jobs?repo=try&revision=a17ee5026a6c9ea71052dba73c0520abad949bd2 includes changes that, as identified in https://phabricator.services.mozilla.com/D26867#inline-155251 , should have changed DoUpgrade() to throw a TypeError when the construction doesn't result in an Element, but NS_ERROR_DOM_INVALID_STATE_ERR is required at https://html.spec.whatwg.org/multipage/custom-elements.html#concept-upgrade-an-element

It seems that there are either no tests for this or the test is not running.

See also https://github.com/whatwg/html/issues/4520 re whether this is really the intended exception.

Type: defect → task
Priority: -- → P3

I landed tests in https://github.com/web-platform-tests/wpt/pull/16328. I've also changed the exception to be a TypeError (and am in the process of landing specification changes for that). Safari has already aligned.

(To be clear, I haven't filed a new bug for changing the exception type, assuming we'll reuse this bug.)

Assignee: nobody → echen
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0ad9f6351108 Make CustomElementConstructor exceptions more consistent; r=smaug
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: