| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <map> | 5 #include <map> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 TestingProfile::Builder builder; | 273 TestingProfile::Builder builder; |
| 274 builder.AddTestingFactory(EasyUnlockServiceFactory::GetInstance(), | 274 builder.AddTestingFactory(EasyUnlockServiceFactory::GetInstance(), |
| 275 &CreateEasyUnlockServiceForTest); | 275 &CreateEasyUnlockServiceForTest); |
| 276 *profile = builder.Build(); | 276 *profile = builder.Build(); |
| 277 | 277 |
| 278 mock_user_manager_->AddUser(user_id); | 278 mock_user_manager_->AddUser(user_id); |
| 279 profile->get()->set_profile_name(user_id); | 279 profile->get()->set_profile_name(user_id); |
| 280 | 280 |
| 281 SigninManagerBase* signin_manager = | 281 SigninManagerBase* signin_manager = |
| 282 SigninManagerFactory::GetForProfile(profile->get()); | 282 SigninManagerFactory::GetForProfile(profile->get()); |
| 283 signin_manager->SetAuthenticatedUsername(user_id); | 283 signin_manager->SetAuthenticatedAccountInfo(user_id, user_id); |
| 284 } | 284 } |
| 285 | 285 |
| 286 protected: | 286 protected: |
| 287 scoped_ptr<TestingProfile> profile_; | 287 scoped_ptr<TestingProfile> profile_; |
| 288 scoped_ptr<TestingProfile> secondary_profile_; | 288 scoped_ptr<TestingProfile> secondary_profile_; |
| 289 chromeos::MockUserManager* mock_user_manager_; | 289 chromeos::MockUserManager* mock_user_manager_; |
| 290 | 290 |
| 291 private: | 291 private: |
| 292 content::TestBrowserThreadBundle thread_bundle_; | 292 content::TestBrowserThreadBundle thread_bundle_; |
| 293 | 293 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 ON_CALL(*mock_user_manager_, IsCurrentUserNonCryptohomeDataEphemeral()) | 361 ON_CALL(*mock_user_manager_, IsCurrentUserNonCryptohomeDataEphemeral()) |
| 362 .WillByDefault(Return(true)); | 362 .WillByDefault(Return(true)); |
| 363 | 363 |
| 364 SetAppManagerReady(profile_.get()); | 364 SetAppManagerReady(profile_.get()); |
| 365 EXPECT_FALSE(EasyUnlockService::Get(profile_.get())->IsAllowed()); | 365 EXPECT_FALSE(EasyUnlockService::Get(profile_.get())->IsAllowed()); |
| 366 EXPECT_TRUE( | 366 EXPECT_TRUE( |
| 367 EasyUnlockAppInState(profile_.get(), TestAppManager::STATE_NOT_LOADED)); | 367 EasyUnlockAppInState(profile_.get(), TestAppManager::STATE_NOT_LOADED)); |
| 368 } | 368 } |
| 369 | 369 |
| 370 } // namespace | 370 } // namespace |
| OLD | NEW |