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

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

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 years, 7 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
« no previous file with comments | « ash/wm/overview/window_selector.cc ('k') | ash/wm/window_animations.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/wm/system_modal_container_layout_manager.h" 5 #include "ash/wm/system_modal_container_layout_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "ash/public/cpp/config.h" 9 #include "ash/public/cpp/config.h"
10 #include "ash/public/cpp/shell_window_ids.h" 10 #include "ash/public/cpp/shell_window_ids.h"
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 EXPECT_FALSE(ShellPort::Get()->IsSystemModalWindowOpen()); 794 EXPECT_FALSE(ShellPort::Get()->IsSystemModalWindowOpen());
795 } 795 }
796 796
797 TEST_F(SystemModalContainerLayoutManagerTest, VisibilityChange) { 797 TEST_F(SystemModalContainerLayoutManagerTest, VisibilityChange) {
798 std::unique_ptr<aura::Window> window(OpenToplevelTestWindow(false)); 798 std::unique_ptr<aura::Window> window(OpenToplevelTestWindow(false));
799 std::unique_ptr<aura::Window> modal_window( 799 std::unique_ptr<aura::Window> modal_window(
800 views::Widget::CreateWindowWithContext(new TestWindow(true), 800 views::Widget::CreateWindowWithContext(new TestWindow(true),
801 CurrentContext()) 801 CurrentContext())
802 ->GetNativeWindow()); 802 ->GetNativeWindow());
803 SystemModalContainerLayoutManager* layout_manager = 803 SystemModalContainerLayoutManager* layout_manager =
804 ShellPort::Get() 804 Shell::GetPrimaryRootWindowController()->GetSystemModalLayoutManager(
805 ->GetPrimaryRootWindowController() 805 modal_window.get());
806 ->GetSystemModalLayoutManager(modal_window.get());
807 806
808 EXPECT_FALSE(ShellPort::Get()->IsSystemModalWindowOpen()); 807 EXPECT_FALSE(ShellPort::Get()->IsSystemModalWindowOpen());
809 EXPECT_FALSE(layout_manager->has_window_dimmer()); 808 EXPECT_FALSE(layout_manager->has_window_dimmer());
810 809
811 modal_window->Show(); 810 modal_window->Show();
812 EXPECT_TRUE(ShellPort::Get()->IsSystemModalWindowOpen()); 811 EXPECT_TRUE(ShellPort::Get()->IsSystemModalWindowOpen());
813 EXPECT_TRUE(layout_manager->has_window_dimmer()); 812 EXPECT_TRUE(layout_manager->has_window_dimmer());
814 813
815 // Make sure that a child visibility change should not cause 814 // Make sure that a child visibility change should not cause
816 // inconsistent state. 815 // inconsistent state.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 921
923 // Make sure that events are properly blocked in multi displays environment. 922 // Make sure that events are properly blocked in multi displays environment.
924 TEST_F(SystemModalContainerLayoutManagerTest, BlockEventsInMultiDisplays) { 923 TEST_F(SystemModalContainerLayoutManagerTest, BlockEventsInMultiDisplays) {
925 UpdateDisplay("500x500, 500x500"); 924 UpdateDisplay("500x500, 500x500");
926 InputTestDelegate delegate; 925 InputTestDelegate delegate;
927 delegate.RunTest(this); 926 delegate.RunTest(this);
928 } 927 }
929 928
930 } // namespace test 929 } // namespace test
931 } // namespace ash 930 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector.cc ('k') | ash/wm/window_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698