Skip to content

Commit

Permalink
[Web Payment] Disable PaymentInstruments
Browse files Browse the repository at this point in the history
This patch disables the PaymentInstruments API
(paymentManager.instruments) and removes IDL harness expectations for
it. It does not, however, remove the feature code itself, as that will
be a separate patch.

Intent to deprecate and remove:
https://groups.google.com/a/chromium.org/g/blink-dev/c/VenSGqBIoKI/m/HGyofbCGCAAJ

Chrome status:
https://chromestatus.com/feature/5099285054488576

Bug: 1327265
Change-Id: I32e9bdb65648d145ccde4ed71a2e49b47fee77ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4067199
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1096753}
  • Loading branch information
rsolomakhin authored and Chromium LUCI CQ committed Jan 25, 2023
1 parent dfebfea commit fa811b4
Show file tree
Hide file tree
Showing 25 changed files with 1 addition and 1,078 deletions.
Expand Up @@ -13,7 +13,6 @@ interface Notification : EventTarget

# web payments api not enabled in webiew, crbug.com/667069
interface PaymentAddress
interface PaymentInstruments
interface PaymentManager
interface PaymentMethodChangeEvent : PaymentRequestUpdateEvent
interface PaymentRequest : EventTarget
Expand Down
Expand Up @@ -2084,7 +2084,6 @@
{
name: "PaymentInstruments",
depends_on: ["PaymentApp"],
status: "stable",
},
{
name: "PaymentMethodChangeEvent",
Expand Down
Expand Up @@ -9,7 +9,6 @@ partial interface ServiceWorkerRegistration {

[SecureContext, Exposed=(Window,Worker)]
interface PaymentManager {
[SameObject] readonly attribute PaymentInstruments instruments;
attribute DOMString userHint;
Promise<undefined> enableDelegations(sequence<PaymentDelegation> delegations);
};
Expand All @@ -21,28 +20,6 @@ enum PaymentDelegation {
"payerEmail"
};

[SecureContext, Exposed=(Window,Worker)]
interface PaymentInstruments {
Promise<boolean> delete(DOMString instrumentKey);
Promise<any> get(DOMString instrumentKey);
Promise<sequence<DOMString>> keys();
Promise<boolean> has(DOMString instrumentKey);
Promise<undefined> set(DOMString instrumentKey, PaymentInstrument details);
Promise<undefined> clear();
};

dictionary PaymentInstrument {
required DOMString name;
sequence<ImageObject> icons;
DOMString method;
};

dictionary ImageObject {
required USVString src;
DOMString sizes;
DOMString type;
};

partial interface ServiceWorkerGlobalScope {
attribute EventHandler oncanmakepayment;
};
Expand Down
Expand Up @@ -20,7 +20,6 @@ idl_test(
idl_array.add_objects({
ServiceWorkerRegistration: ['registration'],
PaymentManager: ['paymentManager'],
PaymentInstruments: ['instruments'],
});
}
if (isServiceWorker) {
Expand All @@ -41,7 +40,6 @@ idl_test(
}
if (hasRegistration) {
self.paymentManager = self.registration.paymentManager;
self.instruments = self.paymentManager.instruments;
}
}
);
Expand Up @@ -14,9 +14,6 @@
[PaymentManager interface object name]
expected: FAIL

[PaymentManager interface: attribute instruments]
expected: FAIL

[PaymentManager interface: existence and properties of interface prototype object]
expected: FAIL

Expand All @@ -31,9 +28,6 @@
[CanMakePaymentEvent interface: new CanMakePaymentEvent("type") must inherit property "respondWith(Promise<boolean>)" with the proper type]
expected: FAIL

[PaymentManager interface: attribute instruments]
expected: FAIL

[PaymentManager interface: attribute userHint]
expected: FAIL

Expand Down Expand Up @@ -156,9 +150,6 @@
[PaymentManager interface object name]
expected: FAIL

[PaymentManager interface: attribute instruments]
expected: FAIL

[PaymentManager interface: existence and properties of interface prototype object]
expected: FAIL

Expand Down
@@ -1,5 +1,5 @@
This is a testharness.js-based test.
Found 104 tests; 67 PASS, 37 FAIL, 0 TIMEOUT, 0 NOTRUN.
Found 78 tests; 42 PASS, 36 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS idl_test setup
PASS idl_test validation
PASS Partial interface ServiceWorkerRegistration: original interface defined
Expand All @@ -15,39 +15,13 @@ FAIL PaymentManager interface object name assert_own_property: self does not hav
FAIL PaymentManager interface: existence and properties of interface prototype object assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: attribute instruments assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: attribute userHint assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: operation enableDelegations(sequence<PaymentDelegation>) assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager must be primary interface of paymentManager assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
PASS Stringification of paymentManager
PASS PaymentManager interface: paymentManager must inherit property "instruments" with the proper type
PASS PaymentManager interface: paymentManager must inherit property "userHint" with the proper type
PASS PaymentManager interface: paymentManager must inherit property "enableDelegations(sequence<PaymentDelegation>)" with the proper type
PASS PaymentManager interface: calling enableDelegations(sequence<PaymentDelegation>) on paymentManager with too few arguments must throw TypeError
PASS PaymentInstruments interface: existence and properties of interface object
PASS PaymentInstruments interface object length
PASS PaymentInstruments interface object name
PASS PaymentInstruments interface: existence and properties of interface prototype object
PASS PaymentInstruments interface: existence and properties of interface prototype object's "constructor" property
PASS PaymentInstruments interface: existence and properties of interface prototype object's @@unscopables property
PASS PaymentInstruments interface: operation delete(DOMString)
PASS PaymentInstruments interface: operation get(DOMString)
PASS PaymentInstruments interface: operation keys()
PASS PaymentInstruments interface: operation has(DOMString)
PASS PaymentInstruments interface: operation set(DOMString, PaymentInstrument)
PASS PaymentInstruments interface: operation clear()
PASS PaymentInstruments must be primary interface of instruments
PASS Stringification of instruments
PASS PaymentInstruments interface: instruments must inherit property "delete(DOMString)" with the proper type
PASS PaymentInstruments interface: calling delete(DOMString) on instruments with too few arguments must throw TypeError
PASS PaymentInstruments interface: instruments must inherit property "get(DOMString)" with the proper type
PASS PaymentInstruments interface: calling get(DOMString) on instruments with too few arguments must throw TypeError
PASS PaymentInstruments interface: instruments must inherit property "keys()" with the proper type
PASS PaymentInstruments interface: instruments must inherit property "has(DOMString)" with the proper type
PASS PaymentInstruments interface: calling has(DOMString) on instruments with too few arguments must throw TypeError
PASS PaymentInstruments interface: instruments must inherit property "set(DOMString, PaymentInstrument)" with the proper type
PASS PaymentInstruments interface: calling set(DOMString, PaymentInstrument) on instruments with too few arguments must throw TypeError
PASS PaymentInstruments interface: instruments must inherit property "clear()" with the proper type
PASS CanMakePaymentEvent interface: existence and properties of interface object
FAIL CanMakePaymentEvent interface object length assert_equals: wrong value for CanMakePaymentEvent.length expected 1 but got 2
PASS CanMakePaymentEvent interface object name
Expand Down
Expand Up @@ -14,21 +14,8 @@ FAIL PaymentManager interface object name assert_own_property: self does not hav
FAIL PaymentManager interface: existence and properties of interface prototype object assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: attribute instruments assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: attribute userHint assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: operation enableDelegations(sequence<PaymentDelegation>) assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
PASS PaymentInstruments interface: existence and properties of interface object
PASS PaymentInstruments interface object length
PASS PaymentInstruments interface object name
PASS PaymentInstruments interface: existence and properties of interface prototype object
PASS PaymentInstruments interface: existence and properties of interface prototype object's "constructor" property
PASS PaymentInstruments interface: existence and properties of interface prototype object's @@unscopables property
PASS PaymentInstruments interface: operation delete(DOMString)
PASS PaymentInstruments interface: operation get(DOMString)
PASS PaymentInstruments interface: operation keys()
PASS PaymentInstruments interface: operation has(DOMString)
PASS PaymentInstruments interface: operation set(DOMString, PaymentInstrument)
PASS PaymentInstruments interface: operation clear()
PASS CanMakePaymentEvent interface: existence and properties of interface object
PASS PaymentRequestEvent interface: existence and properties of interface object
PASS ServiceWorkerRegistration interface: attribute paymentManager
Expand Down
Expand Up @@ -14,21 +14,8 @@ FAIL PaymentManager interface object name assert_own_property: self does not hav
FAIL PaymentManager interface: existence and properties of interface prototype object assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: attribute instruments assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: attribute userHint assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
FAIL PaymentManager interface: operation enableDelegations(sequence<PaymentDelegation>) assert_own_property: self does not have own property "PaymentManager" expected property "PaymentManager" missing
PASS PaymentInstruments interface: existence and properties of interface object
PASS PaymentInstruments interface object length
PASS PaymentInstruments interface object name
PASS PaymentInstruments interface: existence and properties of interface prototype object
PASS PaymentInstruments interface: existence and properties of interface prototype object's "constructor" property
PASS PaymentInstruments interface: existence and properties of interface prototype object's @@unscopables property
PASS PaymentInstruments interface: operation delete(DOMString)
PASS PaymentInstruments interface: operation get(DOMString)
PASS PaymentInstruments interface: operation keys()
PASS PaymentInstruments interface: operation has(DOMString)
PASS PaymentInstruments interface: operation set(DOMString, PaymentInstrument)
PASS PaymentInstruments interface: operation clear()
PASS CanMakePaymentEvent interface: existence and properties of interface object
PASS PaymentRequestEvent interface: existence and properties of interface object
PASS ServiceWorkerRegistration interface: attribute paymentManager
Expand Down

This file was deleted.

0 comments on commit fa811b4

Please sign in to comment.