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

Side by Side Diff: ash/system/user/tray_user_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/user/tray_user_separator.cc ('k') | ash/system/user/user_card_view.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <vector> 5 #include <vector>
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 void TrayUserTest::ClickUserItem(ui::test::EventGenerator* generator, 118 void TrayUserTest::ClickUserItem(ui::test::EventGenerator* generator,
119 int index) { 119 int index) {
120 MoveOverUserItem(generator, index); 120 MoveOverUserItem(generator, index);
121 generator->ClickLeftButton(); 121 generator->ClickLeftButton();
122 } 122 }
123 123
124 // Make sure that we show items for all users in the tray accordingly. 124 // Make sure that we show items for all users in the tray accordingly.
125 TEST_F(TrayUserTest, CheckTrayItemSize) { 125 TEST_F(TrayUserTest, CheckTrayItemSize) {
126 InitializeParameters(1, false); 126 InitializeParameters(1, false);
127 tray_user(0)->UpdateAfterLoginStatusChangeForTest(user::LOGGED_IN_GUEST); 127 tray_user(0)->UpdateAfterLoginStatusChangeForTest(LoginStatus::GUEST);
128 gfx::Size size = tray_user(0)->GetLayoutSizeForTest(); 128 gfx::Size size = tray_user(0)->GetLayoutSizeForTest();
129 EXPECT_EQ(kTrayItemSize, size.height()); 129 EXPECT_EQ(kTrayItemSize, size.height());
130 tray_user(0)->UpdateAfterLoginStatusChangeForTest(user::LOGGED_IN_USER); 130 tray_user(0)->UpdateAfterLoginStatusChangeForTest(LoginStatus::USER);
131 size = tray_user(0)->GetLayoutSizeForTest(); 131 size = tray_user(0)->GetLayoutSizeForTest();
132 EXPECT_EQ(kTrayItemSize, size.height()); 132 EXPECT_EQ(kTrayItemSize, size.height());
133 } 133 }
134 134
135 // Make sure that in single user mode the user panel cannot be activated and no 135 // Make sure that in single user mode the user panel cannot be activated and no
136 // separators are being created. 136 // separators are being created.
137 TEST_F(TrayUserTest, SingleUserModeDoesNotAllowAddingUser) { 137 TEST_F(TrayUserTest, SingleUserModeDoesNotAllowAddingUser) {
138 InitializeParameters(1, false); 138 InitializeParameters(1, false);
139 139
140 // Move the mouse over the status area and click to open the status menu. 140 // Move the mouse over the status area and click to open the status menu.
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // Since the name is capitalized, the email should be different then the 268 // Since the name is capitalized, the email should be different then the
269 // user_id. 269 // user_id.
270 EXPECT_NE(active_user->GetAccountId().GetUserEmail(), 270 EXPECT_NE(active_user->GetAccountId().GetUserEmail(),
271 second_user->GetEmail()); 271 second_user->GetEmail());
272 tray()->CloseSystemBubble(); 272 tray()->CloseSystemBubble();
273 } 273 }
274 274
275 #endif 275 #endif
276 276
277 } // namespace ash 277 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/user/tray_user_separator.cc ('k') | ash/system/user/user_card_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698