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

Unified Diff: chrome/test/ui/ui_test.cc

Issue 3404001: Revert 57897 - GTTF: Retry launching the browser a few times in UITest.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/ui/ui_test.cc
===================================================================
--- chrome/test/ui/ui_test.cc (revision 59313)
+++ chrome/test/ui/ui_test.cc (working copy)
@@ -195,43 +195,14 @@
server_.reset(CreateAutomationProxy(
TestTimeouts::command_execution_timeout_ms()));
- const int kTries = 3;
- for (int i = 0; i < kTries; i++) {
- if (i > 0) {
- LOG(ERROR) << "Launching browser again, retry #" << i;
- }
+ LaunchBrowser(launch_arguments_, clear_profile_);
+ server_->WaitForAppLaunch();
+ if (wait_for_initial_loads_)
+ ASSERT_TRUE(server_->WaitForInitialLoads());
+ else
+ PlatformThread::Sleep(sleep_timeout_ms());
- LaunchBrowser(launch_arguments_, clear_profile_);
- AutomationLaunchResult launch_result = server_->WaitForAppLaunch();
- if (launch_result == AUTOMATION_SUCCESS) {
- bool initial_loads_result = false;
- if (wait_for_initial_loads_) {
- initial_loads_result = server_->WaitForInitialLoads();
- } else {
- PlatformThread::Sleep(sleep_timeout_ms());
- initial_loads_result = true;
- }
-
- if (initial_loads_result) {
- if (automation()->SetFilteredInet(ShouldFilterInet())) {
- return;
- } else {
- LOG(ERROR) << "SetFilteredInet failed";
- }
- } else {
- LOG(ERROR) << "WaitForInitialLoadsFailed";
- }
- } else {
- LOG(ERROR) << "WaitForAppLaunch failed: " << launch_result;
- }
-
- // The browser is likely hosed or already down at this point. Do not wait
- // for it, just kill anything that is still running, preparing a clean
- // environment for the next retry.
- CleanupAppProcesses();
- }
-
- FAIL() << "Failed to launch browser";
+ EXPECT_TRUE(automation()->SetFilteredInet(ShouldFilterInet()));
}
void UITestBase::CloseBrowserAndServer() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698