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/automation/automation_proxy_uitest.cc | |
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/automation/automation_proxy_uitest.cc')
-rw-r--r-- | chrome/test/automation/automation_proxy_uitest.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index 1445061..d2d6ac7 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -487,17 +487,14 @@ TEST_F(AutomationProxyTest, NavigateToURLAsync) { TEST_F(AutomationProxyTest, AcceleratorNewTab) { scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); - int old_tab_count = -1; - ASSERT_TRUE(window->GetTabCount(&old_tab_count)); + int tab_count = -1; + ASSERT_TRUE(window->GetTabCount(&tab_count)); ASSERT_TRUE(window->ApplyAccelerator(IDC_NEW_TAB)); - int new_tab_count; - ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count, &new_tab_count, - 5000)); - if (new_tab_count == -1) - FAIL(); - ASSERT_EQ(old_tab_count + 1, new_tab_count); - scoped_ptr<TabProxy> tab(window->GetTab(new_tab_count - 1)); + ASSERT_TRUE(window->WaitForTabCountToBecome(tab_count + 1, + action_timeout_ms())); + ASSERT_TRUE(window->GetTabCount(&tab_count)); + scoped_ptr<TabProxy> tab(window->GetTab(tab_count - 1)); ASSERT_TRUE(tab.get()); std::wstring title; |