Skip to content

Commit

Permalink
Remove duplicate call to InitAndroidTest.
Browse files Browse the repository at this point in the history
The method is called from test_suite.cc.
Also moving methods in test_support_android inside a namespace.

BUG=125059
TEST=None

Review URL: https://chromiumcodereview.appspot.com/10538065

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141473 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
nileshagrawal@chromium.org committed Jun 11, 2012
1 parent 3298756 commit 85bd72b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
9 changes: 6 additions & 3 deletions base/test/test_support_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ void InitPathProvider(int key) {

} // namespace

namespace base {

void InitAndroidTestLogging() {
logging::InitLogging(NULL,
logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
Expand All @@ -184,9 +186,9 @@ void InitAndroidTestLogging() {
}

void InitAndroidTestPaths() {
InitPathProvider(base::DIR_MODULE);
InitPathProvider(base::DIR_CACHE);
InitPathProvider(base::DIR_ANDROID_APP_DATA);
InitPathProvider(DIR_MODULE);
InitPathProvider(DIR_CACHE);
InitPathProvider(DIR_ANDROID_APP_DATA);
}

void InitAndroidTestMessageLoop() {
Expand All @@ -198,3 +200,4 @@ void InitAndroidTest() {
InitAndroidTestPaths();
InitAndroidTestMessageLoop();
}
} // namespace base
4 changes: 4 additions & 0 deletions base/test/test_support_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef BASE_TEST_TEST_SUPPORT_ANDROID_H_
#define BASE_TEST_TEST_SUPPORT_ANDROID_H_

namespace base {

// Init logging for tests on Android. Logs will be output into Android's logcat.
void InitAndroidTestLogging();

Expand All @@ -17,4 +19,6 @@ void InitAndroidTestMessageLoop();
// Do all of the initializations above.
void InitAndroidTest();

} // namespace base

#endif // BASE_TEST_TEST_SUPPORT_ANDROID_H_
4 changes: 0 additions & 4 deletions testing/android/generate_native_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,6 @@ def main(argv):
if options.jars:
jar_list = options.jars.replace('"', '').split()

# Ignore --ant-compile when building with Android source.
if 'ANDROID_BUILD_TOP' in os.environ:
options.ant_compile = False

ntag = NativeTestApkGenerator(native_library=options.native_library,
jars=jar_list,
output_directory=options.output,
Expand Down
3 changes: 0 additions & 3 deletions testing/android/native_test_launcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "base/stringprintf.h"
#include "base/string_tokenizer.h"
#include "base/string_util.h"
#include "base/test/test_support_android.h"
#include "gtest/gtest.h"
#include "testing/android/jni/chrome_native_test_activity_jni.h"

Expand Down Expand Up @@ -180,8 +179,6 @@ static void RunTests(JNIEnv* env,
base::android::RegisterLocaleUtils(env);
base::android::RegisterPathUtils(env);

InitAndroidTest();

FilePath files_dir(base::android::ConvertJavaStringToUTF8(env, jfiles_dir));
// A few options, such "--gtest_list_tests", will just use printf directly
// and won't use the "AndroidLogPrinter". Redirect stdout to a known file.
Expand Down
2 changes: 1 addition & 1 deletion webkit/support/platform_support_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const char kDumpRenderTreeDir[] = "/data/drt";
namespace webkit_support {

void BeforeInitialize(bool unit_test_mode) {
InitAndroidTestPaths();
base::InitAndroidTestPaths();

// Set XML_CATALOG_FILES environment variable to blank to prevent libxml from
// loading and complaining the non-exsistent /etc/xml/catalog file.
Expand Down
2 changes: 1 addition & 1 deletion webkit/support/webkit_support.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void InitLogging() {

#if defined(OS_ANDROID)
// On Android we expect the log to appear in logcat.
InitAndroidTestLogging();
base::InitAndroidTestLogging();
#else
FilePath log_filename;
PathService::Get(base::DIR_EXE, &log_filename);
Expand Down

0 comments on commit 85bd72b

Please sign in to comment.