Index: content/shell/shell_browser_main.cc |
diff --git a/content/shell/shell_browser_main.cc b/content/shell/shell_browser_main.cc |
index b1f0e9f6f1d10a160b0c02acaa33b5252b151f70..e68b58873c5df03361494c66fa99c386eddc8904 100644 |
--- a/content/shell/shell_browser_main.cc |
+++ b/content/shell/shell_browser_main.cc |
@@ -25,27 +25,12 @@ |
#include "webkit/support/webkit_support.h" |
#if defined(OS_ANDROID) |
-#include "base/android/jni_android.h" |
#include "base/run_loop.h" |
-#include "content/public/test/nested_message_pump_android.h" |
+#include "content/shell/shell_layout_tests_android.h" |
#endif |
namespace { |
-#if defined(OS_ANDROID) |
-// Path to search for when translating a layout test path to an URL. |
-const char kAndroidLayoutTestPath[] = |
- "/data/local/tmp/third_party/WebKit/LayoutTests/"; |
- |
-// The base URL from which layout tests are being served on Android. |
-const char kAndroidLayoutTestBase[] = "http://127.0.0.1:8000/all-tests/"; |
- |
-base::MessagePump* CreateMessagePumpForUI() { |
- return new content::NestedMessagePumpAndroid(); |
-} |
- |
-#endif |
- |
GURL GetURLForLayoutTest(const std::string& test_name, |
base::FilePath* current_working_directory, |
bool* enable_pixel_dumping, |
@@ -131,7 +116,7 @@ bool GetNextTest(const CommandLine::StringVector& args, |
// Main routine for running as the Browser process. |
int ShellBrowserMain(const content::MainFunctionParams& parameters, |
- scoped_ptr<content::BrowserMainRunner>& main_runner) { |
+ const scoped_ptr<content::BrowserMainRunner>& main_runner) { |
bool layout_test_mode = |
CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree); |
base::ScopedTempDir browser_context_path_for_layout_tests; |
@@ -144,19 +129,13 @@ int ShellBrowserMain(const content::MainFunctionParams& parameters, |
browser_context_path_for_layout_tests.path().MaybeAsASCII()); |
#if defined(OS_ANDROID) |
- // TODO(beverloo): Create the FIFOs required for Android layout tests. |
- |
- JNIEnv* env = base::android::AttachCurrentThread(); |
- content::NestedMessagePumpAndroid::RegisterJni(env); |
- |
- const bool success = base::MessageLoop::InitMessagePumpForUIFactory( |
- &CreateMessagePumpForUI); |
- CHECK(success) << "Unable to initialize the message pump for Android."; |
+ EnsureCreateAndroidNestedMessagePump(); |
+ EnsureCreateAndroidFIFOs(); |
bulach
2013/06/19 17:57:42
nit: just expose one function, like "InitializeFor
Peter Beverloo
2013/06/19 19:48:32
Done.
|
#endif |
} |
int exit_code = main_runner->Initialize(parameters); |
- DCHECK(exit_code < 0) |
+ DCHECK_LT(exit_code, 0) |
<< "BrowserMainRunner::Initialize failed in ShellBrowserMain"; |
if (exit_code >= 0) |