Chromium Code Reviews| 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" | 9 #include "ash/aura/wm_window_aura.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 777 ->GetPrimaryRootWindowController() | 777 ->GetPrimaryRootWindowController() |
| 778 ->GetSystemModalLayoutManager(WmWindowAura::Get(modal_window.get())); | 778 ->GetSystemModalLayoutManager(WmWindowAura::Get(modal_window.get())); |
| 779 | 779 |
| 780 EXPECT_FALSE(WmShell::Get()->IsSystemModalWindowOpen()); | 780 EXPECT_FALSE(WmShell::Get()->IsSystemModalWindowOpen()); |
| 781 EXPECT_FALSE(layout_manager->has_window_dimmer()); | 781 EXPECT_FALSE(layout_manager->has_window_dimmer()); |
| 782 | 782 |
| 783 modal_window->Show(); | 783 modal_window->Show(); |
| 784 EXPECT_TRUE(WmShell::Get()->IsSystemModalWindowOpen()); | 784 EXPECT_TRUE(WmShell::Get()->IsSystemModalWindowOpen()); |
| 785 EXPECT_TRUE(layout_manager->has_window_dimmer()); | 785 EXPECT_TRUE(layout_manager->has_window_dimmer()); |
| 786 | 786 |
| 787 // Make sure that a child visibility change should not cause | |
| 788 // inconsistent state. | |
| 789 std::unique_ptr<aura::Window> child(new aura::Window(nullptr)); | |
|
sky
2016/09/27 22:10:57
MakeUnique rather than new.
oshima
2016/09/28 14:26:00
Done.
| |
| 790 child->SetType(ui::wm::WINDOW_TYPE_CONTROL); | |
| 791 child->Init(ui::LAYER_TEXTURED); | |
| 792 modal_window->AddChild(child.get()); | |
| 793 child->Show(); | |
| 794 EXPECT_TRUE(WmShell::Get()->IsSystemModalWindowOpen()); | |
| 795 EXPECT_TRUE(layout_manager->has_window_dimmer()); | |
| 796 | |
| 787 modal_window->Hide(); | 797 modal_window->Hide(); |
| 788 EXPECT_FALSE(WmShell::Get()->IsSystemModalWindowOpen()); | 798 EXPECT_FALSE(WmShell::Get()->IsSystemModalWindowOpen()); |
| 789 EXPECT_FALSE(layout_manager->has_window_dimmer()); | 799 EXPECT_FALSE(layout_manager->has_window_dimmer()); |
| 790 | 800 |
| 791 modal_window->Show(); | 801 modal_window->Show(); |
| 792 EXPECT_TRUE(WmShell::Get()->IsSystemModalWindowOpen()); | 802 EXPECT_TRUE(WmShell::Get()->IsSystemModalWindowOpen()); |
| 793 EXPECT_TRUE(layout_manager->has_window_dimmer()); | 803 EXPECT_TRUE(layout_manager->has_window_dimmer()); |
| 794 } | 804 } |
| 795 | 805 |
| 796 namespace { | 806 namespace { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 887 if (!SupportsMultipleDisplays()) | 897 if (!SupportsMultipleDisplays()) |
| 888 return; | 898 return; |
| 889 | 899 |
| 890 UpdateDisplay("500x500, 500x500"); | 900 UpdateDisplay("500x500, 500x500"); |
| 891 InputTestDelegate delegate; | 901 InputTestDelegate delegate; |
| 892 delegate.RunTest(this); | 902 delegate.RunTest(this); |
| 893 } | 903 } |
| 894 | 904 |
| 895 } // namespace test | 905 } // namespace test |
| 896 } // namespace ash | 906 } // namespace ash |
| OLD | NEW |