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

Side by Side Diff: chrome/browser/chromeos/login/users/multi_profile_user_controller_unittest.cc

Issue 398753004: [cros] Move User class to user_manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" 5 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" 10 #include "chrome/browser/chromeos/login/users/fake_user_manager.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 virtual void SetUp() OVERRIDE { 110 virtual void SetUp() OVERRIDE {
111 profile_manager_.reset( 111 profile_manager_.reset(
112 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); 112 new TestingProfileManager(TestingBrowserProcess::GetGlobal()));
113 ASSERT_TRUE(profile_manager_->SetUp()); 113 ASSERT_TRUE(profile_manager_->SetUp());
114 controller_.reset(new MultiProfileUserController( 114 controller_.reset(new MultiProfileUserController(
115 this, TestingBrowserProcess::GetGlobal()->local_state())); 115 this, TestingBrowserProcess::GetGlobal()->local_state()));
116 116
117 for (size_t i = 0; i < arraysize(kUsers); ++i) { 117 for (size_t i = 0; i < arraysize(kUsers); ++i) {
118 const std::string user_email(kUsers[i]); 118 const std::string user_email(kUsers[i]);
119 const User* user = fake_user_manager_->AddUser(user_email); 119 const user_manager::User* user = fake_user_manager_->AddUser(user_email);
120 120
121 // Note that user profiles are created after user login in reality. 121 // Note that user profiles are created after user login in reality.
122 TestingProfile* user_profile = 122 TestingProfile* user_profile =
123 profile_manager_->CreateTestingProfile(user_email); 123 profile_manager_->CreateTestingProfile(user_email);
124 user_profile->set_profile_name(user_email); 124 user_profile->set_profile_name(user_email);
125 user_profiles_.push_back(user_profile); 125 user_profiles_.push_back(user_profile);
126 126
127 ProfileHelper::Get()->SetUserToProfileMappingForTesting(user, 127 ProfileHelper::Get()->SetUserToProfileMappingForTesting(user,
128 user_profile); 128 user_profile);
129 } 129 }
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 service->OnTrustAnchorsChanged(certificates); 393 service->OnTrustAnchorsChanged(certificates);
394 EXPECT_TRUE(service->has_policy_certificates()); 394 EXPECT_TRUE(service->has_policy_certificates());
395 EXPECT_EQ(MultiProfileUserController::NOT_ALLOWED_PRIMARY_POLICY_CERT_TAINTED, 395 EXPECT_EQ(MultiProfileUserController::NOT_ALLOWED_PRIMARY_POLICY_CERT_TAINTED,
396 controller()->IsUserAllowedInSession(kUsers[1])); 396 controller()->IsUserAllowedInSession(kUsers[1]));
397 397
398 // Flush tasks posted to IO. 398 // Flush tasks posted to IO.
399 base::RunLoop().RunUntilIdle(); 399 base::RunLoop().RunUntilIdle();
400 } 400 }
401 401
402 } // namespace chromeos 402 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698