Chromium Code Reviews| Index: testing/android/native_test_launcher.cc |
| diff --git a/testing/android/native_test_launcher.cc b/testing/android/native_test_launcher.cc |
| index b88cb30313e72fe06ac03268af267c14ed3bb383..27ea667e8f95d5d570dbe271d2db88f54d65d01e 100644 |
| --- a/testing/android/native_test_launcher.cc |
| +++ b/testing/android/native_test_launcher.cc |
| @@ -13,10 +13,9 @@ |
| #include <signal.h> |
| #include <stdio.h> |
| +#include "base/android/base_jni_registrar.h" |
| #include "base/android/jni_android.h" |
| #include "base/android/jni_string.h" |
| -#include "base/android/locale_utils.h" |
| -#include "base/android/path_utils.h" |
| #include "base/android/scoped_java_ref.h" |
| #include "base/at_exit.h" |
| #include "base/command_line.h" |
| @@ -29,6 +28,14 @@ |
| #include "gtest/gtest.h" |
| #include "testing/android/jni/chrome_native_test_activity_jni.h" |
| +#if defined(REGISTER_NET_UNITTESTS_JNI) |
| +#include "net/android/net_jni_registrar.h" |
| +#endif |
| + |
| +#if defined(REGISTER_CONTENT_UNITTESTS_JNI) |
| +#include "content/app/android/content_jni_registrar.h" |
| +#endif |
| + |
| // The main function of the program to be wrapped as a test apk. |
| extern int main(int argc, char** argv); |
| @@ -176,8 +183,15 @@ static void RunTests(JNIEnv* env, |
| env, env->NewLocalRef(app_context)); |
| base::android::InitApplicationContext(scoped_context); |
| - base::android::RegisterLocaleUtils(env); |
| - base::android::RegisterPathUtils(env); |
| + base::android::RegisterJni(env); |
| + |
| +#if defined(REGISTER_NET_UNITTESTS_JNI) |
|
John Grabowski
2012/06/25 21:04:18
Explain how/when/where these are defined in a comm
nilesh
2012/06/25 21:40:39
Done.
|
| + net::android::RegisterJni(env); |
| +#endif |
| + |
| +#if defined(REGISTER_CONTENT_UNITTESTS_JNI) |
| + content::android::RegisterJni(env); |
| +#endif |
| FilePath files_dir(base::android::ConvertJavaStringToUTF8(env, jfiles_dir)); |
| // A few options, such "--gtest_list_tests", will just use printf directly |