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

Unified Diff: chrome/test/data/android/payments/show_twice.js

Issue 2192423002: Show at most one PaymentRequest UI at a time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « chrome/test/data/android/payments/payment_request_show_twice_test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/android/payments/show_twice.js
diff --git a/chrome/test/data/android/payments/show_twice.js b/chrome/test/data/android/payments/show_twice.js
new file mode 100644
index 0000000000000000000000000000000000000000..e870f4e57a2fbb0a844cd78770c4cb365600de86
--- /dev/null
+++ b/chrome/test/data/android/payments/show_twice.js
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2016 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* global PaymentRequest:false */
+
+/**
+ * Launches the PaymentRequest UI twice.
+ */
+function buy() { // eslint-disable-line no-unused-vars
+ var payment1 = new PaymentRequest(
+ [{supportedMethods: ['visa']}],
+ {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
+ var payment2 = new PaymentRequest(
+ [{supportedMethods: ['visa']}],
+ {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
+ payment1.show();
+ payment2.show().catch(function(error) {
+ print("Second request: " + error);
+ });
+}
« no previous file with comments | « chrome/test/data/android/payments/payment_request_show_twice_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698