summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_uitest.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-03 00:43:21 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-03 00:43:21 +0000
commitf28fbdb03c984d8d7edee21b7a4bae5a700669e2 (patch)
treedfdc8cc91c717aa1c109ad116329df4b739d17cb /chrome/browser/browser_uitest.cc
parent92de983bc3f9a3b8fea69bfac907533a69dc4e97 (diff)
downloadchromium_src-f28fbdb03c984d8d7edee21b7a4bae5a700669e2.zip
chromium_src-f28fbdb03c984d8d7edee21b7a4bae5a700669e2.tar.gz
chromium_src-f28fbdb03c984d8d7edee21b7a4bae5a700669e2.tar.bz2
Fix showModalDialog regression.
BUG=4202 TEST=added regression test. Review URL: http://codereview.chromium.org/149143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_uitest.cc')
-rw-r--r--chrome/browser/browser_uitest.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc
index e2533c7..108273e 100644
--- a/chrome/browser/browser_uitest.cc
+++ b/chrome/browser/browser_uitest.cc
@@ -9,6 +9,7 @@
#include "base/sys_info.h"
#include "base/values.h"
#include "chrome/app/chrome_dll_resource.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/platform_util.h"
#include "chrome/common/pref_names.h"
@@ -324,4 +325,28 @@ TEST_F(VisibleBrowserTest, WindowOpenClose) {
}
#endif
+#if defined(OS_WIN) // only works on Windows for now: http:://crbug.com/15891
+class ShowModalDialogTest : public UITest {
+ public:
+ ShowModalDialogTest() {
+ launch_arguments_.AppendSwitch(switches::kDisablePopupBlocking);
+ }
+};
+
+TEST_F(ShowModalDialogTest, BasicTest) {
+ FilePath test_file(test_data_directory_);
+ test_file = test_file.AppendASCII("showmodaldialog.html");
+ NavigateToURL(net::FilePathToFileURL(test_file));
+
+ ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2, action_timeout_ms()));
+
+ scoped_refptr<BrowserProxy> browser = automation()->GetBrowserWindow(1);
+ scoped_refptr<TabProxy> tab = browser->GetActiveTab();
+
+ std::wstring title;
+ ASSERT_TRUE(tab->GetTabTitle(&title));
+ ASSERT_EQ(title, L"ModalDialogTitle");
+}
+#endif
+
} // namespace