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

Unified Diff: mojo/edk/js/tests/js_to_cpp_tests.js

Issue 2578333002: Mojo JS bindings: BindingSet support. (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/edk/js/tests/interface_ptr_tests.js ('k') | mojo/public/js/bindings.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/js/tests/js_to_cpp_tests.js
diff --git a/mojo/edk/js/tests/js_to_cpp_tests.js b/mojo/edk/js/tests/js_to_cpp_tests.js
index ddecc4b14b4c513f3a0feb815891b6291a8f9c3f..6b69fcacc8bea86b8d5be6e22dba055d5e6ee2fc 100644
--- a/mojo/edk/js/tests/js_to_cpp_tests.js
+++ b/mojo/edk/js/tests/js_to_cpp_tests.js
@@ -6,10 +6,9 @@ define('mojo/edk/js/tests/js_to_cpp_tests', [
'console',
'mojo/edk/js/tests/js_to_cpp.mojom',
'mojo/public/js/bindings',
- 'mojo/public/js/connection',
'mojo/public/js/connector',
'mojo/public/js/core',
-], function (console, jsToCpp, bindings, connection, connector, core) {
+], function (console, jsToCpp, bindings, connector, core) {
var retainedJsSide;
var retainedJsSideStub;
var sampleData;
@@ -22,11 +21,9 @@ define('mojo/edk/js/tests/js_to_cpp_tests', [
};
function JsSideConnection() {
+ this.binding = new bindings.Binding(jsToCpp.JsSide, this);
}
- JsSideConnection.prototype =
- Object.create(jsToCpp.JsSide.stubClass.prototype);
-
JsSideConnection.prototype.setCppSide = function(cppSide) {
this.cppSide_ = cppSide;
this.cppSide_.startTest();
@@ -220,9 +217,7 @@ define('mojo/edk/js/tests/js_to_cpp_tests', [
for (i = 0; i < sampleMessage.length; ++i) {
sampleMessage[i] = 255 - i;
}
- retainedJsSideStub =
- connection.bindHandleToStub(jsSideRequestHandle, jsToCpp.JsSide);
retainedJsSide = new JsSideConnection;
- bindings.StubBindings(retainedJsSideStub).delegate = retainedJsSide;
+ retainedJsSide.binding.bind(jsSideRequestHandle);
};
});
« no previous file with comments | « mojo/edk/js/tests/interface_ptr_tests.js ('k') | mojo/public/js/bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698