Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Remove shipping related things from payment-request (#28830)" #44409

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

marcoscaceres
Copy link
Contributor

Bring back tests for w3c/payment-request#996

@marcoscaceres
Copy link
Contributor Author

@rsolomakhin, @stephenmcgruer, just have a quick check we don't need to update anything else here.

Copy link
Contributor

@rsolomakhin rsolomakhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM % a few nits and questions here and there. Nothing blocking.

@@ -0,0 +1,109 @@
<!doctype html>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this directory be renamed to ContactAddress?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

supportedNetworks: ["visa"],
}
});
const validMethod = Object.freeze({ supportedMethods: "basic-card" });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it makes a difference, but Chrome has deprecated "basic-card". We only support payment handlers now, such as "https://google.com/pay".

We also deprecated manual install of payment handlers. Only just-in-time install is supported.

What that means for our tests is that we setup a JIT-installable payment handler at some local URL and then point our tests to it as the supportedMethods.

I think it's OK to re-land these tests as-is, but let's keep in mind that validMethod may need to change before it works in Chrome correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's add https://google.com/pay. Our team can follow up later to pass the correct method-specific-data to make Google Pay work in tests, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that would be great!

@marcoscaceres
Copy link
Contributor Author

Ok, I'll get rid of some of the basic card stuff... and need to rename some files it seems too.

@marcoscaceres marcoscaceres merged commit cd418e2 into master Apr 2, 2024
18 checks passed
@marcoscaceres marcoscaceres deleted the payment_addresses branch April 2, 2024 00:38
webkit-commit-queue pushed a commit to marcoscaceres/WebKit that referenced this pull request Apr 2, 2024
…d echo-PaymentRequest.html

https://bugs.webkit.org/show_bug.cgi?id=175611
rdar://125592721

Reviewed by Abrar Rahman Protyasha and Anne van Kesteren.

Resync WPT payment-request tests to upstream 1e5aba72c9.
The echo-PaymentRequest.html test, along with "allowpayment" and "allowpaymentrequest" directories, were removed from WPT some time ago.
The tests also received some updates to fix some issues and better match the spec.

So not to lose test coverage for "shipping" related things, imported in the tests from:
web-platform-tests/wpt#44409

We will eventually import those from WPT again once that PR is merged and the spec is updated to again include shipping.

And bring in Permission Policy fixes from, so we have coverage of the allow attribute:
web-platform-tests/wpt#45443

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/META.yml:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentAddress/w3c-import.log: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.https.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updatewith-method.https.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentValidationErrors/w3c-import.log: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/active-document-cross-origin.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/active-document-cross-origin.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/active-document-same-origin.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/active-document-same-origin.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/allowpaymentrequest-attribute-cross-origin-bc-containers.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/allowpaymentrequest-attribute-cross-origin-bc-containers.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/common.sub.js: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/echo-PaymentRequest.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/no-attribute-cross-origin-bc-containers.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/no-attribute-cross-origin-bc-containers.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/no-attribute-same-origin-bc-containers.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/no-attribute-same-origin-bc-containers.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/removing-allowpaymentrequest.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/removing-allowpaymentrequest.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/setting-allowpaymentrequest.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/setting-allowpaymentrequest.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpayment/w3c-import.log: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/active-document-cross-origin.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/active-document-cross-origin.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/active-document-same-origin.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/active-document-same-origin.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/allowpaymentrequest-attribute-cross-origin-bc-containers.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/allowpaymentrequest-attribute-cross-origin-bc-containers.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/allowpaymentrequest-attribute-same-origin-bc-containers.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/allowpaymentrequest-attribute-same-origin-bc-containers.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/basic.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/basic.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/common.sub.js: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/echo-PaymentRequest.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/no-attribute-cross-origin-bc-containers.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/no-attribute-cross-origin-bc-containers.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/no-attribute-same-origin-bc-containers.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/no-attribute-same-origin-bc-containers.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/removing-allowpaymentrequest.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/removing-allowpaymentrequest.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/setting-allowpaymentrequest-timing.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/setting-allowpaymentrequest-timing.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/setting-allowpaymentrequest.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/setting-allowpaymentrequest.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/w3c-import.log: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/blank.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/delegate-request.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/delegate-request.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/historical.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/historical.https.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-is-showing.https.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-constructor-thcrash.https.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-constructor.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-ctor-currency-code-checks.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-ctor-pmi-handling.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-ctor-pmi-handling.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-disallowed-when-hidden.https-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-disallowed-when-hidden.https.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-show-method.https.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-update-event-constructor.http-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-update-event-constructor.http.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-update-event-constructor.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-update-event-constructor.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/resources/delegate-request-subframe.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/resources/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/show-consume-activation.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/show-consume-activation.https.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy-attribute.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html.headers: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-default-permissions-policy.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-default-permissions-policy.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html.headers: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html: Added.
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/tests-options.json:

Canonical link: https://commits.webkit.org/276932@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants