summaryrefslogtreecommitdiffstats
path: root/content/shell/shell_browser_main.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-18 01:43:04 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-18 01:43:04 +0000
commite225b92243b582c0142f139135b20264f7f227c2 (patch)
treeae655c87a5c86620fe457ed00c1c8b0f2b1b018e /content/shell/shell_browser_main.cc
parent875db75569788a2582407fcbb785fad8af607e99 (diff)
downloadchromium_src-e225b92243b582c0142f139135b20264f7f227c2.zip
chromium_src-e225b92243b582c0142f139135b20264f7f227c2.tar.gz
chromium_src-e225b92243b582c0142f139135b20264f7f227c2.tar.bz2
[content shell] Add support for layout tests using content_shell on Android (first step).
Added support for dumping pixel results, and signalling the server that we're ready. BUG=111316 TEST=none Review URL: https://chromiumcodereview.appspot.com/10824351 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/shell_browser_main.cc')
-rw-r--r--content/shell/shell_browser_main.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/content/shell/shell_browser_main.cc b/content/shell/shell_browser_main.cc
index 62f1fb1..8628d95 100644
--- a/content/shell/shell_browser_main.cc
+++ b/content/shell/shell_browser_main.cc
@@ -20,12 +20,6 @@ namespace {
GURL GetURLForLayoutTest(const char* test_name,
std::string* expected_pixel_hash) {
-#if defined(OS_ANDROID)
- // DumpRenderTree is not currently supported for Android using the content
- // shell.
- NOTIMPLEMENTED();
- return GURL::EmptyGURL();
-#else
std::string path_or_url = test_name;
std::string pixel_hash;
std::string::size_type separator_position = path_or_url.find('\'');
@@ -42,7 +36,6 @@ GURL GetURLForLayoutTest(const char* test_name,
webkit_support::SetCurrentDirectoryForFileURL(test_url);
}
return test_url;
-#endif
}
} // namespace
@@ -71,6 +64,11 @@ int ShellBrowserMain(const content::MainFunctionParams& parameters) {
static_cast<content::ShellContentBrowserClient*>(
content::GetContentClient()->browser())->browser_context();
+#if defined(OS_ANDROID)
+ puts("#READY");
+ fflush(stdout);
+#endif
+
while (fgets(test_string, sizeof(test_string), stdin)) {
char *new_line_position = strchr(test_string, '\n');
if (new_line_position)