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

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

Issue 149173004: Adding a dialog which explains that the multi user session has ended because a user policy has chan… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/multi_profile_user_controller.h" 5 #include "chrome/browser/chromeos/login/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/fake_user_manager.h" 10 #include "chrome/browser/chromeos/login/fake_user_manager.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 void SetCachedBehavior(size_t user_index, 169 void SetCachedBehavior(size_t user_index,
170 const std::string& behavior) { 170 const std::string& behavior) {
171 controller_->SetCachedValue(kUsers[user_index], behavior); 171 controller_->SetCachedValue(kUsers[user_index], behavior);
172 } 172 }
173 173
174 void ResetCounts() { 174 void ResetCounts() {
175 user_not_allowed_count_ = 0; 175 user_not_allowed_count_ = 0;
176 } 176 }
177 177
178 // MultiProfileUserControllerDeleagte overrides: 178 // MultiProfileUserControllerDeleagte overrides:
179 virtual void OnUserNotAllowed() OVERRIDE { 179 virtual void OnUserNotAllowed(const std::string& user_email) OVERRIDE {
180 ++user_not_allowed_count_; 180 ++user_not_allowed_count_;
181 } 181 }
182 182
183 MultiProfileUserController* controller() { return controller_.get(); } 183 MultiProfileUserController* controller() { return controller_.get(); }
184 int user_not_allowed_count() const { return user_not_allowed_count_; } 184 int user_not_allowed_count() const { return user_not_allowed_count_; }
185 185
186 TestingProfile* profile(int index) { 186 TestingProfile* profile(int index) {
187 return user_profiles_[index]; 187 return user_profiles_[index];
188 } 188 }
189 189
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 "subject", "issuer", base::Time(), base::Time())); 375 "subject", "issuer", base::Time(), base::Time()));
376 service->OnTrustAnchorsChanged(certificates); 376 service->OnTrustAnchorsChanged(certificates);
377 EXPECT_TRUE(service->has_policy_certificates()); 377 EXPECT_TRUE(service->has_policy_certificates());
378 EXPECT_FALSE(controller()->IsUserAllowedInSession(kUsers[1])); 378 EXPECT_FALSE(controller()->IsUserAllowedInSession(kUsers[1]));
379 379
380 // Flush tasks posted to IO. 380 // Flush tasks posted to IO.
381 base::RunLoop().RunUntilIdle(); 381 base::RunLoop().RunUntilIdle();
382 } 382 }
383 383
384 } // namespace chromeos 384 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698