Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7696)

Unified Diff: chrome/test/data/payments/metrics.js

Issue 2810323002: [Payments] Add metric for when Pr UI is skipped. (Closed)
Patch Set: Use the BooleanSkipped enum Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/payments/metrics.js
diff --git a/chrome/test/data/payments/metrics.js b/chrome/test/data/payments/metrics.js
index f9d0db082bd3933450dff3556184abec3ff93e90..b280f15ac11d23929bc041268b37206a5ddfe7b0 100644
--- a/chrome/test/data/payments/metrics.js
+++ b/chrome/test/data/payments/metrics.js
@@ -82,6 +82,29 @@ function androidPayBuy() { // eslint-disable-line no-unused-vars
}
/**
+ * Launches the PaymentRequest UI which accepts only Android Pay and does not
+ * require any other information.
+ */
+function androidPaySkipUiBuy() { // eslint-disable-line no-unused-vars
+ try {
+ request = new PaymentRequest(
+ [{supportedMethods: ['https://android.com/pay']}], {
+ total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
+ });
+ request.show()
+ .then(function(resp) {
+ return resp.complete('success');
+ }).then(function() {
+ print(JSON.stringify(resp, undefined, 2));
+ }).catch(function(error) {
+ print(error);
+ });
+ } catch (error) {
+ print(error.message);
+ }
+}
+
+/**
* Launches the PaymentRequest UI which accepts only an unsupported payment
* method.
*/

Powered by Google App Engine
This is Rietveld 408576698