Commit c700bf4b authored by Rouslan Solomakhin's avatar Rouslan Solomakhin Committed by Commit Bot

[Web Payments] Disable PaymentResponse.retry() by default.

To be enabled on Canary via a server-side config. Waiting for approvals
from launch review to enable on other channels due to impact to UX.

Intent to Ship:
   https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/JwSN1yEVvnk

Bug: 861704
Change-Id: Ie12abb92f52fc10ac68cc5671f7a868431902a19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1634932Reviewed-by: default avatarNasko Oskov <nasko@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Reviewed-by: default avatarRick Byers <rbyers@chromium.org>
Reviewed-by: default avatarJinho Bang <jinho.bang@samsung.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665025}
parent 6d311635
......@@ -293,6 +293,9 @@ void SetIndividualRuntimeFeatures(
base::FeatureList::IsEnabled(
features::kPaymentRequestHasEnrolledInstrument));
WebRuntimeFeatures::EnablePaymentRetry(
base::FeatureList::IsEnabled(features::kPaymentResponseRetry));
if (base::FeatureList::IsEnabled(features::kServiceWorkerPaymentApps))
WebRuntimeFeatures::EnablePaymentApp(true);
......
......@@ -321,6 +321,10 @@ const base::Feature kPassiveEventListenersDueToFling{
const base::Feature kPaymentRequestHasEnrolledInstrument = {
"PaymentRequestHasEnrolledInstrument", base::FEATURE_ENABLED_BY_DEFAULT};
// Whether PaymentResponse exposes retry API.
const base::Feature kPaymentResponseRetry = {"PaymentResponseRetry",
base::FEATURE_DISABLED_BY_DEFAULT};
// Whether ExecutionContext is paused (and workers) on background freeze.
const base::Feature kPauseExecutionContextOnBackgroundFreeze = {
"PauseExecutionContextOnBackgroundFreeze",
......
......@@ -80,6 +80,7 @@ CONTENT_EXPORT extern const base::Feature kPassiveEventListenersDueToFling;
CONTENT_EXPORT extern const base::Feature
kPauseExecutionContextOnBackgroundFreeze;
CONTENT_EXPORT extern const base::Feature kPaymentRequestHasEnrolledInstrument;
CONTENT_EXPORT extern const base::Feature kPaymentResponseRetry;
CONTENT_EXPORT extern const base::Feature kPdfIsolation;
CONTENT_EXPORT extern const base::Feature kPeriodicBackgroundSync;
CONTENT_EXPORT extern const base::Feature kPerNavigationMojoInterface;
......
......@@ -3815,6 +3815,25 @@
]
}
],
"PaymentResponseRetry": [
{
"platforms": [
"android",
"chromeos",
"linux",
"mac",
"windows"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"PaymentResponseRetry"
]
}
]
}
],
"PdfIsolation": [
{
"platforms": [
......
......@@ -151,6 +151,7 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnablePaymentRequest(bool);
BLINK_PLATFORM_EXPORT static void EnablePaymentRequestHasEnrolledInstrument(
bool);
BLINK_PLATFORM_EXPORT static void EnablePaymentRetry(bool);
BLINK_PLATFORM_EXPORT static void EnablePerformanceManagerInstrumentation(
bool);
BLINK_PLATFORM_EXPORT static void EnablePeriodicBackgroundSync(bool);
......
......@@ -354,6 +354,10 @@ void WebRuntimeFeatures::EnablePaymentRequestHasEnrolledInstrument(
RuntimeEnabledFeatures::SetPaymentRequestHasEnrolledInstrumentEnabled(enable);
}
void WebRuntimeFeatures::EnablePaymentRetry(bool enable) {
RuntimeEnabledFeatures::SetPaymentRetryEnabled(enable);
}
void WebRuntimeFeatures::EnablePerformanceManagerInstrumentation(bool enable) {
RuntimeEnabledFeatures::SetPerformanceManagerInstrumentationEnabled(enable);
}
......
This is a testharness.js-based test.
Found 109 tests; 107 PASS, 2 FAIL, 0 TIMEOUT, 0 NOTRUN.
Found 109 tests; 105 PASS, 4 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS idl_test setup
PASS PaymentRequest interface: existence and properties of interface object
PASS PaymentRequest interface object length
......@@ -67,8 +67,8 @@ PASS PaymentResponse interface: attribute payerName
PASS PaymentResponse interface: attribute payerEmail
PASS PaymentResponse interface: attribute payerPhone
PASS PaymentResponse interface: operation complete(PaymentComplete)
PASS PaymentResponse interface: operation retry(PaymentValidationErrors)
PASS PaymentResponse interface: attribute onpayerdetailchange
FAIL PaymentResponse interface: operation retry(PaymentValidationErrors) assert_own_property: interface prototype object missing non-static operation expected property "retry" missing
FAIL PaymentResponse interface: attribute onpayerdetailchange assert_true: The prototype object must have a property "onpayerdetailchange" expected true got false
PASS MerchantValidationEvent interface: existence and properties of interface object
PASS MerchantValidationEvent interface object length
PASS MerchantValidationEvent interface object name
......
This is a testharness.js-based test.
PASS PaymentResponse inherits from EventTarget
FAIL PaymentResponse has an onpayerdetailchange in the prototype chain assert_true: expected true got false
Harness: the test ran to completion.
......@@ -4593,7 +4593,6 @@ interface PaymentResponse : EventTarget
attribute @@toStringTag
getter details
getter methodName
getter onpayerdetailchange
getter payerEmail
getter payerName
getter payerPhone
......@@ -4602,9 +4601,7 @@ interface PaymentResponse : EventTarget
getter shippingOption
method complete
method constructor
method retry
method toJSON
setter onpayerdetailchange
interface Performance : EventTarget
attribute @@toStringTag
getter memory
......
......@@ -5328,7 +5328,6 @@ interface PaymentResponse : EventTarget
attribute @@toStringTag
getter details
getter methodName
getter onpayerdetailchange
getter payerEmail
getter payerName
getter payerPhone
......@@ -5337,9 +5336,7 @@ interface PaymentResponse : EventTarget
getter shippingOption
method complete
method constructor
method retry
method toJSON
setter onpayerdetailchange
interface Performance : EventTarget
attribute @@toStringTag
getter memory
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment