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

Unified Diff: third_party/WebKit/LayoutTests/presentation/resources/presentation-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/presentation/resources/presentation-service-mock.js
diff --git a/third_party/WebKit/LayoutTests/presentation/resources/presentation-service-mock.js b/third_party/WebKit/LayoutTests/presentation/resources/presentation-service-mock.js
index 9b2dbd028368c295776bad6fea7a35384a5e2b49..6df94aa574e1037beb3a420494d3cac2b6b65a48 100644
--- a/third_party/WebKit/LayoutTests/presentation/resources/presentation-service-mock.js
+++ b/third_party/WebKit/LayoutTests/presentation/resources/presentation-service-mock.js
@@ -8,23 +8,19 @@ let presentationServiceMock = loadMojoModules(
'presentationServiceMock',
[
'third_party/WebKit/public/platform/modules/presentation/presentation.mojom',
- 'mojo/public/js/router',
+ 'mojo/public/js/bindings',
]).then(mojo => {
- let [ presentationService, router ] = mojo.modules;
+ let [ presentationService, bindings ] = mojo.modules;
class PresentationServiceMock {
constructor(interfaceProvider) {
interfaceProvider.addInterfaceOverrideForTesting(
presentationService.PresentationService.name,
- handle => this.connectPresentationService_(handle));
+ handle => this.bindingSet_.addBinding(this, handle));
this.interfaceProvider_ = interfaceProvider;
this.pendingResponse_ = null;
- }
-
- connectPresentationService_(handle) {
- this.presentationServiceStub_ = new presentationService.PresentationService.stubClass(this);
- this.presentationServiceRouter_ = new router.Router(handle);
- this.presentationServiceRouter_.setIncomingReceiver(this.presentationServiceStub_);
+ this.bindingSet_ = new bindings.BindingSet(
+ presentationService.PresentationService);
}
startSession(urls) {

Powered by Google App Engine
This is Rietveld 408576698