| Index: ash/system/overview/overview_button_tray_unittest.cc
|
| diff --git a/ash/system/overview/overview_button_tray_unittest.cc b/ash/system/overview/overview_button_tray_unittest.cc
|
| index 201fd1dd5bd6ecb354264ee2eb5eeb7667a3c28a..b0cc6d001ee4a28d511420a5cfe2ec2d0c1d7b2a 100644
|
| --- a/ash/system/overview/overview_button_tray_unittest.cc
|
| +++ b/ash/system/overview/overview_button_tray_unittest.cc
|
| @@ -10,6 +10,7 @@
|
| #include "ash/shelf/shelf_widget.h"
|
| #include "ash/shell.h"
|
| #include "ash/system/status_area_widget.h"
|
| +#include "ash/system/user/login_status.h"
|
| #include "ash/test/ash_test_base.h"
|
| #include "ash/wm/overview/window_selector_controller.h"
|
| #include "base/time/time.h"
|
| @@ -118,4 +119,18 @@ TEST_F(OverviewButtonTrayTest, SecondaryTrayCreatedVisible) {
|
| Shell::GetInstance()->EnableMaximizeModeWindowManager(false);
|
| }
|
|
|
| +// Tests that the tray loses visibility when a user logs out, and that it
|
| +// regains visibility when a user logs back in.
|
| +TEST_F(OverviewButtonTrayTest, VisibilityChangesForLoginStatus) {
|
| + Shell::GetInstance()->EnableMaximizeModeWindowManager(true);
|
| + SetUserLoggedIn(false);
|
| + Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_NONE);
|
| + EXPECT_FALSE(GetTray()->visible());
|
| + SetUserLoggedIn(true);
|
| + SetSessionStarted(true);
|
| + Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_USER);
|
| + EXPECT_TRUE(GetTray()->visible());
|
| + Shell::GetInstance()->EnableMaximizeModeWindowManager(false);
|
| +}
|
| +
|
| } // namespace ash
|
|
|