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

Side by Side Diff: ash/wm/window_modality_controller_unittest.cc

Issue 2335963002: Refactor: remove SetDisplayWorkAreaInsets calls. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/wm/core/window_modality_controller.h" 5 #include "ui/wm/core/window_modality_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ash/test/child_modal_window.h" 9 #include "ash/test/child_modal_window.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 EXPECT_FALSE(view->got_capture_lost()); 315 EXPECT_FALSE(view->got_capture_lost());
316 EXPECT_FALSE(view->got_press()); 316 EXPECT_FALSE(view->got_press());
317 } 317 }
318 318
319 // Test that when a child modal window becomes visible, we only release the 319 // Test that when a child modal window becomes visible, we only release the
320 // capture window if the current capture window is in the hierarchy of the child 320 // capture window if the current capture window is in the hierarchy of the child
321 // modal window's modal parent window. 321 // modal window's modal parent window.
322 TEST_F(WindowModalityControllerTest, ReleaseCapture) { 322 TEST_F(WindowModalityControllerTest, ReleaseCapture) {
323 // Create a window hierachy like this: 323 // Create a window hierachy like this:
324 // w0 324 // w0
325 // / | \ 325 // / | \
326 // w1 <------ w3 w2 326 // w1 <------ w3 w2
327 // | (modal to) 327 // | (modal to)
328 // w11 328 // w11
329 329
330 aura::test::TestWindowDelegate d; 330 aura::test::TestWindowDelegate d;
331 std::unique_ptr<aura::Window> w1( 331 std::unique_ptr<aura::Window> w1(
332 CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect())); 332 CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
333 std::unique_ptr<aura::Window> w11( 333 std::unique_ptr<aura::Window> w11(
334 aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get())); 334 aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get()));
335 std::unique_ptr<aura::Window> w2( 335 std::unique_ptr<aura::Window> w2(
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 EXPECT_TRUE(wm::IsActiveWindow(w4.get())); 642 EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
643 643
644 wm::ActivateWindow(w3.get()); 644 wm::ActivateWindow(w3.get());
645 EXPECT_TRUE(wm::IsActiveWindow(w4.get())); 645 EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
646 646
647 wm::ActivateWindow(w4.get()); 647 wm::ActivateWindow(w4.get());
648 EXPECT_TRUE(wm::IsActiveWindow(w4.get())); 648 EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
649 } 649 }
650 650
651 } // namespace ash 651 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc ('k') | components/exo/wayland/server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698