summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_restore_uitest.cc
diff options
context:
space:
mode:
authorgavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-04 01:36:56 +0000
committergavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-04 01:36:56 +0000
commitae7d85482dd44ffd2061fd6dc692f4d1ef769d18 (patch)
treebdd741ff6046d9cb3e6dd9de9c9b3c16e4d98efb /chrome/browser/tab_restore_uitest.cc
parent76b33b3711aaa11fb7b51c069a61d880a88d4e7c (diff)
downloadchromium_src-ae7d85482dd44ffd2061fd6dc692f4d1ef769d18.zip
chromium_src-ae7d85482dd44ffd2061fd6dc692f4d1ef769d18.tar.gz
chromium_src-ae7d85482dd44ffd2061fd6dc692f4d1ef769d18.tar.bz2
Revert 58563 - GTTF: Make WaitForTabCountToBecome automation call not Sleep.
(unfortunately, Mac & Windows started failing tab perf tests on this change) Sleeping is an unreliable method to wait for things. Instead, we set up an observer. BUG=none TEST=none Review URL: http://codereview.chromium.org/3300011 TBR=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/3344009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58566 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_restore_uitest.cc')
-rw-r--r--chrome/browser/tab_restore_uitest.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/tab_restore_uitest.cc b/chrome/browser/tab_restore_uitest.cc
index 4e48d5a..fcd73fb 100644
--- a/chrome/browser/tab_restore_uitest.cc
+++ b/chrome/browser/tab_restore_uitest.cc
@@ -568,12 +568,14 @@ TEST_F(TabRestoreUITest, MAYBE_RestoreWindow) {
int initial_tab_count;
ASSERT_TRUE(browser_proxy->GetTabCount(&initial_tab_count));
ASSERT_TRUE(browser_proxy->AppendTab(url1_));
- ASSERT_TRUE(browser_proxy->WaitForTabCountToBecome(initial_tab_count + 1));
+ ASSERT_TRUE(browser_proxy->WaitForTabCountToBecome(initial_tab_count + 1,
+ action_max_timeout_ms()));
scoped_refptr<TabProxy> new_tab(browser_proxy->GetTab(initial_tab_count));
ASSERT_TRUE(new_tab.get());
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, new_tab->NavigateToURL(url1_));
ASSERT_TRUE(browser_proxy->AppendTab(url2_));
- ASSERT_TRUE(browser_proxy->WaitForTabCountToBecome(initial_tab_count + 2));
+ ASSERT_TRUE(browser_proxy->WaitForTabCountToBecome(initial_tab_count + 2,
+ action_max_timeout_ms()));
new_tab = browser_proxy->GetTab(initial_tab_count + 1);
ASSERT_TRUE(new_tab.get());
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, new_tab->NavigateToURL(url2_));