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

Unified Diff: chrome/test/automation/proxy_launcher.cc

Issue 7629019: Revert 96556 - Let pyauto create an attached webdriver instance to manipulate web pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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/automation/proxy_launcher.h ('k') | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/proxy_launcher.cc
===================================================================
--- chrome/test/automation/proxy_launcher.cc (revision 96579)
+++ chrome/test/automation/proxy_launcher.cc (working copy)
@@ -519,22 +519,17 @@
return proxy;
}
-bool NamedProxyLauncher::InitializeConnection(const LaunchState& state,
+void NamedProxyLauncher::InitializeConnection(const LaunchState& state,
bool wait_for_initial_loads) {
if (launch_browser_) {
#if defined(OS_POSIX)
// Because we are waiting on the existence of the testing file below,
// make sure there isn't one already there before browser launch.
- if (!file_util::Delete(FilePath(channel_id_), false)) {
- LOG(ERROR) << "Failed to delete " << channel_id_;
- return false;
- }
+ EXPECT_TRUE(file_util::Delete(FilePath(channel_id_), false));
#endif
- if (!LaunchBrowser(state)) {
- LOG(ERROR) << "Failed to LaunchBrowser";
- return false;
- }
+ // Set up IPC testing interface as a client.
+ ASSERT_TRUE(LaunchBrowser(state));
}
// Wait for browser to be ready for connections.
@@ -547,16 +542,9 @@
break;
base::PlatformThread::Sleep(automation::kSleepTime);
}
- if (!channel_initialized) {
- LOG(ERROR) << "Failed to wait for testing channel presence.";
- return false;
- }
+ EXPECT_TRUE(channel_initialized);
- if (!ConnectToRunningBrowser(wait_for_initial_loads)) {
- LOG(ERROR) << "Failed to ConnectToRunningBrowser";
- return false;
- }
- return true;
+ ASSERT_TRUE(ConnectToRunningBrowser(wait_for_initial_loads));
}
void NamedProxyLauncher::TerminateConnection() {
@@ -587,9 +575,9 @@
return proxy;
}
-bool AnonymousProxyLauncher::InitializeConnection(const LaunchState& state,
+void AnonymousProxyLauncher::InitializeConnection(const LaunchState& state,
bool wait_for_initial_loads) {
- return LaunchBrowserAndServer(state, wait_for_initial_loads);
+ ASSERT_TRUE(LaunchBrowserAndServer(state, wait_for_initial_loads));
}
void AnonymousProxyLauncher::TerminateConnection() {
« no previous file with comments | « chrome/test/automation/proxy_launcher.h ('k') | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698