| OLD | NEW |
| 1 /* | 1 /* |
| 2 * payment-request-mock contains a mock implementation of PaymentRequest. | 2 * payment-request-mock contains a mock implementation of PaymentRequest. |
| 3 */ | 3 */ |
| 4 | 4 |
| 5 "use strict"; | 5 "use strict"; |
| 6 | 6 |
| 7 let paymentRequestMock = loadMojoModules( | 7 let paymentRequestMock = loadMojoModules( |
| 8 'paymentRequestMock', | 8 'paymentRequestMock', |
| 9 ['third_party/WebKit/public/platform/modules/payments/payment_request.mojom'
, | 9 ['components/payments/payment_request.mojom', |
| 10 'mojo/public/js/router', | 10 'mojo/public/js/router', |
| 11 ]).then(mojo => { | 11 ]).then(mojo => { |
| 12 let [paymentRequest, router] = mojo.modules; | 12 let [paymentRequest, router] = mojo.modules; |
| 13 | 13 |
| 14 class PaymentRequestMock { | 14 class PaymentRequestMock { |
| 15 constructor(interfaceProvider) { | 15 constructor(interfaceProvider) { |
| 16 interfaceProvider.addInterfaceOverrideForTesting( | 16 interfaceProvider.addInterfaceOverrideForTesting( |
| 17 paymentRequest.PaymentRequest.name, | 17 paymentRequest.PaymentRequest.name, |
| 18 handle => this.connectPaymentRequest_(handle)); | 18 handle => this.connectPaymentRequest_(handle)); |
| 19 | 19 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 this.client_.onPaymentResponse(new paymentRequest.PaymentResponse(data)); | 53 this.client_.onPaymentResponse(new paymentRequest.PaymentResponse(data)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 onComplete() { | 56 onComplete() { |
| 57 this.client_.onComplete(); | 57 this.client_.onComplete(); |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 return new PaymentRequestMock(mojo.frameInterfaces); | 60 return new PaymentRequestMock(mojo.frameInterfaces); |
| 61 }); | 61 }); |
| OLD | NEW |