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

Unified Diff: chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc

Issue 1594973009: Revert of Make File-Picker modal on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge-fix Created 4 years, 11 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
Index: chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc
diff --git a/chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc b/chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc
index c730d33409b33793ace689550d1a58a789a5575d..80fdb05ae6868954cedd2424d1cfaf108dc0b049 100644
--- a/chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc
+++ b/chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc
@@ -101,47 +101,3 @@ class FilePicker : public ui::SelectFileDialog::Listener {
};
} // namespace libgtk2ui
-
-// Test that the file-picker is modal.
-IN_PROC_BROWSER_TEST_F(BrowserSelectFileDialogTest, ModalTest) {
- // Bring the native window to the foreground. Returns true on success.
- ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
- ASSERT_TRUE(browser()->window()->IsActive());
-
- // Leaks in GtkFileChooserDialog. http://crbug.com/537468
- ANNOTATE_SCOPED_MEMORY_LEAK;
- libgtk2ui::FilePicker file_picker(browser()->window());
-
- gfx::NativeWindow window = browser()->window()->GetNativeWindow();
- views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window);
- ASSERT_NE(nullptr, widget);
-
- // Run a nested loop until the browser window becomes inactive
- // so that the file-picker can be active.
- WidgetActivationWaiter waiter_inactive(widget, false);
- waiter_inactive.Wait();
- EXPECT_FALSE(browser()->window()->IsActive());
-
- ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER);
- // The window should not get focus due to modal dialog.
- EXPECT_FALSE(browser()->window()->IsActive());
-
- ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
- EXPECT_FALSE(browser()->window()->IsActive());
-
- ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow(window));
- EXPECT_FALSE(browser()->window()->IsActive());
-
- ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), ui::VKEY_TAB, false, false, true, false));
- EXPECT_FALSE(browser()->window()->IsActive());
-
- file_picker.Close();
-
- // Run a nested loop until the browser window becomes active.
- WidgetActivationWaiter wait_active(widget, true);
- wait_active.Wait();
-
- ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER);
- EXPECT_TRUE(browser()->window()->IsActive());
-}

Powered by Google App Engine
This is Rietveld 408576698