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

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

Issue 417623002: user_manager component: Add UserManagerBase class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check for LocalState, update test - make sure that policies are initialized on UserManager creation 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 <cstdlib> 5 #include <cstdlib>
6 #include <cstring> 6 #include <cstring>
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"
11 #include "ash/test/ash_test_base.h" 11 #include "ash/test/ash_test_base.h"
12 #include "ash/test/display_manager_test_api.h" 12 #include "ash/test/display_manager_test_api.h"
13 #include "ash/test/test_user_wallpaper_delegate.h" 13 #include "ash/test/test_user_wallpaper_delegate.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/file_util.h" 15 #include "base/file_util.h"
16 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
17 #include "base/files/scoped_temp_dir.h" 17 #include "base/files/scoped_temp_dir.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/prefs/pref_service.h" 19 #include "base/prefs/pref_service.h"
20 #include "base/prefs/testing_pref_service.h" 20 #include "base/prefs/testing_pref_service.h"
21 #include "chrome/browser/chromeos/login/startup_utils.h" 21 #include "chrome/browser/chromeos/login/startup_utils.h"
22 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" 22 #include "chrome/browser/chromeos/login/users/fake_user_manager.h"
23 #include "chrome/browser/chromeos/login/users/user_manager_impl.h"
24 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" 23 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
25 #include "chrome/browser/chromeos/settings/cros_settings.h" 24 #include "chrome/browser/chromeos/settings/cros_settings.h"
26 #include "chrome/browser/chromeos/settings/device_settings_service.h" 25 #include "chrome/browser/chromeos/settings/device_settings_service.h"
27 #include "chrome/browser/prefs/browser_prefs.h" 26 #include "chrome/browser/prefs/browser_prefs.h"
28 #include "chrome/test/base/testing_browser_process.h" 27 #include "chrome/test/base/testing_browser_process.h"
29 #include "chromeos/chromeos_switches.h" 28 #include "chromeos/chromeos_switches.h"
30 #include "chromeos/settings/cros_settings_names.h" 29 #include "chromeos/settings/cros_settings_names.h"
31 #include "chromeos/settings/cros_settings_provider.h" 30 #include "chromeos/settings/cros_settings_provider.h"
32 #include "grit/ash_resources.h" 31 #include "grit/ash_resources.h"
33 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Logged in users' wallpaper cache should be kept. 96 // Logged in users' wallpaper cache should be kept.
98 EXPECT_TRUE(cached_wallpaper.BackedBySameObjectAs(test_user_1_wallpaper)); 97 EXPECT_TRUE(cached_wallpaper.BackedBySameObjectAs(test_user_1_wallpaper));
99 EXPECT_TRUE(test_api->GetWallpaperFromCache(test_user_2, &cached_wallpaper)); 98 EXPECT_TRUE(test_api->GetWallpaperFromCache(test_user_2, &cached_wallpaper));
100 EXPECT_TRUE(cached_wallpaper.BackedBySameObjectAs(test_user_2_wallpaper)); 99 EXPECT_TRUE(cached_wallpaper.BackedBySameObjectAs(test_user_2_wallpaper));
101 100
102 // Not logged in user's wallpaper cache should be cleared. 101 // Not logged in user's wallpaper cache should be cleared.
103 EXPECT_FALSE(test_api->GetWallpaperFromCache(test_user_3, &cached_wallpaper)); 102 EXPECT_FALSE(test_api->GetWallpaperFromCache(test_user_3, &cached_wallpaper));
104 } 103 }
105 104
106 } // namespace chromeos 105 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698