New issue
Advanced search Search tips

Issue 766316 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

[Payments] WPT: Throw TypeError if duplicate shipping option ids.

Project Member Reported by se...@chromium.org, Sep 18 2017

Issue description

If more than one shipping option share the same id, and requestShipping is true, throw a TypeError.

https://w3c-test.org/payment-request/payment-request-constructor.https.html

 

Comment 1 by se...@chromium.org, Sep 18 2017

One of the tests also had an error: 

Test bug: unrecognized DOMException code "() => { const request = new PaymentRequest(defaultMethods, details, { requestShipping: true, }); }" passed to assert_throws()

Will fix it too

Comment 2 by se...@chromium.org, Sep 18 2017

Forgot to write the name of the test that has an error: If there are any duplicate shipping option ids, and shipping is requested, then throw a TypeError
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5d2f94cd0a521244001f23e858e199ee39b19edb

commit 5d2f94cd0a521244001f23e858e199ee39b19edb
Author: sebsg <sebsg@chromium.org>
Date: Tue Sep 19 17:30:11 2017

[Payments] Blink: Throw TypeError if 2 shipping option have same id.

Relevant section of the spec:
https://www.w3.org/TR/payment-request/#constructor

"If seenIDs contains option.id, then throw a TypeError.
 Optionally, inform the developer that shipping option
 IDs must be unique."

Since those were the last 2 Failures for the payment-request-constructor
.https.txt, removing the associates expected file.

Bug:  766316 
Test: blink_tests
Change-Id: I65c1f924c15e134c9f5ff68649802358fc43e074
Reviewed-on: https://chromium-review.googlesource.com/671820
Commit-Queue: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502877}
[delete] https://crrev.com/01b28422bcb168e52fc1039112f1329937c85321/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-constructor.https-expected.txt
[modify] https://crrev.com/5d2f94cd0a521244001f23e858e199ee39b19edb/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-constructor.https.html
[modify] https://crrev.com/5d2f94cd0a521244001f23e858e199ee39b19edb/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
[modify] https://crrev.com/5d2f94cd0a521244001f23e858e199ee39b19edb/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
[modify] https://crrev.com/5d2f94cd0a521244001f23e858e199ee39b19edb/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp

Comment 4 by se...@chromium.org, Oct 10 2017

Status: Fixed (was: Started)

Sign in to add a comment