summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation/automation_proxy_uitest.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-12 18:33:04 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-12 18:33:04 +0000
commitcbc0e1b7a534df83db009edef7843d029f307ff9 (patch)
tree59fe48f01f4158055b2e0eab25b642038408c04d /chrome/test/automation/automation_proxy_uitest.cc
parent83210f3fd6ced20b8af9e87f9faf7349a791b3e7 (diff)
downloadchromium_src-cbc0e1b7a534df83db009edef7843d029f307ff9.zip
chromium_src-cbc0e1b7a534df83db009edef7843d029f307ff9.tar.gz
chromium_src-cbc0e1b7a534df83db009edef7843d029f307ff9.tar.bz2
[GTTF] Make automation calls for Downloads, Extensions, and History pages
reliable. This way we'll be able to write good pyauto tests for them. TEST=ui_tests BUG=none Review URL: http://codereview.chromium.org/1562021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44264 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation/automation_proxy_uitest.cc')
-rw-r--r--chrome/test/automation/automation_proxy_uitest.cc31
1 files changed, 31 insertions, 0 deletions
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc
index b3dce0f..9850d1f 100644
--- a/chrome/test/automation/automation_proxy_uitest.cc
+++ b/chrome/test/automation/automation_proxy_uitest.cc
@@ -435,6 +435,7 @@ TEST_F(AutomationProxyTest, NavigateToURLAsync) {
TEST_F(AutomationProxyTest, AcceleratorNewTab) {
scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
+ ASSERT_TRUE(window.get());
int tab_count = -1;
ASSERT_TRUE(window->RunCommand(IDC_NEW_TAB));
@@ -445,6 +446,36 @@ TEST_F(AutomationProxyTest, AcceleratorNewTab) {
ASSERT_TRUE(tab.get());
}
+TEST_F(AutomationProxyTest, AcceleratorDownloads) {
+ scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
+ ASSERT_TRUE(window.get());
+
+ ASSERT_TRUE(window->RunCommand(IDC_SHOW_DOWNLOADS));
+
+ // We expect the RunCommand above to wait until the title is updated.
+ EXPECT_EQ(L"Downloads", GetActiveTabTitle());
+}
+
+TEST_F(AutomationProxyTest, AcceleratorExtensions) {
+ scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
+ ASSERT_TRUE(window.get());
+
+ ASSERT_TRUE(window->RunCommand(IDC_MANAGE_EXTENSIONS));
+
+ // We expect the RunCommand above to wait until the title is updated.
+ EXPECT_EQ(L"Extensions", GetActiveTabTitle());
+}
+
+TEST_F(AutomationProxyTest, AcceleratorHistory) {
+ scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
+ ASSERT_TRUE(window.get());
+
+ ASSERT_TRUE(window->RunCommand(IDC_SHOW_HISTORY));
+
+ // We expect the RunCommand above to wait until the title is updated.
+ EXPECT_EQ(L"History", GetActiveTabTitle());
+}
+
class AutomationProxyTest4 : public UITest {
protected:
AutomationProxyTest4() : UITest() {