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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js

Issue 2590393002: Revert of Mojo JS bindings: switch most usage of "connection"/"router" module to "bindings". (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
Index: third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js b/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js
index 9e1f966c312baad542d5d858410f39ee368af706..e404dbc7c584c339838b34a5ca9cd74448dc6196 100644
--- a/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js
+++ b/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js
@@ -11,15 +11,15 @@
let budgetServiceMock = loadMojoModules(
'budgetServiceMock',
['third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom',
- 'mojo/public/js/bindings'
+ 'mojo/public/js/router'
]).then(mojo => {
- const [budgetService, bindings] = mojo.modules;
+ const [budgetService, router] = mojo.modules;
class BudgetServiceMock {
constructor(interfaceProvider) {
interfaceProvider.addInterfaceOverrideForTesting(
budgetService.BudgetService.name,
- handle => this.bindingSet_.addBinding(this, handle));
+ handle => this.connectBudgetService_(handle));
this.interfaceProvider_ = interfaceProvider;
@@ -27,7 +27,12 @@
this.cost_ = {};
this.budget_ = [];
this.error_ = budgetService.BudgetServiceErrorType.NONE;
- this.bindingSet_ = new bindings.BindingSet(budgetService.BudgetService);
+ }
+
+ connectBudgetService_(handle) {
+ this.budgetServiceStub_ = new budgetService.BudgetService.stubClass(this);
+ this.budgetServiceRouter_ = new router.Router(handle);
+ this.budgetServiceRouter_.setIncomingReceiver(this.budgetServiceStub_);
}
// This is called directly from test JavaScript to set up the return value

Powered by Google App Engine
This is Rietveld 408576698