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

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

Issue 2017413002: ash: Fix variable names and setters in ShelfLayoutManager and tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shellshelf
Patch Set: review comments 2 Created 4 years, 7 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/system/user/tray_user_unittest.cc
diff --git a/ash/system/user/tray_user_unittest.cc b/ash/system/user/tray_user_unittest.cc
index ee1a92aabcb0ab9e98dc49ada21e8d5365bf6c61..b0dcd3f3042b9c74808a22effcf7d20be1fd9505 100644
--- a/ash/system/user/tray_user_unittest.cc
+++ b/ash/system/user/tray_user_unittest.cc
@@ -47,14 +47,12 @@ class TrayUserTest : public ash::test::AshTestBase {
void ClickUserItem(ui::test::EventGenerator* generator, int index);
// Accessors to various system components.
- ShelfLayoutManager* shelf() { return shelf_; }
SystemTray* tray() { return tray_; }
ash::test::TestSessionStateDelegate* delegate() { return delegate_; }
ash::TrayUser* tray_user(int index) { return tray_user_[index]; }
ash::TrayUserSeparator* tray_user_separator() { return tray_user_separator_; }
private:
- ShelfLayoutManager* shelf_;
SystemTray* tray_;
ash::test::TestSessionStateDelegate* delegate_;
@@ -69,15 +67,10 @@ class TrayUserTest : public ash::test::AshTestBase {
};
TrayUserTest::TrayUserTest()
- : shelf_(NULL),
- tray_(NULL),
- delegate_(NULL),
- tray_user_separator_(NULL) {
-}
+ : tray_(nullptr), delegate_(nullptr), tray_user_separator_(nullptr) {}
oshima 2016/06/01 18:10:06 optiona: in-class initializer, and = defualt?
James Cook 2016/06/01 18:24:21 Done.
void TrayUserTest::SetUp() {
ash::test::AshTestBase::SetUp();
- shelf_ = Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
tray_ = Shell::GetPrimaryRootWindowController()->GetSystemTray();
delegate_ = static_cast<ash::test::TestSessionStateDelegate*>(
ash::Shell::GetInstance()->session_state_delegate());
@@ -86,8 +79,9 @@ void TrayUserTest::SetUp() {
void TrayUserTest::InitializeParameters(int users_logged_in,
bool multiprofile) {
// Show the shelf.
- shelf()->LayoutShelf();
- shelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
+ Shelf* shelf = Shelf::ForPrimaryDisplay();
+ shelf->shelf_layout_manager()->LayoutShelf();
+ shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
// Set our default assumptions. Note that it is sufficient to set these
// after everything was created.
« no previous file with comments | « ash/system/tray/system_tray_unittest.cc ('k') | ash/system/web_notification/web_notification_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698