cros: Fix inconsistent SessionController state for tests
- Do not set ACTIVE state in StartRestoreAfterCrashSession and StartStubLoginSession. SessionStarted() call will do that. Setting it explicitly breaks tests such as AccessibilityManagerTest that has "--login-manager" but goes through StartRestoreAfterCrashSession code to initialize; - CrashRestoreComplexTest should use GetLRULoggedInUsers instead of GetLoggedInUsers since it tests the user session order; - Fix UserManagerBase to cover tests that add a non-existent user; - Make sure |logged_in_user_| preserves the order since its index is used as fake session id ATM; - Fire UserAddedToSession for such users; BUG=648964 TEST=Existing tests. Review-Url: https://codereview.chromium.org/2577903002 Cr-Commit-Position: refs/heads/master@{#438944}
Showing
Please register or sign in to comment