Index: chrome/test/base/chrome_test_suite.cc |
diff --git a/chrome/test/base/chrome_test_suite.cc b/chrome/test/base/chrome_test_suite.cc |
index 933d6a00d76025e0ff7d68489007e2db1044f4bb..6581d13d17539c087194a452fba2e140aabd774b 100644 |
--- a/chrome/test/base/chrome_test_suite.cc |
+++ b/chrome/test/base/chrome_test_suite.cc |
@@ -22,6 +22,11 @@ |
#include "extensions/common/constants.h" |
#include "testing/gtest/include/gtest/gtest.h" |
+#if defined(OS_ANDROID) |
+#include "base/android/jni_android.h" |
+#include "chrome/browser/android/chrome_jni_registrar.h" |
+#endif |
+ |
#if defined(OS_CHROMEOS) |
#include "base/process/process_metrics.h" |
#include "chromeos/chromeos_paths.h" |
@@ -77,6 +82,11 @@ void ChromeTestSuite::Initialize() { |
PathService::Override(base::DIR_MODULE, browser_dir_); |
} |
+#if defined(OS_ANDROID) |
+ ASSERT_TRUE(chrome::android::RegisterBrowserJNI( |
+ base::android::AttachCurrentThread())); |
+#endif |
+ |
#if !defined(OS_IOS) |
// Disable external libraries load if we are under python process in |
// ChromeOS. That means we are autotest and, if ASAN is used, |