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

Unified Diff: third_party/WebKit/LayoutTests/payments/resources/payment-request-mock.js

Issue 2595563004: Mojo JS bindings: fix enum array validation. (Closed)
Patch Set: . Created 4 years 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 | « mojo/public/tools/bindings/generators/mojom_js_generator.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/payments/resources/payment-request-mock.js
diff --git a/third_party/WebKit/LayoutTests/payments/resources/payment-request-mock.js b/third_party/WebKit/LayoutTests/payments/resources/payment-request-mock.js
index 48ce72c3b21cc302f4236b7b82e24c6c20349047..5d96e2da1528e683e39eacc7955e617954b25aab 100644
--- a/third_party/WebKit/LayoutTests/payments/resources/payment-request-mock.js
+++ b/third_party/WebKit/LayoutTests/payments/resources/payment-request-mock.js
@@ -7,24 +7,19 @@
let paymentRequestMock = loadMojoModules(
'paymentRequestMock',
['components/payments/payment_request.mojom',
- 'mojo/public/js/router',
+ 'mojo/public/js/bindings',
]).then(mojo => {
- let [paymentRequest, router] = mojo.modules;
+ let [paymentRequest, bindings] = mojo.modules;
class PaymentRequestMock {
constructor(interfaceProvider) {
interfaceProvider.addInterfaceOverrideForTesting(
paymentRequest.PaymentRequest.name,
- handle => this.connectPaymentRequest_(handle));
+ handle => this.bindings_.addBinding(this, handle));
this.interfaceProvider_ = interfaceProvider;
this.pendingResponse_ = null;
- }
-
- connectPaymentRequest_(handle) {
- this.paymentRequestStub_ = new paymentRequest.PaymentRequest.stubClass(this);
- this.paymentRequestRouter_ = new router.Router(handle);
- this.paymentRequestRouter_.setIncomingReceiver(this.paymentRequestStub_);
+ this.bindings_ = new bindings.BindingSet(paymentRequest.PaymentRequest);
}
init(client, supportedMethods, details, options) {
« no previous file with comments | « mojo/public/tools/bindings/generators/mojom_js_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698