From b397b06d3a2b7195c5e8bd5b5f456349b53c967e Mon Sep 17 00:00:00 2001 From: "nileshagrawal@chromium.org" Date: Tue, 26 Jun 2012 19:33:28 +0000 Subject: Revert "Use a test specific macro to call JNI registrars during APK tests." TBR=jam@chromium.org,jrg@chromium.org (The original CL was submitted with a TBR too, incorrectly categorized as a simple gyp change) This reverts commit 575ab5330492664079ea89804bec615d15ea3b33. We intend to do this using run_all_unittests.cc in individual suites. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10662056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144240 0039d316-1c4b-4281-b951-d872f2087c98 --- content/content_tests.gypi | 3 --- net/net.gyp | 5 +---- testing/android/native_test_launcher.cc | 25 ++++--------------------- 3 files changed, 5 insertions(+), 28 deletions(-) diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 5e35483..5bedd31 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -505,9 +505,6 @@ 'dependencies': [ '../testing/android/native_test.gyp:native_test_native_code', ], - 'defines': [ - 'REGISTER_CONTENT_UNITESTS_JNI', - ], }], ], }, diff --git a/net/net.gyp b/net/net.gyp index a56d052..cf37d83 100644 --- a/net/net.gyp +++ b/net/net.gyp @@ -1390,10 +1390,7 @@ ['OS == "android" and gtest_target_type == "shared_library"', { 'dependencies': [ '../testing/android/native_test.gyp:native_test_native_code', - ], - 'defines': [ - 'REGISTER_NET_UNITESTS_JNI', - ], + ] }], [ 'OS != "win" and OS != "mac"', { 'sources!': [ diff --git a/testing/android/native_test_launcher.cc b/testing/android/native_test_launcher.cc index dad604b..b88cb30 100644 --- a/testing/android/native_test_launcher.cc +++ b/testing/android/native_test_launcher.cc @@ -13,9 +13,10 @@ #include #include -#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" @@ -28,14 +29,6 @@ #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); @@ -183,18 +176,8 @@ static void RunTests(JNIEnv* env, env, env->NewLocalRef(app_context)); base::android::InitApplicationContext(scoped_context); - base::android::RegisterJni(env); - - // A unittest target may define these macros to register JNI dependencies. - // These should only be defined if the target also depends on the - // corresponding registrar. -#if defined(REGISTER_NET_UNITTESTS_JNI) - net::android::RegisterJni(env); -#endif - -#if defined(REGISTER_CONTENT_UNITTESTS_JNI) - content::android::RegisterJni(env); -#endif + base::android::RegisterLocaleUtils(env); + base::android::RegisterPathUtils(env); FilePath files_dir(base::android::ConvertJavaStringToUTF8(env, jfiles_dir)); // A few options, such "--gtest_list_tests", will just use printf directly -- cgit v1.1