summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation/automation_proxy_uitest.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-21 23:49:18 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-21 23:49:18 +0000
commit478ff2ed6a244658c0a30d6cbfff1a9046b9ba9d (patch)
treef995985b8749bd31da7cbb73ec73cfce24e97987 /chrome/test/automation/automation_proxy_uitest.cc
parent69e38eca8034fe35c22744f59bee77f987ae8755 (diff)
downloadchromium_src-478ff2ed6a244658c0a30d6cbfff1a9046b9ba9d.zip
chromium_src-478ff2ed6a244658c0a30d6cbfff1a9046b9ba9d.tar.gz
chromium_src-478ff2ed6a244658c0a30d6cbfff1a9046b9ba9d.tar.bz2
Reland r14146 which refactors DialogButton into cross platform
code. This is the same as the last change except I renamed class MessageBox to class MessageBoxFlags to avoid conflicting with the same name in windows.h. Review URL: http://codereview.chromium.org/87065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14159 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation/automation_proxy_uitest.cc')
-rw-r--r--chrome/test/automation/automation_proxy_uitest.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc
index 464fa81..0454611 100644
--- a/chrome/test/automation/automation_proxy_uitest.cc
+++ b/chrome/test/automation/automation_proxy_uitest.cc
@@ -1005,12 +1005,11 @@ TEST_F(AutomationProxyTest, DISABLED_AppModalDialogTest) {
ASSERT_TRUE(tab.get());
bool modal_dialog_showing = false;
- views::DialogDelegate::DialogButton button =
- views::DialogDelegate::DIALOGBUTTON_NONE;
+ MessageBoxFlags::DialogButton button = MessageBoxFlags::DIALOGBUTTON_NONE;
EXPECT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing,
&button));
EXPECT_FALSE(modal_dialog_showing);
- EXPECT_EQ(views::DialogDelegate::DIALOGBUTTON_NONE, button);
+ EXPECT_EQ(MessageBoxFlags::DIALOGBUTTON_NONE, button);
// Show a simple alert.
std::string content =
@@ -1022,19 +1021,19 @@ TEST_F(AutomationProxyTest, DISABLED_AppModalDialogTest) {
EXPECT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing,
&button));
EXPECT_TRUE(modal_dialog_showing);
- EXPECT_EQ(views::DialogDelegate::DIALOGBUTTON_OK, button);
+ EXPECT_EQ(MessageBoxFlags::DIALOGBUTTON_OK, button);
// Test that clicking missing button fails graciously and does not close the
// dialog.
EXPECT_FALSE(automation()->ClickAppModalDialogButton(
- views::DialogDelegate::DIALOGBUTTON_CANCEL));
+ MessageBoxFlags::DIALOGBUTTON_CANCEL));
EXPECT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing,
&button));
EXPECT_TRUE(modal_dialog_showing);
// Now click OK, that should close the dialog.
EXPECT_TRUE(automation()->ClickAppModalDialogButton(
- views::DialogDelegate::DIALOGBUTTON_OK));
+ MessageBoxFlags::DIALOGBUTTON_OK));
EXPECT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing,
&button));
EXPECT_FALSE(modal_dialog_showing);
@@ -1049,12 +1048,12 @@ TEST_F(AutomationProxyTest, DISABLED_AppModalDialogTest) {
EXPECT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing,
&button));
EXPECT_TRUE(modal_dialog_showing);
- EXPECT_EQ(views::DialogDelegate::DIALOGBUTTON_OK |
- views::DialogDelegate::DIALOGBUTTON_CANCEL, button);
+ EXPECT_EQ(MessageBoxFlags::DIALOGBUTTON_OK |
+ MessageBoxFlags::DIALOGBUTTON_CANCEL, button);
// Click OK.
EXPECT_TRUE(automation()->ClickAppModalDialogButton(
- views::DialogDelegate::DIALOGBUTTON_OK));
+ MessageBoxFlags::DIALOGBUTTON_OK));
EXPECT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing,
&button));
EXPECT_FALSE(modal_dialog_showing);
@@ -1069,12 +1068,12 @@ TEST_F(AutomationProxyTest, DISABLED_AppModalDialogTest) {
EXPECT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing,
&button));
EXPECT_TRUE(modal_dialog_showing);
- EXPECT_EQ(views::DialogDelegate::DIALOGBUTTON_OK |
- views::DialogDelegate::DIALOGBUTTON_CANCEL, button);
+ EXPECT_EQ(MessageBoxFlags::DIALOGBUTTON_OK |
+ MessageBoxFlags::DIALOGBUTTON_CANCEL, button);
// Click Cancel this time.
EXPECT_TRUE(automation()->ClickAppModalDialogButton(
- views::DialogDelegate::DIALOGBUTTON_CANCEL));
+ MessageBoxFlags::DIALOGBUTTON_CANCEL));
EXPECT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing,
&button));
EXPECT_FALSE(modal_dialog_showing);