[Merge M-76][Web Payments] Make PaymentRequest.retry() "experimental"
This patch changes PaymentRequest.retry() from "stable" to
"experimental" as mentioned in the intent-to-ship blink-dev thread:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/JwSN1yEVvnk/PjC7rkrQCAAJ
After this patch, enabling
chrome://flags/#enable-web-platform-experimental-features will enable
PaymentResponse.retry().
TBR=bcwhite@chromium.org, rouslan@chromium.org
(cherry picked from commit 23287baa006ac9f5036b270d51e0d94f38b11976)
Bug: 861704, 969004
Change-Id: Ib3e8aff7617e5ce3759576faf97e978f26ba82fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638677
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Danyao Wang <danyao@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#666680}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1652538
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/branch-heads/3809@{#213}
Cr-Branched-From: d82dec1a818f378c464ba307ddd9c92133eac355-refs/heads/master@{#665002}
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
index 57fc7c9..e673e06 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -293,9 +293,6 @@
base::FeatureList::IsEnabled(
features::kPaymentRequestHasEnrolledInstrument));
- WebRuntimeFeatures::EnablePaymentRetry(
- base::FeatureList::IsEnabled(features::kPaymentResponseRetry));
-
if (base::FeatureList::IsEnabled(features::kServiceWorkerPaymentApps))
WebRuntimeFeatures::EnablePaymentApp(true);
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
index 4af87e4d..bd79f0ebd 100644
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -326,10 +326,6 @@
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",
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
index 36f5675..d9a63af 100644
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -81,7 +81,6 @@
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;
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index caa1a7b..82cf63c 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -3870,25 +3870,6 @@
]
}
],
- "PaymentResponseRetry": [
- {
- "platforms": [
- "android",
- "chromeos",
- "linux",
- "mac",
- "windows"
- ],
- "experiments": [
- {
- "name": "Enabled",
- "enable_features": [
- "PaymentResponseRetry"
- ]
- }
- ]
- }
- ],
"PdfIsolation": [
{
"platforms": [
diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h
index 6ad3c27..f1d73e93 100644
--- a/third_party/blink/public/platform/web_runtime_features.h
+++ b/third_party/blink/public/platform/web_runtime_features.h
@@ -151,7 +151,6 @@
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);
diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
index cbdd961..acf7a67 100644
--- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -354,10 +354,6 @@
RuntimeEnabledFeatures::SetPaymentRequestHasEnrolledInstrumentEnabled(enable);
}
-void WebRuntimeFeatures::EnablePaymentRetry(bool enable) {
- RuntimeEnabledFeatures::SetPaymentRetryEnabled(enable);
-}
-
void WebRuntimeFeatures::EnablePerformanceManagerInstrumentation(bool enable) {
RuntimeEnabledFeatures::SetPerformanceManagerInstrumentationEnabled(enable);
}
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
index 2e1d3809..52ef6a8 100644
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1127,7 +1127,7 @@
},
{
name: "PaymentRetry",
- status: "stable",
+ status: "experimental",
},
{
name: "PerformanceManagerInstrumentation",
diff --git a/third_party/blink/web_tests/external/wpt/payment-request/idlharness.https.window-expected.txt b/third_party/blink/web_tests/external/wpt/payment-request/idlharness.https.window-expected.txt
index ab11665e..62e7edf 100644
--- a/third_party/blink/web_tests/external/wpt/payment-request/idlharness.https.window-expected.txt
+++ b/third_party/blink/web_tests/external/wpt/payment-request/idlharness.https.window-expected.txt
@@ -1,5 +1,5 @@
This is a testharness.js-based test.
-Found 109 tests; 105 PASS, 4 FAIL, 0 TIMEOUT, 0 NOTRUN.
+Found 109 tests; 107 PASS, 2 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 payerEmail
PASS PaymentResponse interface: attribute payerPhone
PASS PaymentResponse interface: operation complete(PaymentComplete)
-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 PaymentResponse interface: operation retry(PaymentValidationErrors)
+PASS PaymentResponse interface: attribute onpayerdetailchange
PASS MerchantValidationEvent interface: existence and properties of interface object
PASS MerchantValidationEvent interface object length
PASS MerchantValidationEvent interface object name
diff --git a/third_party/blink/web_tests/external/wpt/payment-request/payment-response/onpayerdetailchange-attribute.https-expected.txt b/third_party/blink/web_tests/external/wpt/payment-request/payment-response/onpayerdetailchange-attribute.https-expected.txt
deleted file mode 100644
index 8b57681..0000000
--- a/third_party/blink/web_tests/external/wpt/payment-request/payment-response/onpayerdetailchange-attribute.https-expected.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-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.
-
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
index cf92b9e..6a943d56 100644
--- a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
+++ b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
@@ -5328,6 +5328,7 @@
attribute @@toStringTag
getter details
getter methodName
+ getter onpayerdetailchange
getter payerEmail
getter payerName
getter payerPhone
@@ -5336,7 +5337,9 @@
getter shippingOption
method complete
method constructor
+ method retry
method toJSON
+ setter onpayerdetailchange
interface Performance : EventTarget
attribute @@toStringTag
getter memory