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

Unified Diff: webkit/support/webkit_support.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 | « webkit/support/platform_support_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/webkit_support.cc
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index 282ac86b307945a5730cd1dddd62ca953548e4b8..ff3fd4025bc3e2afd2b9ef2d904fb2c0b2720094 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -71,6 +71,10 @@
#include "webkit/tools/test_shell/simple_file_system.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
+#if defined(OS_ANDROID)
+#include "base/test/test_support_android.h"
+#endif
+
using WebKit::WebCString;
using WebKit::WebDevToolsAgentClient;
using WebKit::WebFileSystem;
@@ -104,6 +108,10 @@ void InitLogging() {
}
#endif
+#if defined(OS_ANDROID)
+ // On Android we expect the log to appear in logcat.
+ InitAndroidTestLogging();
+#else
FilePath log_filename;
PathService::Get(base::DIR_EXE, &log_filename);
log_filename = log_filename.AppendASCII("DumpRenderTree.log");
@@ -123,6 +131,7 @@ void InitLogging() {
const bool kTimestamp = true;
const bool kTickcount = true;
logging::SetLogItems(kProcessId, kThreadId, !kTimestamp, kTickcount);
+#endif // else defined(OS_ANDROID)
}
class TestEnvironment {
@@ -272,11 +281,15 @@ void SetUpTestEnvironmentImpl(bool unit_test_mode) {
// at same time.
url_util::Initialize();
base::AtExitManager* at_exit_manager = NULL;
+ // In Android DumpRenderTree, AtExitManager is created in
+ // testing/android/native_test_wrapper.cc before main() is called.
+#if !defined(OS_ANDROID)
// Some initialization code may use a AtExitManager before initializing
// TestEnvironment, so we create a AtExitManager early and pass its ownership
// to TestEnvironment.
if (!unit_test_mode)
at_exit_manager = new base::AtExitManager;
+#endif
webkit_support::BeforeInitialize(unit_test_mode);
test_environment = new TestEnvironment(unit_test_mode, at_exit_manager);
webkit_support::AfterInitialize(unit_test_mode);
« no previous file with comments | « webkit/support/platform_support_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698