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

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

Issue 385263004: Get rid of some uses of CreateIntegerValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 (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/file_util.h" 6 #include "base/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"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 // Supply our own profile so we use the correct profile data. The test 97 // Supply our own profile so we use the correct profile data. The test
98 // harness is not supposed to overwrite a profile if it's already created. 98 // harness is not supposed to overwrite a profile if it's already created.
99 99
100 // Set some (WebKit) user preferences. 100 // Set some (WebKit) user preferences.
101 TestingPrefServiceSyncable* pref_services = 101 TestingPrefServiceSyncable* pref_services =
102 profile()->GetTestingPrefService(); 102 profile()->GetTestingPrefService();
103 pref_services->SetUserPref(prefs::kDefaultCharset, 103 pref_services->SetUserPref(prefs::kDefaultCharset,
104 new base::StringValue("utf8")); 104 new base::StringValue("utf8"));
105 pref_services->SetUserPref(prefs::kWebKitDefaultFontSize, 105 pref_services->SetUserPref(prefs::kWebKitDefaultFontSize,
106 base::Value::CreateIntegerValue(20)); 106 new base::FundamentalValue(20));
107 pref_services->SetUserPref(prefs::kWebKitTextAreasAreResizable, 107 pref_services->SetUserPref(prefs::kWebKitTextAreasAreResizable,
108 new base::FundamentalValue(false)); 108 new base::FundamentalValue(false));
109 pref_services->SetUserPref(prefs::kWebKitUsesUniversalDetector, 109 pref_services->SetUserPref(prefs::kWebKitUsesUniversalDetector,
110 new base::FundamentalValue(true)); 110 new base::FundamentalValue(true));
111 pref_services->SetUserPref("webkit.webprefs.foo", 111 pref_services->SetUserPref("webkit.webprefs.foo",
112 new base::StringValue("bar")); 112 new base::StringValue("bar"));
113 } 113 }
114 }; 114 };
115 115
116 // Tests to see that webkit preferences are properly loaded and copied over 116 // Tests to see that webkit preferences are properly loaded and copied over
(...skipping 13 matching lines...) Expand all
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/policy/policy_browsertest.cc ('k') | chrome/browser/prefs/command_line_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698