Index: webkit/support/webkit_support.cc |
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc |
index 282ac86b307945a5730cd1dddd62ca953548e4b8..71001e7fddcb059e80fc573b94136bedf35b3139 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,6 +281,9 @@ 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) |
Paweł Hajdan Jr.
2012/05/30 17:15:38
I don't see terminating #endif for this - is that
Xianzhu
2012/05/30 18:17:56
Sorry I messed up the code when managing downstrea
|
// Some initialization code may use a AtExitManager before initializing |
// TestEnvironment, so we create a AtExitManager early and pass its ownership |
// to TestEnvironment. |