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

Side by Side Diff: chrome/test/data/payments/show_twice.js

Issue 2816513004: Web payments metric for multiple show() calls. (Closed)
Patch Set: Comments 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The Chromium Authors. All rights reserved. 2 * Copyright 2016 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* global PaymentRequest:false */
8
9 /** 7 /**
10 * Launches the PaymentRequest UI twice. 8 * Launches the PaymentRequest UI twice.
11 */ 9 */
12 function buy() { // eslint-disable-line no-unused-vars 10 function buy() { // eslint-disable-line no-unused-vars
13 var payment1 = new PaymentRequest( 11 const payment1 = new PaymentRequest(
14 [{supportedMethods: ['visa']}], 12 [{supportedMethods: ['visa']}],
15 {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}}); 13 {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
16 var payment2 = new PaymentRequest( 14 const payment2 = new PaymentRequest(
17 [{supportedMethods: ['visa']}], 15 [{supportedMethods: ['visa']}],
18 {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}}); 16 {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
19 payment1.show(); 17 payment1.show();
20 payment2.show().catch(function(error) { 18 payment2.show().catch(function(error) {
21 print("Second request: " + error); 19 print('Second request: ' + error);
22 }); 20 });
23 } 21 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698