From 6d6e964cec6f95bd8143a17b509969467ee6b69b Mon Sep 17 00:00:00 2001 From: "darin@chromium.org" Date: Thu, 27 Mar 2014 18:07:14 +0000 Subject: Mojo: add javascript bindings for request/response If a mojom interface method specifies response parameters, then we'll generate javascript bindings that provide an additional callback parameter used to pass the response parameters. This mirrors the C++ implementation. A future improvement will likely be to use promises instead, especially now that they are enabled on trunk. As part of this CL, connector.js was also made consistent with connector.cc. It starts reading the message pipe immediately, handles write failures in a similar fashion, etc. The Connection type from connector.js is factored out into a separate file as it now holds a Router object. router.js mirrors router.cc. The Connection type is really the mirror of the C++ RemotePtr type. Some basic request/response tests were added to connection_unittests.js. We'll probably want more testing. R=abarth@chromium.org, mpcomplete@chromium.org Review URL: https://codereview.chromium.org/207503004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259932 0039d316-1c4b-4281-b951-d872f2087c98 --- mojo/apps/js/test/run_apps_js_tests.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mojo/apps/js/test') diff --git a/mojo/apps/js/test/run_apps_js_tests.cc b/mojo/apps/js/test/run_apps_js_tests.cc index 3427ca4..ade8c26 100644 --- a/mojo/apps/js/test/run_apps_js_tests.cc +++ b/mojo/apps/js/test/run_apps_js_tests.cc @@ -60,12 +60,12 @@ TEST(JSTest, MAYBE_sample_test) { // http://crbug.com/351214 #if defined(OS_POSIX) -#define MAYBE_connector DISABLED_connector +#define MAYBE_connection DISABLED_connection #else -#define MAYBE_connector connector +#define MAYBE_connection connection #endif -TEST(JSTest, MAYBE_connector) { - RunTest("connector_unittests.js", true); +TEST(JSTest, MAYBE_connection) { + RunTest("connection_unittests.js", true); } TEST(JSTest, monotonic_clock) { -- cgit v1.1