Closed Bug 1770600 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 34157 - Add test to confirm calling Request constructor without `new` throws …

Categories

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

task

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 34157 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/34157
Details from upstream follow.

Jake Champion <me@jakechampion.name> wrote:

Add test to confirm calling Request constructor without new throws …

This adds tests which confirm that calling many constructors as ordinary functions will throw an error.

This also adds some more error testing scenarios to SharedWorker which looked like it was missing these tests.

This is similar to my other Pull-Request which adds this same test scenario to Request -> https://github.com/web-platform-tests/wpt/pull/34146

This is the part of WebIDL that is being exercised by these tests:

If the interface is declared with a constructor operation, then the interface object can be called as a constructor to create an object that implements that interface. Calling that interface as a function will throw an exception.
https://webidl.spec.whatwg.org/#interface-object

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b12e033c4294 [wpt PR 34157] - Update idlharness.js, so that it is tests calling for all interfaces with constructors as regular functions, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
You need to log in before you can comment on or make changes to this bug.