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

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

Issue 2571903003: Mojo JS bindings: switch most usage of "connection"/"router" module to "bindings". (Closed)
Patch Set: remove the changes to web_ui_mojo.js which seemed to cause flakiness. 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 e404dbc7c584c339838b34a5ca9cd74448dc6196..9e1f966c312baad542d5d858410f39ee368af706 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 @@ const TEST_BUDGET_TIME = new Date().getTime();
let budgetServiceMock = loadMojoModules(
'budgetServiceMock',
['third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom',
- 'mojo/public/js/router'
+ 'mojo/public/js/bindings'
]).then(mojo => {
- const [budgetService, router] = mojo.modules;
+ const [budgetService, bindings] = mojo.modules;
class BudgetServiceMock {
constructor(interfaceProvider) {
interfaceProvider.addInterfaceOverrideForTesting(
budgetService.BudgetService.name,
- handle => this.connectBudgetService_(handle));
+ handle => this.bindingSet_.addBinding(this, handle));
this.interfaceProvider_ = interfaceProvider;
@@ -27,12 +27,7 @@ let budgetServiceMock = loadMojoModules(
this.cost_ = {};
this.budget_ = [];
this.error_ = budgetService.BudgetServiceErrorType.NONE;
- }
-
- connectBudgetService_(handle) {
- this.budgetServiceStub_ = new budgetService.BudgetService.stubClass(this);
- this.budgetServiceRouter_ = new router.Router(handle);
- this.budgetServiceRouter_.setIncomingReceiver(this.budgetServiceStub_);
+ this.bindingSet_ = new bindings.BindingSet(budgetService.BudgetService);
}
// This is called directly from test JavaScript to set up the return value

Powered by Google App Engine
This is Rietveld 408576698