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

Unified Diff: ash/wm/window_modality_controller_unittest.cc

Issue 252673002: Fixed screen capture confirmation dialog to be either system or browser window modal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android build fix Created 6 years, 8 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/media/media_capture_devices_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_modality_controller_unittest.cc
diff --git a/ash/wm/window_modality_controller_unittest.cc b/ash/wm/window_modality_controller_unittest.cc
index 910b3692ab7b7564ef54c78d1c69893b2d2ace47..ce70432f74c41d916c2d924d5d6b0d6330909308 100644
--- a/ash/wm/window_modality_controller_unittest.cc
+++ b/ash/wm/window_modality_controller_unittest.cc
@@ -206,6 +206,30 @@ TEST_F(WindowModalityControllerTest, Events) {
}
}
+// Events on modal parent activate.
+TEST_F(WindowModalityControllerTest, EventsForEclipsedWindows) {
+ aura::test::TestWindowDelegate d;
+ scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(&d, -1,
+ gfx::Rect(0, 0, 100, 100)));
+ scoped_ptr<aura::Window> w11(CreateTestWindowInShellWithDelegate(&d, -11,
+ gfx::Rect(20, 20, 50, 50)));
+ ::wm::AddTransientChild(w1.get(), w11.get());
+ scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegate(&d, -2,
+ gfx::Rect(0, 0, 50, 50)));
+
+ w11->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
+
+ // Partially eclipse w1 with w2.
+ wm::ActivateWindow(w2.get());
+ {
+ // Clicking a point on w1 that is not eclipsed by w2.
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point(90, 90));
+ generator.ClickLeftButton();
+ EXPECT_TRUE(wm::IsActiveWindow(w11.get()));
+ }
+}
+
// Creates windows w1 and non activatiable child w11. Creates transient window
// w2 and adds it as a transeint child of w1. Ensures that w2 is parented to
// the parent of w1, and that GetModalTransient(w11) returns w2.
« no previous file with comments | « no previous file | chrome/browser/media/media_capture_devices_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698