From cbe8ae65cfb0d3ca6f18f630c9940140b1ed0802 Mon Sep 17 00:00:00 2001 From: Nick Burris Date: Thu, 31 Mar 2022 10:02:43 +0000 Subject: [PATCH] Bug 1761817 [wpt PR 33389] - [basic-card] Migrate WPTs that use basic-card by name, a=testonly Automatic update from web-platform-tests [basic-card] Migrate WPTs that use basic-card by name With basic card now disabled and soon to be removed, migrate some web platform tests to use a URL payment method; these currently use the basic-card payment method by name but don't depend on a valid payment method. These tests assert errors before the payment method would be loaded, so they can just use a placeholder payment method URL. Bug: 1209835 Change-Id: I70ae36d0e510e460ad6e9fa349aa86cf7db2b069 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3555253 Reviewed-by: Stephen McGruer Commit-Queue: Nick Burris Cr-Commit-Position: refs/heads/main@{#986128} -- wpt-commits: 570699609d1db6b8480700489914910ba06ff107 wpt-pr: 33389 --- .../tests/feature-policy/reporting/payment-reporting.https.html | 2 +- .../tests/permissions-policy/reporting/payment-report-only.https.html | 2 +- .../tests/permissions-policy/reporting/payment-reporting.https.html | 2 +- .../tests/secure-payment-confirmation/constructor.https.html | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/testing/web-platform/tests/feature-policy/reporting/payment-reporting.https.html b/testing/web-platform/tests/feature-policy/reporting/payment-reporting.https.html index fcd0156a3c6b..3c04db864d52 100644 --- a/testing/web-platform/tests/feature-policy/reporting/payment-reporting.https.html +++ b/testing/web-platform/tests/feature-policy/reporting/payment-reporting.https.html @@ -27,7 +27,7 @@ new ReportingObserver(t.step_func_done(check_report_format), t.step_func(() => { assert_throws_dom('SecurityError', () => new PaymentRequest( - [{ supportedMethods: 'basic-card' }], + [{ supportedMethods: 'https://example.com/pay' }], { total: { label: 'Total', amount: { currency: 'USD', value: 0 }}}, {}).show(), "PaymentRequest API should not be allowed in this document."); diff --git a/testing/web-platform/tests/permissions-policy/reporting/payment-report-only.https.html b/testing/web-platform/tests/permissions-policy/reporting/payment-report-only.https.html index d4425f9f3ca5..f1b1b433f507 100644 --- a/testing/web-platform/tests/permissions-policy/reporting/payment-report-only.https.html +++ b/testing/web-platform/tests/permissions-policy/reporting/payment-report-only.https.html @@ -23,7 +23,7 @@ promise_test(async t => { try { await test_driver.bless(); const request = new PaymentRequest( - [{ supportedMethods: 'basic-card' }], + [{ supportedMethods: 'https://example.com/pay' }], { total: { label: 'Total', amount: { currency: 'USD', value: 0 }}}, {}); await request.show() diff --git a/testing/web-platform/tests/permissions-policy/reporting/payment-reporting.https.html b/testing/web-platform/tests/permissions-policy/reporting/payment-reporting.https.html index 72529bf9f19b..f639c2b7c623 100644 --- a/testing/web-platform/tests/permissions-policy/reporting/payment-reporting.https.html +++ b/testing/web-platform/tests/permissions-policy/reporting/payment-reporting.https.html @@ -27,7 +27,7 @@ new ReportingObserver(t.step_func_done(check_report_format), t.step_func(() => { assert_throws_dom('SecurityError', () => new PaymentRequest( - [{ supportedMethods: 'basic-card' }], + [{ supportedMethods: 'https://example.com/pay' }], { total: { label: 'Total', amount: { currency: 'USD', value: 0 }}}, {}).show(), "PaymentRequest API should not be allowed in this document."); diff --git a/testing/web-platform/tests/secure-payment-confirmation/constructor.https.html b/testing/web-platform/tests/secure-payment-confirmation/constructor.https.html index 5e3787c95868..b19670ff1398 100644 --- a/testing/web-platform/tests/secure-payment-confirmation/constructor.https.html +++ b/testing/web-platform/tests/secure-payment-confirmation/constructor.https.html @@ -61,13 +61,13 @@ test(() => { }, rpId: 'relying-party.example', }, - }, {supportedMethods: 'basic-card'}], details); + }, {supportedMethods: 'https://example.com/pay'}], details); }); }, 'Extra payment method not allowed afterward.'); test(() => { assert_throws_js(RangeError, () => { - new PaymentRequest([{supportedMethods: 'basic-card'}, { + new PaymentRequest([{supportedMethods: 'https://example.com/pay'}, { supportedMethods: 'secure-payment-confirmation', data: { credentialIds: [Uint8Array.from('x', c => c.charCodeAt(0))], -- 2.11.4.GIT