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

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

Issue 2149023005: Error out when merchant requests only unknown payment methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@not-supported-error
Patch Set: Fix findbugs 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
Index: chrome/test/data/android/payments/bobpay.js
diff --git a/chrome/test/data/android/payments/no_shipping.js b/chrome/test/data/android/payments/bobpay.js
similarity index 60%
copy from chrome/test/data/android/payments/no_shipping.js
copy to chrome/test/data/android/payments/bobpay.js
index 354fc9acb42acf1278770db823a78d67bd54fe23..0ac7deffae5fa3cc02a689b18bf454777c10bdc7 100644
--- a/chrome/test/data/android/payments/no_shipping.js
+++ b/chrome/test/data/android/payments/bobpay.js
@@ -7,29 +7,28 @@
/* global PaymentRequest:false */
/**
- * Launches the PaymentRequest UI that does not require a shipping address.
+ * Launches the PaymentRequest UI with Bob Pay as the only payment method.
*/
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
- [{supportedMethods: ['visa', 'mastercard']}],
+ [{supportedMethods: ['https://bobpay.com']}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}})
.show()
.then(function(resp) {
resp.complete('success')
.then(function() {
- print(
- resp.methodName + '<br>' +
- JSON.stringify(resp.details, undefined, 2));
+ print(resp.methodName + '<br>' +
+ JSON.stringify(resp.details, undefined, 2));
})
.catch(function(error) {
- print(error);
+ print('complete() rejected<br>' + error.message);
});
})
.catch(function(error) {
- print(error);
+ print('show() rejected<br>' + error.message);
});
} catch (error) {
- print(error.message);
+ print('exception thrown<br>' + error.message);
}
}

Powered by Google App Engine
This is Rietveld 408576698