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

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

Issue 445353004: GetProfileByUser deprecated and renamed to GetProfileByUserUnsafe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed. Created 6 years, 4 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 const char kTestUsers[2][19] = { "test-0@example.com", "test-1@example.com" }; 57 const char kTestUsers[2][19] = { "test-0@example.com", "test-1@example.com" };
58 58
59 const char kRedImageFileName[] = "chromeos/wallpapers/red.jpg"; 59 const char kRedImageFileName[] = "chromeos/wallpapers/red.jpg";
60 const char kGreenImageFileName[] = "chromeos/wallpapers/green.jpg"; 60 const char kGreenImageFileName[] = "chromeos/wallpapers/green.jpg";
61 const char kBlueImageFileName[] = "chromeos/wallpapers/blue.jpg"; 61 const char kBlueImageFileName[] = "chromeos/wallpapers/blue.jpg";
62 62
63 const SkColor kRedImageColor = SkColorSetARGB(255, 199, 6, 7); 63 const SkColor kRedImageColor = SkColorSetARGB(255, 199, 6, 7);
64 const SkColor kGreenImageColor = SkColorSetARGB(255, 38, 196, 15); 64 const SkColor kGreenImageColor = SkColorSetARGB(255, 38, 196, 15);
65 65
66 policy::CloudPolicyStore* GetStoreForUser(const user_manager::User* user) { 66 policy::CloudPolicyStore* GetStoreForUser(const user_manager::User* user) {
67 Profile* profile = ProfileHelper::Get()->GetProfileByUser(user); 67 Profile* profile = ProfileHelper::Get()->GetProfileByUserUnsafe(user);
68 if (!profile) { 68 if (!profile) {
69 ADD_FAILURE(); 69 ADD_FAILURE();
70 return NULL; 70 return NULL;
71 } 71 }
72 policy::UserCloudPolicyManagerChromeOS* policy_manager = 72 policy::UserCloudPolicyManagerChromeOS* policy_manager =
73 policy::UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile); 73 policy::UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile);
74 if (!policy_manager) { 74 if (!policy_manager) {
75 ADD_FAILURE(); 75 ADD_FAILURE();
76 return NULL; 76 return NULL;
77 } 77 }
(...skipping 320 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