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

Side by Side Diff: ash/system/overview/overview_button_tray_unittest.cc

Issue 2041233005: Moves ash::user::LoginStatus to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 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/system/overview/overview_button_tray.cc ('k') | ash/system/status_area_widget.h » ('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 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/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/common/shelf/shelf_types.h" 8 #include "ash/common/shelf/shelf_types.h"
9 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 Shell::GetInstance()->maximize_mode_controller()-> 174 Shell::GetInstance()->maximize_mode_controller()->
175 EnableMaximizeModeWindowManager(false); 175 EnableMaximizeModeWindowManager(false);
176 } 176 }
177 177
178 // Tests that the tray loses visibility when a user logs out, and that it 178 // Tests that the tray loses visibility when a user logs out, and that it
179 // regains visibility when a user logs back in. 179 // regains visibility when a user logs back in.
180 TEST_F(OverviewButtonTrayTest, VisibilityChangesForLoginStatus) { 180 TEST_F(OverviewButtonTrayTest, VisibilityChangesForLoginStatus) {
181 Shell::GetInstance()->maximize_mode_controller()-> 181 Shell::GetInstance()->maximize_mode_controller()->
182 EnableMaximizeModeWindowManager(true); 182 EnableMaximizeModeWindowManager(true);
183 SetUserLoggedIn(false); 183 SetUserLoggedIn(false);
184 Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_NONE); 184 Shell::GetInstance()->UpdateAfterLoginStatusChange(
185 LoginStatus::NOT_LOGGED_IN);
185 EXPECT_FALSE(GetTray()->visible()); 186 EXPECT_FALSE(GetTray()->visible());
186 SetUserLoggedIn(true); 187 SetUserLoggedIn(true);
187 SetSessionStarted(true); 188 SetSessionStarted(true);
188 Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_USER); 189 Shell::GetInstance()->UpdateAfterLoginStatusChange(LoginStatus::USER);
189 EXPECT_TRUE(GetTray()->visible()); 190 EXPECT_TRUE(GetTray()->visible());
190 SetUserAddingScreenRunning(true); 191 SetUserAddingScreenRunning(true);
191 NotifySessionStateChanged(); 192 NotifySessionStateChanged();
192 EXPECT_FALSE(GetTray()->visible()); 193 EXPECT_FALSE(GetTray()->visible());
193 SetUserAddingScreenRunning(false); 194 SetUserAddingScreenRunning(false);
194 NotifySessionStateChanged(); 195 NotifySessionStateChanged();
195 EXPECT_TRUE(GetTray()->visible()); 196 EXPECT_TRUE(GetTray()->visible());
196 Shell::GetInstance()->maximize_mode_controller()-> 197 Shell::GetInstance()->maximize_mode_controller()->
197 EnableMaximizeModeWindowManager(false); 198 EnableMaximizeModeWindowManager(false);
198 } 199 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 ->maximize_mode_controller() 271 ->maximize_mode_controller()
271 ->EnableMaximizeModeWindowManager(true); 272 ->EnableMaximizeModeWindowManager(true);
272 EXPECT_TRUE(GetTray()->visible()); 273 EXPECT_TRUE(GetTray()->visible());
273 Shell::GetInstance() 274 Shell::GetInstance()
274 ->maximize_mode_controller() 275 ->maximize_mode_controller()
275 ->EnableMaximizeModeWindowManager(false); 276 ->EnableMaximizeModeWindowManager(false);
276 EXPECT_FALSE(GetTray()->visible()); 277 EXPECT_FALSE(GetTray()->visible());
277 } 278 }
278 279
279 } // namespace ash 280 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/overview/overview_button_tray.cc ('k') | ash/system/status_area_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698