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

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

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
Index: content/public/test/test_utils.h
diff --git a/content/public/test/test_utils.h b/content/public/test/test_utils.h
index b629ba78781ba6d5872d2f5b464dd58bf0151151..74a53e5337108f29e8e4b067d7621579a2153aaa 100644
--- a/content/public/test/test_utils.h
+++ b/content/public/test/test_utils.h
@@ -9,6 +9,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
+#include "build/build_config.h"
#include "content/public/browser/browser_child_process_observer.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
@@ -17,6 +18,10 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/web_contents_observer.h"
+#if defined(OS_ANDROID)
+#include <jni.h>
+#endif
+
namespace base {
class Value;
class CommandLine;
@@ -70,6 +75,11 @@ bool AreAllSitesIsolatedForTesting();
// the test; the flag will be read on the first real navigation.
void IsolateAllSitesForTesting(base::CommandLine* command_line);
+#if defined(OS_ANDROID)
+// Registers content/browser JNI bindings necessary for some types of tests.
+bool RegisterJniForTesting(JNIEnv* env);
+#endif
+
// Helper class to Run and Quit the message loop. Run and Quit can only happen
// once per instance. Make a new instance for each use. Calling Quit after Run
// has returned is safe and has no effect.

Powered by Google App Engine
This is Rietveld 408576698