Properly set ShelfAlignment during login
commit0a30be1d88f00f510af35144e708bbe797e706d8
authorjonross <jonross@chromium.org>
Tue, 17 Feb 2015 22:25:24 +0000 (17 14:25 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 17 Feb 2015 22:26:10 +0000 (17 22:26 +0000)
treea51fde2e3d55c838ab801bae00f565943bf03e05
parentedbe84670e56798b194943dd567a9c38e1d41a6b
Properly set ShelfAlignment during login

ShelfLayoutManager has three methods from which the ShelfAlignment can be
applied. For supressed user sessions the shelf is forced to the bottom, however
this was only addressing locked screens, and adding new users.

When the first login occurs a different state transition takes place, where the
SessionState becomes active while the user session is still supressed.
ShelfLayoutManager was not applying alignment changes made during this time.

Update ShelfLayoutManager to unify the logic for overriding the user set
ShelfAlignment. Update this logic to account for having to apply alignment
during the initial login.

Manual testing was also done for: logging in; locking screen; unlocking screen;
adding a new user; switching users.

TEST=ShelfLayoutManagerTest.SideAlignmentInteractionWithLockScreen, ShelfLayoutManagerTest.SideAlignmentInteractionWithAddUserScreen, ShelfLayoutManagerTest.SideAlignmentInteractionWithLoginScreen
BUG=456199

Review URL: https://codereview.chromium.org/909293002

Cr-Commit-Position: refs/heads/master@{#316673}
ash/shelf/shelf_layout_manager.cc
ash/shelf/shelf_layout_manager.h
ash/shelf/shelf_layout_manager_unittest.cc
ash/test/ash_test_base.cc
ash/test/ash_test_base.h
ash/test/test_session_state_delegate.cc
ash/test/test_session_state_delegate.h