summaryrefslogtreecommitdiffstats
path: root/chrome/test/tab_switching
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-07 19:32:13 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-07 19:32:13 +0000
commit61855fc2c781be3419e159e959078670ec6a6483 (patch)
tree1c8c381a933f52991f70832804b67f48b910a608 /chrome/test/tab_switching
parent979466dbde52af02c5ad15fcd0528ca0d3d85b05 (diff)
downloadchromium_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/test/tab_switching')
-rw-r--r--chrome/test/tab_switching/tab_switching_test.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/test/tab_switching/tab_switching_test.cc b/chrome/test/tab_switching/tab_switching_test.cc
index ba72e7e..62eb88c 100644
--- a/chrome/test/tab_switching/tab_switching_test.cc
+++ b/chrome/test/tab_switching/tab_switching_test.cc
@@ -86,8 +86,9 @@ class TabSwitchingUITest : public UIPerfTest {
int initial_tab_count = 0;
ASSERT_TRUE(browser_proxy_->GetTabCount(&initial_tab_count));
int new_tab_count = OpenTabs();
- ASSERT_TRUE(browser_proxy_->WaitForTabCountToBecome(
- initial_tab_count + new_tab_count, 10000));
+ int tab_count = -1;
+ ASSERT_TRUE(browser_proxy_->GetTabCount(&tab_count));
+ ASSERT_EQ(initial_tab_count + new_tab_count, tab_count);
// Switch linearly between tabs.
ASSERT_TRUE(browser_proxy_->ActivateTab(0));