Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Unified Diff: chrome/browser/browser_uitest.cc

Issue 149143: Fix showModalDialog regression. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_uitest.cc
===================================================================
--- chrome/browser/browser_uitest.cc (revision 19779)
+++ chrome/browser/browser_uitest.cc (working copy)
@@ -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 @@
}
#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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698