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

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

Issue 877993004: Revert "Update mojo sdk to rev 8d45c89c30b230843c5bd6dd0693a555750946c0" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: third_party/mojo/src/mojo/edk/js/tests/js_to_cpp_tests.js
diff --git a/third_party/mojo/src/mojo/edk/js/tests/js_to_cpp_tests.js b/third_party/mojo/src/mojo/edk/js/tests/js_to_cpp_tests.js
index ddecc4b14b4c513f3a0feb815891b6291a8f9c3f..140ad4c0802b60ffc719523a22263e4a99c88768 100644
--- a/third_party/mojo/src/mojo/edk/js/tests/js_to_cpp_tests.js
+++ b/third_party/mojo/src/mojo/edk/js/tests/js_to_cpp_tests.js
@@ -5,13 +5,11 @@
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) {
- var retainedJsSide;
- var retainedJsSideStub;
+], function (console, jsToCpp, connection, connector, core) {
+ var retainedConnection;
var sampleData;
var sampleMessage;
var BAD_VALUE = 13;
@@ -27,11 +25,6 @@ define('mojo/edk/js/tests/js_to_cpp_tests', [
JsSideConnection.prototype =
Object.create(jsToCpp.JsSide.stubClass.prototype);
- JsSideConnection.prototype.setCppSide = function(cppSide) {
- this.cppSide_ = cppSide;
- this.cppSide_.startTest();
- };
-
JsSideConnection.prototype.ping = function (arg) {
this.cppSide_.pingResponse();
};
@@ -210,7 +203,13 @@ define('mojo/edk/js/tests/js_to_cpp_tests', [
}, null);
}
- return function(jsSideRequestHandle) {
+ function createCppSideConnection(handle, stubClass, proxyClass) {
+ var c = new connection.Connection(handle, stubClass, proxyClass);
+ c.local.cppSide_ = c.remote;
+ return c;
+ }
+
+ return function(handle) {
var i;
sampleData = new Uint8Array(DATA_PIPE_PARAMS.capacityNumBytes);
for (i = 0; i < sampleData.length; ++i) {
@@ -220,9 +219,8 @@ 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;
+ retainedConnection = createCppSideConnection(
+ handle, JsSideConnection,jsToCpp.CppSide.proxyClass);
+ retainedConnection.remote.startTest();
};
});
« no previous file with comments | « third_party/mojo/src/mojo/edk/js/tests/js_to_cpp_tests.cc ('k') | third_party/mojo/src/mojo/edk/system/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698