[Payments] Import/Export LayoutTests for Payment Request API |
|||
Issue descriptionWe should (1) Start importing WPT tests for Payment Requests (see https://github.com/w3c/web-platform-tests/tree/master/payment-request) into Blink. (2) Contribute our tests (currently in LayoutTests/payments) to LayoutTests/external/wpt/payment-request so that they are shared with the community.
,
Mar 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/57a65c934af9dce077f720e6fc8a7579de79924f commit 57a65c934af9dce077f720e6fc8a7579de79924f Author: Mathieu Perreault <mathp@chromium.org> Date: Wed Mar 29 14:09:55 2017 [LayoutTests] No longer skip importing payment-request tests from WPT Tests will be imported at the next auto-import From running locally, there are 6 that fail (to be investigated). I will submit TestExpectations once the tests are imported BUG= 705252 TEST=None R=foolip@chromium.org Review-Url: https://codereview.chromium.org/2776913002 . Cr-Commit-Position: refs/heads/master@{#460378} [modify] https://crrev.com/57a65c934af9dce077f720e6fc8a7579de79924f/third_party/WebKit/LayoutTests/W3CImportExpectations
,
Apr 25 2017
,
May 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b24d35ae72703093d610e86b149d7f21010381ea commit b24d35ae72703093d610e86b149d7f21010381ea Author: rouslan <rouslan@chromium.org> Date: Mon May 01 18:35:01 2017 Fix harness error in payment-request-interface.html layout test. BUG= 705252 Review-Url: https://codereview.chromium.org/2850183002 Cr-Commit-Position: refs/heads/master@{#468363} [modify] https://crrev.com/b24d35ae72703093d610e86b149d7f21010381ea/third_party/WebKit/LayoutTests/payments/payment-request-interface-expected.txt [modify] https://crrev.com/b24d35ae72703093d610e86b149d7f21010381ea/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
,
May 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dca98e1e37e61a0019ab182bdd7b18748575b6f1 commit dca98e1e37e61a0019ab182bdd7b18748575b6f1 Author: rouslan <rouslan@chromium.org> Date: Thu May 04 17:17:24 2017 Verify behavior of PaymentRequest constructor. This patch adds web platform tests that verify behavior of PaymentRequest constructor. To match the spec, PaymentRequest constructor in this patch has been changed to: - Check for secure context before validating any parameters. - Check the amount value first before checking the rest of the fields in each line item. - Determine the selected shipping option even if requestShipping is false. - Validate shipping options even if requestShipping is false. - Validate shipping options before checking for duplicate shipping option IDs. - Allow empty line item labels (but discourage via a console warning). - Allow empty shipping option ID (but discourage via a console warning). - Allow empty list of modifiers. Because of changes in the WebIDL, certain conditions are not possible, so they are ensured via DCHECK() in this patch instead of if statements before this patch: - Total is always present. - Every line item has a label and amount. - Every amount has value and currency. - Every shipping option has an ID. - Shipping type is always valid. Invalid shipping type ("delivery", "shipping", or "pickup") is now impossible because the WebIDL specifies it as an enum. Therefore, there's no need for additional validation there. To help developers better decipher the behavior of the API, error messages have been improved in this patch. For example: "'-1/3' is not a valid amount for total." Spec: https://w3c.github.io/browser-payment-api/#constructor BUG= 705252 Review-Url: https://codereview.chromium.org/2851383002 Cr-Commit-Position: refs/heads/master@{#469369} [modify] https://crrev.com/dca98e1e37e61a0019ab182bdd7b18748575b6f1/components/payments/content/payment_details_validation.cc [add] https://crrev.com/dca98e1e37e61a0019ab182bdd7b18748575b6f1/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-constructor.https.html [modify] https://crrev.com/dca98e1e37e61a0019ab182bdd7b18748575b6f1/third_party/WebKit/LayoutTests/payments/payment-request-interface-expected.txt [modify] https://crrev.com/dca98e1e37e61a0019ab182bdd7b18748575b6f1/third_party/WebKit/LayoutTests/payments/payment-request-interface.html [modify] https://crrev.com/dca98e1e37e61a0019ab182bdd7b18748575b6f1/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp [modify] https://crrev.com/dca98e1e37e61a0019ab182bdd7b18748575b6f1/third_party/WebKit/Source/modules/payments/PaymentRequestDetailsTest.cpp [modify] https://crrev.com/dca98e1e37e61a0019ab182bdd7b18748575b6f1/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp [modify] https://crrev.com/dca98e1e37e61a0019ab182bdd7b18748575b6f1/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp [modify] https://crrev.com/dca98e1e37e61a0019ab182bdd7b18748575b6f1/third_party/WebKit/Source/modules/payments/PaymentsValidators.h [modify] https://crrev.com/dca98e1e37e61a0019ab182bdd7b18748575b6f1/third_party/WebKit/Source/modules/payments/PaymentsValidatorsTest.cpp
,
May 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7d433cc2ac0b3e36e6753e84fbfc9253aac646d8 commit 7d433cc2ac0b3e36e6753e84fbfc9253aac646d8 Author: rouslan <rouslan@chromium.org> Date: Mon May 08 15:18:07 2017 Verify behavior of PaymentRequest.show() method, part 1. Before this patch, Chrome on Android would allow only one instance of PaymentRequest per browser process to be displayed, but desktop had no such restriction. This patch adds a check for currently displaying PaymentRequest UI on desktop. The currently displayed instance of PaymentRequest is kept track of in PaymentRequestWebContentsManager. After this patch, Chrome on desktop allows only one instance of PaymentRequest per tab to be displayed. From https://w3c.github.io/browser-payment-api/#show-method "If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException." From https://w3c.github.io/browser-payment-api/#dfn-payment-request-is-showing "The user agent as a whole has a single "payment request is showing" boolean, initially false. This is used to prevent multiple PaymentRequests from being shown, via their show() method, at the same time." BUG= 705252 Review-Url: https://codereview.chromium.org/2864013002 Cr-Commit-Position: refs/heads/master@{#469988} [modify] https://crrev.com/7d433cc2ac0b3e36e6753e84fbfc9253aac646d8/components/payments/content/payment_request.cc [modify] https://crrev.com/7d433cc2ac0b3e36e6753e84fbfc9253aac646d8/components/payments/content/payment_request_web_contents_manager.cc [modify] https://crrev.com/7d433cc2ac0b3e36e6753e84fbfc9253aac646d8/components/payments/content/payment_request_web_contents_manager.h [add] https://crrev.com/7d433cc2ac0b3e36e6753e84fbfc9253aac646d8/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html
,
Sep 13 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by ma...@chromium.org
, Mar 26 2017