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

Unified Diff: chrome/test/chromedriver/chrome_android_impl.cc

Issue 12848005: [chromedriver] Separate stuff of chrome from chromedriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments and fix compile error on mac. Created 7 years, 9 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 | « chrome/test/chromedriver/chrome_android_impl.h ('k') | chrome/test/chromedriver/chrome_desktop_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/chrome_android_impl.cc
diff --git a/chrome/test/chromedriver/chrome_android_impl.cc b/chrome/test/chromedriver/chrome_android_impl.cc
deleted file mode 100644
index 4c9ea6f3f04d254fdeeba9d407567db7529361ac..0000000000000000000000000000000000000000
--- a/chrome/test/chromedriver/chrome_android_impl.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/test/chromedriver/chrome_android_impl.h"
-
-#include "base/command_line.h"
-#include "base/files/file_path.h"
-#include "base/process_util.h"
-#include "base/string_number_conversions.h"
-#include "chrome/test/chromedriver/net/sync_websocket_impl.h"
-#include "chrome/test/chromedriver/net/url_request_context_getter.h"
-#include "chrome/test/chromedriver/status.h"
-#include "chrome/test/chromedriver/web_view.h"
-
-ChromeAndroidImpl::ChromeAndroidImpl(
- URLRequestContextGetter* context_getter,
- int port,
- const SyncWebSocketFactory& socket_factory)
- : ChromeImpl(context_getter, port, socket_factory) {}
-
-ChromeAndroidImpl::~ChromeAndroidImpl() {}
-
-Status ChromeAndroidImpl::Launch(const std::string& package_name) {
- // TODO(frankf): Figure out how this should be installed to
- // make this work for all platforms.
- base::FilePath adb_commands(FILE_PATH_LITERAL("adb_commands.py"));
- CommandLine command(adb_commands);
- command.AppendSwitchASCII("package", package_name);
- command.AppendSwitch("launch");
- command.AppendSwitchASCII("port", base::IntToString(GetPort()));
-
- std::string output;
- if (!base::GetAppOutput(command, &output)) {
- if (output.empty())
- return Status(
- kUnknownError,
- "failed to run adb_commands.py. Make sure it is set in PATH.");
- else
- return Status(kUnknownError, "android app failed to start.\n" + output);
- }
-
- Status status = Init();
- if (status.IsError()) {
- Quit();
- return status;
- }
- std::list<WebView*> web_views;
- status = GetWebViews(&web_views);
- if (status.IsError() || web_views.empty()) {
- Quit();
- return status.IsError() ? status :
- Status(kUnknownError, "unable to discover open window in chrome");
- }
-
- return Status(kOk);
-}
-
-std::string ChromeAndroidImpl::GetOperatingSystemName() {
- return "ANDROID";
-}
-
-Status ChromeAndroidImpl::Quit() {
- // NOOP.
- return Status(kOk);
-}
-
« no previous file with comments | « chrome/test/chromedriver/chrome_android_impl.h ('k') | chrome/test/chromedriver/chrome_desktop_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698