[wpt-sync] Sync PR 34146 - Add test to confirm calling Request constructor without `new` throws an error
Categories
(Core :: DOM: Networking, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox102 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 34146 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/34146
Details from upstream follow.
Jake Champion <me@jakechampion.name> wrote:
Add test to confirm calling Request constructor without
newthrows an errorThe Request interface defines a Web IDL constructor and the Web IDL constructor definition states:
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-objectThis commit adds a test to ensure that calling Request as a function will throw an exception.
I couldn't find an already existing test case for this, which is why I have created this pull-request.
If this test case addition is correct, I can add test cases for other interfaces which are missing this type of test case
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
| Assignee | ||
Comment 2•3 years ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 4 tests and 22 subtests
Status Summary
Firefox
OK : 4
PASS: 84
FAIL: 4
Chrome
OK : 4
PASS: 84
FAIL: 4
Safari
OK : 4
PASS: 88
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /fetch/api/request/request-error.any.serviceworker.html [wpt.fyi]
- RequestInit's window is not null:
FAIL(Chrome:FAIL, Safari:PASS)
- RequestInit's window is not null:
- /fetch/api/request/request-error.any.sharedworker.html [wpt.fyi]
- RequestInit's window is not null:
FAIL(Chrome:FAIL, Safari:PASS)
- RequestInit's window is not null:
- /fetch/api/request/request-error.any.html [wpt.fyi]
- RequestInit's window is not null:
FAIL(Chrome:FAIL, Safari:PASS)
- RequestInit's window is not null:
- /fetch/api/request/request-error.any.worker.html [wpt.fyi]
- RequestInit's window is not null:
FAIL(Chrome:FAIL, Safari:PASS)
- RequestInit's window is not null:
Comment 4•3 years ago
|
||
| bugherder | ||
Description
•