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

Unified Diff: content/public/test/test_utils.cc

Issue 1485893003: Make a content/test API for registering JNI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: namespace Created 5 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 | « content/public/test/test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/test_utils.cc
diff --git a/content/public/test/test_utils.cc b/content/public/test/test_utils.cc
index 1a05f68073e92c0ef4e0cef854fce559f7e472db..76d42aac32b5e718c6bfb234959101747762ca54 100644
--- a/content/public/test/test_utils.cc
+++ b/content/public/test/test_utils.cc
@@ -23,6 +23,10 @@
#include "content/public/test/test_launcher.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(OS_ANDROID)
+#include "content/browser/android/browser_jni_registrar.h"
+#endif
+
namespace content {
namespace {
@@ -196,6 +200,13 @@ void IsolateAllSitesForTesting(base::CommandLine* command_line) {
command_line->AppendSwitch(switches::kSitePerProcess);
}
+#if defined(OS_ANDROID)
+// Registers content/browser JNI bindings necessary for some types of tests.
+bool RegisterJniForTesting(JNIEnv* env) {
+ return content::android::RegisterBrowserJni(env);
jam 2015/12/01 19:14:17 no content::
+}
+#endif
+
MessageLoopRunner::MessageLoopRunner()
: loop_running_(false),
quit_closure_called_(false) {
« no previous file with comments | « content/public/test/test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698