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

Unified Diff: services/js/test/pingpong.js

Issue 803173009: Mojo JS Bindings: Eliminate foo$ Stub and Proxy class members (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: sync Created 5 years, 11 months 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 | « services/js/test/network_test.js ('k') | sky/framework/shell.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/js/test/pingpong.js
diff --git a/services/js/test/pingpong.js b/services/js/test/pingpong.js
index 696f80d090019b4ebf288d4ed6cb1cd9e6f65081..44ef598b885b11e59263808fbeefc9ed5e57beb0 100644
--- a/services/js/test/pingpong.js
+++ b/services/js/test/pingpong.js
@@ -1,10 +1,13 @@
#!mojo:js_content_handler
define("main", [
+ "mojo/public/js/bindings",
"mojo/services/public/js/application",
"services/js/test/pingpong_service.mojom"
-], function(application, pingPongServiceMojom) {
+], function(bindings, application, pingPongServiceMojom) {
+ const ProxyBindings = bindings.ProxyBindings;
+ const StubBindings = bindings.StubBindings;
const Application = application.Application;
const PingPongService = pingPongServiceMojom.PingPongService;
@@ -50,7 +53,7 @@ define("main", [
}
}
};
- pingTargetService.local$ = pingTargetClient;
+ ProxyBindings(pingTargetService).setLocalDelegate(pingTargetClient);
for(var i = 0; i <= count; i++)
pingTargetService.ping(i);
});
@@ -58,7 +61,8 @@ define("main", [
// This method is only used by the GetTargetService test.
getPingPongService(clientProxy) {
- clientProxy.local$ = new PingPongServiceImpl(this, clientProxy);
+ ProxyBindings(clientProxy).setLocalDelegate(
+ new PingPongServiceImpl(this, clientProxy));
}
}
« no previous file with comments | « services/js/test/network_test.js ('k') | sky/framework/shell.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698