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

Side by Side Diff: chrome/browser/chromeos/power/power_prefs_unittest.cc

Issue 271793003: components: Extract pref_registry component out of user_prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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
« no previous file with comments | « chrome/browser/chromeos/power/power_prefs.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/power/power_prefs.h" 5 #include "chrome/browser/chromeos/power/power_prefs.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/prefs/pref_service.h" 12 #include "base/prefs/pref_service.h"
13 #include "chrome/browser/chrome_notification_types.h" 13 #include "chrome/browser/chrome_notification_types.h"
14 #include "chrome/browser/extensions/extension_special_storage_policy.h" 14 #include "chrome/browser/extensions/extension_special_storage_policy.h"
15 #include "chrome/browser/prefs/browser_prefs.h" 15 #include "chrome/browser/prefs/browser_prefs.h"
16 #include "chrome/browser/prefs/pref_service_syncable.h" 16 #include "chrome/browser/prefs/pref_service_syncable.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/profiles/profile_manager.h" 18 #include "chrome/browser/profiles/profile_manager.h"
19 #include "chrome/common/chrome_constants.h" 19 #include "chrome/common/chrome_constants.h"
20 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
21 #include "chrome/test/base/testing_browser_process.h" 21 #include "chrome/test/base/testing_browser_process.h"
22 #include "chrome/test/base/testing_pref_service_syncable.h" 22 #include "chrome/test/base/testing_pref_service_syncable.h"
23 #include "chrome/test/base/testing_profile.h" 23 #include "chrome/test/base/testing_profile.h"
24 #include "chrome/test/base/testing_profile_manager.h" 24 #include "chrome/test/base/testing_profile_manager.h"
25 #include "chromeos/chromeos_switches.h" 25 #include "chromeos/chromeos_switches.h"
26 #include "chromeos/dbus/fake_dbus_thread_manager.h" 26 #include "chromeos/dbus/fake_dbus_thread_manager.h"
27 #include "chromeos/dbus/fake_power_manager_client.h" 27 #include "chromeos/dbus/fake_power_manager_client.h"
28 #include "chromeos/dbus/power_manager/policy.pb.h" 28 #include "chromeos/dbus/power_manager/policy.pb.h"
29 #include "chromeos/dbus/power_policy_controller.h" 29 #include "chromeos/dbus/power_policy_controller.h"
30 #include "components/user_prefs/pref_registry_syncable.h" 30 #include "components/pref_registry/pref_registry_syncable.h"
31 #include "content/public/browser/notification_details.h" 31 #include "content/public/browser/notification_details.h"
32 #include "content/public/browser/notification_service.h" 32 #include "content/public/browser/notification_service.h"
33 #include "content/public/browser/notification_source.h" 33 #include "content/public/browser/notification_source.h"
34 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
35 35
36 namespace chromeos { 36 namespace chromeos {
37 37
38 class PowerPrefsTest : public testing::Test { 38 class PowerPrefsTest : public testing::Test {
39 protected: 39 protected:
40 PowerPrefsTest(); 40 PowerPrefsTest();
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 content::Source<Profile>(user_profile), 259 content::Source<Profile>(user_profile),
260 content::NotificationService::NoDetails()); 260 content::NotificationService::NoDetails());
261 261
262 // The user profile's prefs should still be used. 262 // The user profile's prefs should still be used.
263 EXPECT_FALSE(GetProfile()); 263 EXPECT_FALSE(GetProfile());
264 EXPECT_EQ(GetExpectedPowerPolicyForProfile(user_profile), 264 EXPECT_EQ(GetExpectedPowerPolicyForProfile(user_profile),
265 GetCurrentPowerPolicy()); 265 GetCurrentPowerPolicy());
266 } 266 }
267 267
268 } // namespace chromeos 268 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/power/power_prefs.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698