Bug 220872 - [WPT] [Payment Request] slight adjustment to payment-request/payment-request-constructor-thcrash.https.html
Summary: [WPT] [Payment Request] slight adjustment to payment-request/payment-request-...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-22 11:17 PST by Devin Rousso
Modified: 2021-01-22 13:51 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.75 KB, patch)
2021-01-22 11:19 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (2.75 KB, patch)
2021-01-22 11:22 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (2.75 KB, patch)
2021-01-22 11:24 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (2.75 KB, patch)
2021-01-22 11:24 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (3.90 KB, patch)
2021-01-22 12:54 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (3.90 KB, patch)
2021-01-22 12:56 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2021-01-22 11:17:12 PST
I'm pretty sure the first test in payment-request/payment-request-constructor-thcrash.https.html is incorrect because duplicate items in `methodData` provided to `PaymentRequest` should throw a `RangeError` according to step 4.3.3 of <https://www.w3.org/TR/payment-request/#constructor>.

The spec does mention in <https://www.w3.org/TR/payment-request/#conformance>
> User agents _MAY_ impose implementation-specific limits on otherwise unconstrained inputs, e.g., to prevent denial of service attacks, to guard against running out of memory, or to work around platform-specific limitations. When an input exceeds implementation-specific limit, the user agent _MUST_ throw, or, in the context of a promise, reject with, a `TypeError` optionally informing the developer of how a particular input exceeded an implementation-specific limit.
but does not specify whether this should happen before or after the above.

In WebKit's case, there is no "implementation-specific limit", so WebKit shouldn't throw a `TypeError` regardless.
Comment 1 Devin Rousso 2021-01-22 11:19:00 PST
Created attachment 418158 [details]
Patch
Comment 2 EWS Watchlist 2021-01-22 11:20:19 PST
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 3 Devin Rousso 2021-01-22 11:22:51 PST
Created attachment 418161 [details]
Patch
Comment 4 Devin Rousso 2021-01-22 11:24:05 PST
Created attachment 418162 [details]
Patch
Comment 5 Devin Rousso 2021-01-22 11:24:37 PST
Created attachment 418163 [details]
Patch
Comment 6 Devin Rousso 2021-01-22 12:54:21 PST
Created attachment 418172 [details]
Patch
Comment 7 Devin Rousso 2021-01-22 12:56:20 PST
Created attachment 418173 [details]
Patch
Comment 8 Devin Rousso 2021-01-22 12:56:50 PST
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/27292
Comment 9 youenn fablet 2021-01-22 13:03:41 PST
Comment on attachment 418173 [details]
Patch

Let's r+ it again so that WPT bot gets it
Comment 10 EWS 2021-01-22 13:50:03 PST
Committed r271759: <https://trac.webkit.org/changeset/271759>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 418173 [details].
Comment 11 Radar WebKit Bug Importer 2021-01-22 13:51:14 PST
<rdar://problem/73514233>