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

Unified Diff: extensions/renderer/api_test_base.cc

Issue 2618693004: Mojo JS bindings: make sure that console.log() could be used in the bindings. (Closed)
Patch Set: merge & resolve Created 3 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 | « content/renderer/render_frame_impl.cc ('k') | ios/web/ios_web_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_test_base.cc
diff --git a/extensions/renderer/api_test_base.cc b/extensions/renderer/api_test_base.cc
index 8a2babad979145f53a082275ac83f51dbe4df434..8e534acb4f7f3aea7c4cf1e492a5e1035a2e71ad 100644
--- a/extensions/renderer/api_test_base.cc
+++ b/extensions/renderer/api_test_base.cc
@@ -16,6 +16,7 @@
#include "extensions/renderer/process_info_native_handler.h"
#include "gin/converter.h"
#include "gin/dictionary.h"
+#include "gin/modules/console.h"
#include "mojo/edk/js/core.h"
#include "mojo/edk/js/handle.h"
#include "mojo/edk/js/support.h"
@@ -154,6 +155,9 @@ void ApiTestEnvironment::RegisterModules() {
"exports.$set('MatchAgainstEventFilter', function() { return [] });");
gin::ModuleRegistry::From(env()->context()->v8_context())
+ ->AddBuiltinModule(env()->isolate(), gin::Console::kModuleName,
+ gin::Console::GetModule(env()->isolate()));
+ gin::ModuleRegistry::From(env()->context()->v8_context())
->AddBuiltinModule(env()->isolate(), mojo::edk::js::Core::kModuleName,
mojo::edk::js::Core::GetModule(env()->isolate()));
gin::ModuleRegistry::From(env()->context()->v8_context())
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | ios/web/ios_web_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698