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

Unified Diff: base/test/test_suite.cc

Issue 10408091: Chromium support of running DumpRenderTree as an apk on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and move out net dependency from testing/android Created 8 years, 7 months 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
« no previous file with comments | « base/test/test_stub_android.cc ('k') | base/test/test_support_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_suite.cc
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc
index 75e9ff535ff2c500301b43e5a9641748152edbc1..83a2549613220f8cfe7b9a92a9f815f36638afd1 100644
--- a/base/test/test_suite.cc
+++ b/base/test/test_suite.cc
@@ -28,7 +28,7 @@
#endif
#if defined(OS_ANDROID)
-#include "base/test/test_stub_android.h"
+#include "base/test/test_support_android.h"
#endif
#if defined(TOOLKIT_GTK)
@@ -101,8 +101,13 @@ void TestSuite::PreInitialize(int argc, char** argv,
#elif defined(TOOLKIT_GTK)
gtk_init_check(&argc, &argv);
#endif // defined(TOOLKIT_GTK)
+
+ // On Android when building tests as apks, AtExitManager is created in
+ // testing/android/native_test_wrapper.cc before main() is called.
+#if !defined(ANDROID_APK_TEST_TARGET)
if (create_at_exit_manager)
at_exit_manager_.reset(new base::AtExitManager);
+#endif
// Don't add additional code to this function. Instead add it to
// Initialize(). See bug 6436.
@@ -237,9 +242,8 @@ void TestSuite::Initialize() {
#endif
#if defined(OS_ANDROID)
- InitAndroidTestStub();
-#endif
-
+ InitAndroidTest();
+#else
// Initialize logging.
FilePath exe;
PathService::Get(base::FILE_EXE, &exe);
@@ -253,6 +257,7 @@ void TestSuite::Initialize() {
// We want process and thread IDs because we may have multiple processes.
// Note: temporarily enabled timestamps in an effort to catch bug 6361.
logging::SetLogItems(true, true, true, true);
+#endif // else defined(OS_ANDROID)
CHECK(base::EnableInProcessStackDumping());
#if defined(OS_WIN)
@@ -269,11 +274,7 @@ void TestSuite::Initialize() {
logging::SetLogAssertHandler(UnitTestAssertHandler);
}
-#if !defined(OS_ANDROID)
- // TODO(michaelbai): The icu can not be compiled in Android now, this should
- // be enabled once icu is ready. http://b/5406077.
icu_util::Initialize();
-#endif
CatchMaybeTests();
ResetCommandLine();
« no previous file with comments | « base/test/test_stub_android.cc ('k') | base/test/test_support_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698