diff options
author | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-26 19:48:04 +0000 |
---|---|---|
committer | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-26 19:48:04 +0000 |
commit | f80685c31c04410dc90bc45f492f4adc73ace117 (patch) | |
tree | 10bc5ea060c8538b846ff79a44beb0ab18947904 /extensions/renderer/module_system.cc | |
parent | 5f2d097e8e839a4ab180cc8f63a5ddec4378e408 (diff) | |
download | chromium_src-f80685c31c04410dc90bc45f492f4adc73ace117.zip chromium_src-f80685c31c04410dc90bc45f492f4adc73ace117.tar.gz chromium_src-f80685c31c04410dc90bc45f492f4adc73ace117.tar.bz2 |
Add support for writing unit tests for Mojo-backed apps/extensions APIs.
This change adds the infrastructure for unit testing the JS parts of
apps and extensions APIs implemented on top of Mojo services. The test
environment provides a partial implementation of the JS test API
provided to browser tests. A TestServiceProvider implementation is
used to provide test implementations of the appropriate Mojo services to
the JS code.
BUG=389016
Review URL: https://codereview.chromium.org/399363002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285792 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/renderer/module_system.cc')
-rw-r--r-- | extensions/renderer/module_system.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/extensions/renderer/module_system.cc b/extensions/renderer/module_system.cc index ab265fa..1f33764 100644 --- a/extensions/renderer/module_system.cc +++ b/extensions/renderer/module_system.cc @@ -230,9 +230,10 @@ v8::Local<v8::Value> ModuleSystem::RequireForJsInner( v8::Local<v8::Value> ModuleSystem::CallModuleMethod( const std::string& module_name, const std::string& method_name) { - v8::HandleScope handle_scope(GetIsolate()); + v8::EscapableHandleScope handle_scope(GetIsolate()); v8::Handle<v8::Value> no_args; - return CallModuleMethod(module_name, method_name, 0, &no_args); + return handle_scope.Escape( + CallModuleMethod(module_name, method_name, 0, &no_args)); } v8::Local<v8::Value> ModuleSystem::CallModuleMethod( |