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

Unified Diff: chrome/browser/ui/browser_focus_uitest.cc

Issue 1233913009: Make File-Picker modal on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a test case Created 5 years, 5 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/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_focus_uitest.cc
diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc
index b063b87455af01a1b0c7c5077fe187d8042036b7..b5d9aad247fc159574eb309a1d7d22019168ae6e 100644
--- a/chrome/browser/ui/browser_focus_uitest.cc
+++ b/chrome/browser/ui/browser_focus_uitest.cc
@@ -237,6 +237,29 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_BrowsersRememberFocus) {
ASSERT_TRUE(IsViewFocused(VIEW_ID_OMNIBOX));
}
+// This test is only for Linux Desktop.
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA)
+#define MAYBE_BrowserDialogModalTest BrowserDialogModalTest
+#else
+#define MAYBE_BrowserDialogModalTest DISABLE_BrowserDialogModalTest
+#endif
+IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_BrowserDialogModalTest) {
+ ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
+ const GURL url = embedded_test_server()->GetURL(kSimplePage);
+ ui_test_utils::NavigateToURL(browser(), url);
+
+ browser()->OpenFile();
+ base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100));
sadrul 2015/08/20 06:24:20 Is this necessary here because you want to wait un
joone 2015/08/20 16:53:58 Ok, I will find another way of doing this.
+ ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(gfx::Point(100, 100)));
+ ASSERT_TRUE(ui_test_utils::SendMouseEventsSync(
+ ui_controls::LEFT, ui_controls::DOWN));
sadrul 2015/08/20 06:24:20 You want to make sure the cursor is located within
joone 2015/08/20 16:53:58 Yes, right.
+ // Create and show a test interstitial page.
+ // This page should not get focus due to modal dialog.
+ TestInterstitialPage* interstitial_page = new TestInterstitialPage(
+ browser()->tab_strip_model()->GetActiveWebContents());
sadrul 2015/08/20 06:24:20 Why do you need to open the interstitial page here
joone 2015/08/20 16:53:58 The interstitial page could only lose focus when f
+ EXPECT_FALSE(interstitial_page->HasFocus());
+}
+
// Tabs remember focus.
// Disabled, http://crbug.com/62542.
IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_TabsRememberFocus) {
« no previous file with comments | « no previous file | chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698