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

Side by Side Diff: chrome/browser/prefs/chrome_pref_service_unittest.cc

Issue 1305213009: Componentize PrefSyncableService and support classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable
Patch Set: Add missing dependency on //sync:test_support_sync_api for unit tests with gn Created 5 years, 3 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
11 #include "base/prefs/scoped_user_pref_update.h" 11 #include "base/prefs/scoped_user_pref_update.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/prefs/browser_prefs.h" 14 #include "chrome/browser/prefs/browser_prefs.h"
15 #include "chrome/browser/prefs/command_line_pref_store.h" 15 #include "chrome/browser/prefs/command_line_pref_store.h"
16 #include "chrome/browser/prefs/pref_service_mock_factory.h"
17 #include "chrome/common/chrome_paths.h" 16 #include "chrome/common/chrome_paths.h"
18 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
19 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
20 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 19 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
21 #include "chrome/test/base/testing_pref_service_syncable.h"
22 #include "chrome/test/base/testing_profile.h" 20 #include "chrome/test/base/testing_profile.h"
23 #include "components/policy/core/browser/configuration_policy_pref_store.h" 21 #include "components/policy/core/browser/configuration_policy_pref_store.h"
24 #include "components/policy/core/common/mock_configuration_policy_provider.h" 22 #include "components/policy/core/common/mock_configuration_policy_provider.h"
25 #include "components/pref_registry/pref_registry_syncable.h" 23 #include "components/pref_registry/pref_registry_syncable.h"
24 #include "components/syncable_prefs/pref_service_mock_factory.h"
25 #include "components/syncable_prefs/testing_pref_service_syncable.h"
26 #include "content/public/common/web_preferences.h" 26 #include "content/public/common/web_preferences.h"
27 #include "content/public/test/test_renderer_host.h" 27 #include "content/public/test/test_renderer_host.h"
28 #include "ui/base/test/data/resource.h" 28 #include "ui/base/test/data/resource.h"
29 29
30 using content::RenderViewHostTester; 30 using content::RenderViewHostTester;
31 using content::WebPreferences; 31 using content::WebPreferences;
32 32
33 TEST(ChromePrefServiceTest, UpdateCommandLinePrefStore) { 33 TEST(ChromePrefServiceTest, UpdateCommandLinePrefStore) {
34 TestingPrefServiceSimple prefs; 34 TestingPrefServiceSimple prefs;
35 prefs.registry()->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, false); 35 prefs.registry()->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, false);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 const char kDefaultFont[] = "Times"; 130 const char kDefaultFont[] = "Times";
131 #elif defined(OS_CHROMEOS) 131 #elif defined(OS_CHROMEOS)
132 const char kDefaultFont[] = "Tinos"; 132 const char kDefaultFont[] = "Tinos";
133 #else 133 #else
134 const char kDefaultFont[] = "Times New Roman"; 134 const char kDefaultFont[] = "Times New Roman";
135 #endif 135 #endif
136 EXPECT_EQ(base::ASCIIToUTF16(kDefaultFont), 136 EXPECT_EQ(base::ASCIIToUTF16(kDefaultFont),
137 webkit_prefs.standard_font_family_map[prefs::kWebKitCommonScript]); 137 webkit_prefs.standard_font_family_map[prefs::kWebKitCommonScript]);
138 EXPECT_TRUE(webkit_prefs.javascript_enabled); 138 EXPECT_TRUE(webkit_prefs.javascript_enabled);
139 } 139 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_factory.cc ('k') | chrome/browser/prefs/command_line_pref_store_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698