Skip to content

Payment Request: fix permission policy tests#45443

Merged
marcoscaceres merged 4 commits intomasterfrom
fix_payment_policy_tests
Apr 9, 2024
Merged

Payment Request: fix permission policy tests#45443
marcoscaceres merged 4 commits intomasterfrom
fix_payment_policy_tests

Conversation

@marcoscaceres
Copy link
Contributor

Cleanup the Permission Policy tests for Payments, and set a substitute URL that works with WebKit's infrastructure.

Fix the tests to use promise_test instead.

@wpt-pr-bot
Copy link
Collaborator

There are no reviewers for this pull request. Please reach out on the chat room to get help with this. Thank you!

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 looks good! Added a few comments, but they are all for the existing code, not necessarily your patch. It would be great to improve the existing code, but let me know if you think these comments are not relevant.

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
@community-tc-integration
Copy link

Uh oh! Looks like an error! Details

Client ID static/taskcluster/github does not have sufficient scopes and is missing the following scopes:

{
  "AnyOf": [
    "queue:rerun-task:taskcluster-github/cl38MYbpTRiYVqvhoC4VMA/dm8cjkAeQgCIUIEwV2Ca7Q",
    "queue:rerun-task-in-project:none",
    {
      "AllOf": [
        "queue:rerun-task",
        "assume:scheduler-id:taskcluster-github/cl38MYbpTRiYVqvhoC4VMA"
      ]
    }
  ]
}

This request requires the client to satisfy the following scope expression:

{
  "AnyOf": [
    "queue:rerun-task:taskcluster-github/cl38MYbpTRiYVqvhoC4VMA/dm8cjkAeQgCIUIEwV2Ca7Q",
    "queue:rerun-task-in-project:none",
    {
      "AllOf": [
        "queue:rerun-task",
        "assume:scheduler-id:taskcluster-github/cl38MYbpTRiYVqvhoC4VMA"
      ]
    }
  ]
}

  • method: rerunTask
  • errorCode: InsufficientScopes
  • statusCode: 403
  • time: 2024-04-02T12:36:00.234Z

@community-tc-integration
Copy link

Uh oh! Looks like an error! Details

Client ID static/taskcluster/github does not have sufficient scopes and is missing the following scopes:

{
  "AnyOf": [
    "queue:rerun-task:taskcluster-github/cl38MYbpTRiYVqvhoC4VMA/Z6Gc21b2SFWHsvrqgmH9oA",
    "queue:rerun-task-in-project:none",
    {
      "AllOf": [
        "queue:rerun-task",
        "assume:scheduler-id:taskcluster-github/cl38MYbpTRiYVqvhoC4VMA"
      ]
    }
  ]
}

This request requires the client to satisfy the following scope expression:

{
  "AnyOf": [
    "queue:rerun-task:taskcluster-github/cl38MYbpTRiYVqvhoC4VMA/Z6Gc21b2SFWHsvrqgmH9oA",
    "queue:rerun-task-in-project:none",
    {
      "AllOf": [
        "queue:rerun-task",
        "assume:scheduler-id:taskcluster-github/cl38MYbpTRiYVqvhoC4VMA"
      ]
    }
  ]
}

  • method: rerunTask
  • errorCode: InsufficientScopes
  • statusCode: 403
  • time: 2024-04-02T12:36:03.451Z

@marcoscaceres marcoscaceres force-pushed the fix_payment_policy_tests branch from 4b5b67b to 207acdc Compare April 8, 2024 06:17
@marcoscaceres marcoscaceres enabled auto-merge (squash) April 8, 2024 06:17
@marcoscaceres marcoscaceres force-pushed the fix_payment_policy_tests branch from 207acdc to b78ab08 Compare April 9, 2024 03:07
@marcoscaceres marcoscaceres merged commit c975e22 into master Apr 9, 2024
@marcoscaceres marcoscaceres deleted the fix_payment_policy_tests branch April 9, 2024 04:56
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.

3 participants