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

Unified Diff: ash/system/overview/overview_button_tray_unittest.cc

Issue 212553005: Overview Tray Button should not be visible on login screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/overview/overview_button_tray.cc ('k') | ash/system/status_area_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ash/system/overview/overview_button_tray.cc ('k') | ash/system/status_area_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698