OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/system/overview/overview_button_tray.h" | 5 #include "ash/system/overview/overview_button_tray.h" |
6 | 6 |
7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/shelf/shelf_types.h" | 9 #include "ash/shelf/shelf_types.h" |
10 #include "ash/shelf/shelf_widget.h" | 10 #include "ash/shelf/shelf_widget.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 71 } |
72 | 72 |
73 // Tests that activating this control brings up window selection mode. | 73 // Tests that activating this control brings up window selection mode. |
74 TEST_F(OverviewButtonTrayTest, PerformAction) { | 74 TEST_F(OverviewButtonTrayTest, PerformAction) { |
75 ASSERT_FALSE(Shell::GetInstance()->window_selector_controller()-> | 75 ASSERT_FALSE(Shell::GetInstance()->window_selector_controller()-> |
76 IsSelecting()); | 76 IsSelecting()); |
77 | 77 |
78 // Overview Mode only works when there is a window | 78 // Overview Mode only works when there is a window |
79 scoped_ptr<aura::Window> window( | 79 scoped_ptr<aura::Window> window( |
80 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20))); | 80 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20))); |
81 ui::GestureEvent tap( | 81 ui::GestureEvent tap(0, 0, 0, base::TimeDelta(), |
82 0, 0, 0, base::TimeDelta(), ui::GestureEventDetails(ui::ET_GESTURE_TAP)); | 82 ui::GestureEventDetails(ui::ET_GESTURE_TAP, 0.0f, 0.0f)); |
83 GetTray()->PerformAction(tap); | 83 GetTray()->PerformAction(tap); |
84 EXPECT_TRUE(Shell::GetInstance()->window_selector_controller()-> | 84 EXPECT_TRUE(Shell::GetInstance()->window_selector_controller()-> |
85 IsSelecting()); | 85 IsSelecting()); |
86 } | 86 } |
87 | 87 |
88 // Tests that a second OverviewButtonTray has been created, and only shows | 88 // Tests that a second OverviewButtonTray has been created, and only shows |
89 // when MaximizeMode has been enabled, when we are using multiple displays. | 89 // when MaximizeMode has been enabled, when we are using multiple displays. |
90 // By default the DisplayManger is in extended mode. | 90 // By default the DisplayManger is in extended mode. |
91 TEST_F(OverviewButtonTrayTest, DisplaysOnBothDisplays) { | 91 TEST_F(OverviewButtonTrayTest, DisplaysOnBothDisplays) { |
92 if (!SupportsMultipleDisplays()) | 92 if (!SupportsMultipleDisplays()) |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 EXPECT_FALSE(GetTray()->visible()); | 127 EXPECT_FALSE(GetTray()->visible()); |
128 SetUserLoggedIn(true); | 128 SetUserLoggedIn(true); |
129 SetSessionStarted(true); | 129 SetSessionStarted(true); |
130 Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_USER); | 130 Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_USER); |
131 EXPECT_TRUE(GetTray()->visible()); | 131 EXPECT_TRUE(GetTray()->visible()); |
132 Shell::GetInstance()->maximize_mode_controller()-> | 132 Shell::GetInstance()->maximize_mode_controller()-> |
133 EnableMaximizeModeWindowManager(false); | 133 EnableMaximizeModeWindowManager(false); |
134 } | 134 } |
135 | 135 |
136 } // namespace ash | 136 } // namespace ash |
OLD | NEW |