| OLD | NEW |
| 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 "ash/common/wm/system_modal_container_layout_manager.h" | 5 #include "ash/common/wm/system_modal_container_layout_manager.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "ash/aura/wm_window_aura.h" | |
| 10 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
| 11 #include "ash/common/wm/container_finder.h" | 10 #include "ash/common/wm/container_finder.h" |
| 12 #include "ash/common/wm_shell.h" | 11 #include "ash/common/wm_shell.h" |
| 12 #include "ash/common/wm_window.h" |
| 13 #include "ash/public/cpp/shell_window_ids.h" | 13 #include "ash/public/cpp/shell_window_ids.h" |
| 14 #include "ash/root_window_controller.h" | 14 #include "ash/root_window_controller.h" |
| 15 #include "ash/shell.h" | 15 #include "ash/shell.h" |
| 16 #include "ash/test/ash_test_base.h" | 16 #include "ash/test/ash_test_base.h" |
| 17 #include "ash/wm/window_util.h" | 17 #include "ash/wm/window_util.h" |
| 18 #include "base/command_line.h" | 18 #include "base/command_line.h" |
| 19 #include "base/compiler_specific.h" | 19 #include "base/compiler_specific.h" |
| 20 #include "base/memory/ptr_util.h" | 20 #include "base/memory/ptr_util.h" |
| 21 #include "base/run_loop.h" | 21 #include "base/run_loop.h" |
| 22 #include "ui/aura/client/aura_constants.h" | 22 #include "ui/aura/client/aura_constants.h" |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 | 767 |
| 768 TEST_F(SystemModalContainerLayoutManagerTest, VisibilityChange) { | 768 TEST_F(SystemModalContainerLayoutManagerTest, VisibilityChange) { |
| 769 std::unique_ptr<aura::Window> window(OpenToplevelTestWindow(false)); | 769 std::unique_ptr<aura::Window> window(OpenToplevelTestWindow(false)); |
| 770 std::unique_ptr<aura::Window> modal_window( | 770 std::unique_ptr<aura::Window> modal_window( |
| 771 views::Widget::CreateWindowWithContext(new TestWindow(true), | 771 views::Widget::CreateWindowWithContext(new TestWindow(true), |
| 772 CurrentContext()) | 772 CurrentContext()) |
| 773 ->GetNativeWindow()); | 773 ->GetNativeWindow()); |
| 774 SystemModalContainerLayoutManager* layout_manager = | 774 SystemModalContainerLayoutManager* layout_manager = |
| 775 WmShell::Get() | 775 WmShell::Get() |
| 776 ->GetPrimaryRootWindowController() | 776 ->GetPrimaryRootWindowController() |
| 777 ->GetSystemModalLayoutManager(WmWindowAura::Get(modal_window.get())); | 777 ->GetSystemModalLayoutManager(WmWindow::Get(modal_window.get())); |
| 778 | 778 |
| 779 EXPECT_FALSE(WmShell::Get()->IsSystemModalWindowOpen()); | 779 EXPECT_FALSE(WmShell::Get()->IsSystemModalWindowOpen()); |
| 780 EXPECT_FALSE(layout_manager->has_window_dimmer()); | 780 EXPECT_FALSE(layout_manager->has_window_dimmer()); |
| 781 | 781 |
| 782 modal_window->Show(); | 782 modal_window->Show(); |
| 783 EXPECT_TRUE(WmShell::Get()->IsSystemModalWindowOpen()); | 783 EXPECT_TRUE(WmShell::Get()->IsSystemModalWindowOpen()); |
| 784 EXPECT_TRUE(layout_manager->has_window_dimmer()); | 784 EXPECT_TRUE(layout_manager->has_window_dimmer()); |
| 785 | 785 |
| 786 // Make sure that a child visibility change should not cause | 786 // Make sure that a child visibility change should not cause |
| 787 // inconsistent state. | 787 // inconsistent state. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 if (!SupportsMultipleDisplays()) | 896 if (!SupportsMultipleDisplays()) |
| 897 return; | 897 return; |
| 898 | 898 |
| 899 UpdateDisplay("500x500, 500x500"); | 899 UpdateDisplay("500x500, 500x500"); |
| 900 InputTestDelegate delegate; | 900 InputTestDelegate delegate; |
| 901 delegate.RunTest(this); | 901 delegate.RunTest(this); |
| 902 } | 902 } |
| 903 | 903 |
| 904 } // namespace test | 904 } // namespace test |
| 905 } // namespace ash | 905 } // namespace ash |
| OLD | NEW |