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

Unified Diff: ash/common/system/user/tray_user_unittest.cc

Issue 2125373002: mash: Migrate ash/system/user to ash/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 years, 5 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
Index: ash/common/system/user/tray_user_unittest.cc
diff --git a/ash/system/user/tray_user_unittest.cc b/ash/common/system/user/tray_user_unittest.cc
similarity index 94%
rename from ash/system/user/tray_user_unittest.cc
rename to ash/common/system/user/tray_user_unittest.cc
index 39adf622e474d1199ddf068c7109f2a18d74b330..b55ab9ae2b25389c3c43367b05a5c6a9588fff4c 100644
--- a/ash/system/user/tray_user_unittest.cc
+++ b/ash/common/system/user/tray_user_unittest.cc
@@ -6,13 +6,11 @@
#include "ash/common/shell_delegate.h"
#include "ash/common/system/tray/tray_constants.h"
+#include "ash/common/system/user/tray_user.h"
#include "ash/common/system/user/tray_user_separator.h"
+#include "ash/common/system/user/user_view.h"
#include "ash/common/wm_shell.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
#include "ash/system/tray/system_tray.h"
-#include "ash/system/user/tray_user.h"
-#include "ash/system/user/user_view.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/ash_test_helper.h"
#include "ash/test/test_session_state_delegate.h"
@@ -69,7 +67,7 @@ class TrayUserTest : public test::AshTestBase {
void TrayUserTest::SetUp() {
test::AshTestBase::SetUp();
- tray_ = Shell::GetPrimaryRootWindowController()->GetSystemTray();
+ tray_ = GetPrimarySystemTray();
delegate_ = test::AshTestHelper::GetTestSessionStateDelegate();
}
@@ -132,7 +130,7 @@ TEST_F(TrayUserTest, SingleUserModeDoesNotAllowAddingUser) {
InitializeParameters(1, false);
// Move the mouse over the status area and click to open the status menu.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator& generator = GetEventGenerator();
EXPECT_FALSE(tray()->IsAnyBubbleVisible());
@@ -154,7 +152,7 @@ TEST_F(TrayUserTest, SingleUserModeDoesNotAllowAddingUser) {
TEST_F(TrayUserTest, AccessibleLabelContainsSingleUserInfo) {
InitializeParameters(1, false);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator& generator = GetEventGenerator();
ShowTrayMenu(&generator);
views::View* view =
@@ -169,7 +167,7 @@ TEST_F(TrayUserTest, AccessibleLabelContainsSingleUserInfo) {
TEST_F(TrayUserTest, AccessibleLabelContainsMultiUserInfo) {
InitializeParameters(1, true);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator& generator = GetEventGenerator();
ShowTrayMenu(&generator);
views::View* view =
@@ -191,7 +189,7 @@ TEST_F(TrayUserTest, MutiUserModeDoesNotAllowToAddUser) {
InitializeParameters(1, true);
// Move the mouse over the status area and click to open the status menu.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.set_async(false);
int max_users = delegate()->GetMaximumNumberOfLoggedInUsers();
@@ -250,7 +248,7 @@ TEST_F(TrayUserTest, MutiUserModeDoesNotAllowToAddUser) {
TEST_F(TrayUserTest, MutiUserModeButtonClicks) {
// Have two users.
InitializeParameters(2, true);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator& generator = GetEventGenerator();
ShowTrayMenu(&generator);
// Switch to a new user - which has a capitalized name.

Powered by Google App Engine
This is Rietveld 408576698