diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-30 15:22:45 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-30 15:22:45 +0000 |
commit | 076bf500c06a2ec9ce9f5accc0eaad7c0b0b2666 (patch) | |
tree | 90c75e38f905641cda5eff21273c76e9f80b4ca5 /chrome/test/startup | |
parent | 09247ce046ae7fa18a868d7f07ad292899b3798c (diff) | |
download | chromium_src-076bf500c06a2ec9ce9f5accc0eaad7c0b0b2666.zip chromium_src-076bf500c06a2ec9ce9f5accc0eaad7c0b0b2666.tar.gz chromium_src-076bf500c06a2ec9ce9f5accc0eaad7c0b0b2666.tar.bz2 |
Cleanup in automation. Remove WaitForTabCountToChange.
WaitForTabCountToBecome is easier to use and more reliable.
Also removed Windows2000-specific code from accessibility unit tests.
Review URL: http://codereview.chromium.org/45070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12774 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/startup')
-rw-r--r-- | chrome/test/startup/feature_startup_test.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/chrome/test/startup/feature_startup_test.cc b/chrome/test/startup/feature_startup_test.cc index 770ceb4..cca5a0b 100644 --- a/chrome/test/startup/feature_startup_test.cc +++ b/chrome/test/startup/feature_startup_test.cc @@ -64,28 +64,21 @@ class NewTabUIStartupTest : public UITest { // first (the first is about:blank). BrowserProxy* window = automation()->GetBrowserWindow(0); ASSERT_TRUE(window); - int old_tab_count = -1; - ASSERT_TRUE(window->GetTabCount(&old_tab_count)); - ASSERT_EQ(1, old_tab_count); + int tab_count = -1; + ASSERT_TRUE(window->GetTabCount(&tab_count)); + ASSERT_EQ(1, tab_count); // Hit ctl-t and wait for the tab to load. window->ApplyAccelerator(IDC_NEW_TAB); - int new_tab_count = -1; - ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count, &new_tab_count, - 5000)); - ASSERT_EQ(2, new_tab_count); + ASSERT_TRUE(window->WaitForTabCountToBecome(2, 5000)); int load_time; ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time)); timings[i] = TimeDelta::FromMilliseconds(load_time); if (want_warm) { // Bring up a second tab, now that we've already shown one tab. - old_tab_count = new_tab_count; - new_tab_count = -1; window->ApplyAccelerator(IDC_NEW_TAB); - ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count, - &new_tab_count, 5000)); - ASSERT_EQ(3, new_tab_count); + ASSERT_TRUE(window->WaitForTabCountToBecome(3, 5000)); ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time)); timings[i] = TimeDelta::FromMilliseconds(load_time); } |