Web platform test of PaymentRequestUpdateEvent constructor (non-secure context) fails

RESOLVED INVALID

Status

()

Core
DOM: Web Payments
RESOLVED INVALID
11 months ago
10 months ago

People

(Reporter: Ben Tian (inactive), Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 months ago
Web platform test of PaymentRequestUpdateEvent constructor fails:
http://127.0.0.1:8000/payment-request/payment-request-update-event-constructor.http.html

[PaymentRequestUpdateEvent constructor throws in a non-secure context]
assert_throws: function "() => { new PaymentRequestUpdateEvent("test"); }" did not throw
(Reporter)

Comment 1

11 months ago
Note bug 1379925 patch is required to run the test now, otherwise test crashes when constructing PaymentRequestUpdateEvent.
(Reporter)

Comment 2

11 months ago
(In reply to Ben Tian [:btian] from comment #0)
> Web platform test of PaymentRequestUpdateEvent constructor fails:

The link should be
https://w3c-test.org/payment-request/payment-request-update-event-constructor.http.html
 
> [PaymentRequestUpdateEvent constructor throws in a non-secure context]
> assert_throws: function "() => { new PaymentRequestUpdateEvent("test"); }"
> did not throw
(Reporter)

Comment 3

10 months ago
SecureContext constraint should be enforced by WebIDL binding.
http://searchfox.org/mozilla-central/source/__GENERATED__/dom/bindings/PaymentRequestUpdateEventBinding.cpp#606
(Reporter)

Comment 4

10 months ago
The error message becomes following with http link [1].

"assert_throws: function "() => { new PaymentRequestUpdateEvent("test"); }" threw object "ReferenceError: PaymentRequestUpdateEvent is not defined" that is not a DOMException SecurityError: property "code" is equal to undefined, expected 18"

[1] http://w3c-test.org/payment-request/payment-request-update-event-constructor.http.html
(Reporter)

Comment 5

10 months ago
Interface with [SecureContext] doesn't throw SecurityError in insecure context but instead not exposed [1]. Web platform test will be revised [2] accordingly and our implementation passes with the revision.

[1] https://heycam.github.io/webidl/#SecureContext
[2] https://github.com/w3c/web-platform-tests/pull/6566

Resolve this bug as INVALID.
Status: NEW → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.