diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-07 19:32:13 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-07 19:32:13 +0000 |
commit | 61855fc2c781be3419e159e959078670ec6a6483 (patch) | |
tree | 1c8c381a933f52991f70832804b67f48b910a608 /chrome/browser/tab_restore_uitest.cc | |
parent | 979466dbde52af02c5ad15fcd0528ca0d3d85b05 (diff) | |
download | chromium_src-61855fc2c781be3419e159e959078670ec6a6483.zip chromium_src-61855fc2c781be3419e159e959078670ec6a6483.tar.gz chromium_src-61855fc2c781be3419e159e959078670ec6a6483.tar.bz2 |
GTTF: Make WaitForTabCountToBecome automation call not Sleep.
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_restore_uitest.cc')
-rw-r--r-- | chrome/browser/tab_restore_uitest.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/chrome/browser/tab_restore_uitest.cc b/chrome/browser/tab_restore_uitest.cc index fcd73fb..4e48d5a 100644 --- a/chrome/browser/tab_restore_uitest.cc +++ b/chrome/browser/tab_restore_uitest.cc @@ -568,14 +568,12 @@ 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, - action_max_timeout_ms())); + ASSERT_TRUE(browser_proxy->WaitForTabCountToBecome(initial_tab_count + 1)); 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, - action_max_timeout_ms())); + ASSERT_TRUE(browser_proxy->WaitForTabCountToBecome(initial_tab_count + 2)); new_tab = browser_proxy->GetTab(initial_tab_count + 1); ASSERT_TRUE(new_tab.get()); ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, new_tab->NavigateToURL(url2_)); |