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

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

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "ash/desktop_background/desktop_background_controller.h" 8 #include "ash/desktop_background/desktop_background_controller.h"
9 #include "ash/desktop_background/desktop_background_controller_observer.h" 9 #include "ash/desktop_background/desktop_background_controller_observer.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 policy::UserPolicyBuilder* builder = 238 policy::UserPolicyBuilder* builder =
239 user_policy_builders_[user_number].get(); 239 user_policy_builders_[user_number].get();
240 if (filename != "") { 240 if (filename != "") {
241 builder->payload(). 241 builder->payload().
242 mutable_wallpaperimage()->set_value(ConstructPolicy(filename)); 242 mutable_wallpaperimage()->set_value(ConstructPolicy(filename));
243 } else { 243 } else {
244 builder->payload().Clear(); 244 builder->payload().Clear();
245 } 245 }
246 builder->Build(); 246 builder->Build();
247 fake_session_manager_client_->set_user_policy(user_id, builder->GetBlob()); 247 fake_session_manager_client_->set_user_policy(user_id, builder->GetBlob());
248 const User* user = UserManager::Get()->FindUser(user_id); 248 const User* user = GetUserManager()->FindUser(user_id);
249 ASSERT_TRUE(user); 249 ASSERT_TRUE(user);
250 policy::CloudPolicyStore* store = GetStoreForUser(user); 250 policy::CloudPolicyStore* store = GetStoreForUser(user);
251 ASSERT_TRUE(store); 251 ASSERT_TRUE(store);
252 store->Load(); 252 store->Load();
253 ASSERT_EQ(policy::CloudPolicyStore::STATUS_OK, store->status()); 253 ASSERT_EQ(policy::CloudPolicyStore::STATUS_OK, store->status());
254 ASSERT_EQ(policy::CloudPolicyValidatorBase::VALIDATION_OK, 254 ASSERT_EQ(policy::CloudPolicyValidatorBase::VALIDATION_OK,
255 store->validation_status()); 255 store->validation_status());
256 } 256 }
257 257
258 // Obtain WallpaperInfo for |user_number| from WallpaperManager. 258 // Obtain WallpaperInfo for |user_number| from WallpaperManager.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 398
399 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, PersistOverLogout) { 399 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, PersistOverLogout) {
400 LoginUser(kTestUsers[0]); 400 LoginUser(kTestUsers[0]);
401 401
402 // Wait until wallpaper has been loaded. 402 // Wait until wallpaper has been loaded.
403 RunUntilWallpaperChangeCount(1); 403 RunUntilWallpaperChangeCount(1);
404 ASSERT_EQ(kRedImageColor, GetAverageBackgroundColor()); 404 ASSERT_EQ(kRedImageColor, GetAverageBackgroundColor());
405 } 405 }
406 406
407 } // namespace chromeos 407 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698