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

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

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 base::FilePath pref_file = temp_dir_.path().AppendASCII("write.json"); 96 base::FilePath pref_file = temp_dir_.path().AppendASCII("write.json");
97 97
98 ASSERT_TRUE(file_util::CopyFile( 98 ASSERT_TRUE(file_util::CopyFile(
99 data_dir_.AppendASCII("read.need_empty_value.json"), 99 data_dir_.AppendASCII("read.need_empty_value.json"),
100 pref_file)); 100 pref_file));
101 101
102 PrefServiceMockBuilder builder; 102 PrefServiceMockBuilder builder;
103 builder.WithUserFilePrefs(pref_file, message_loop_.message_loop_proxy()); 103 builder.WithUserFilePrefs(pref_file, message_loop_.message_loop_proxy());
104 scoped_refptr<user_prefs::PrefRegistrySyncable> registry( 104 scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
105 new user_prefs::PrefRegistrySyncable); 105 new user_prefs::PrefRegistrySyncable);
106 scoped_ptr<PrefServiceSyncable> prefs(builder.CreateSyncable(registry)); 106 scoped_ptr<PrefServiceSyncable> prefs(builder.CreateSyncable(registry.get()));
107 107
108 // Register testing prefs. 108 // Register testing prefs.
109 registry->RegisterListPref("list", 109 registry->RegisterListPref("list",
110 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 110 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
111 registry->RegisterDictionaryPref( 111 registry->RegisterDictionaryPref(
112 "dict", 112 "dict",
113 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 113 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
114 114
115 base::ListValue* non_empty_list = new base::ListValue; 115 base::ListValue* non_empty_list = new base::ListValue;
116 non_empty_list->Append(base::Value::CreateStringValue("test")); 116 non_empty_list->Append(base::Value::CreateStringValue("test"));
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 const char kDefaultFont[] = "Times"; 194 const char kDefaultFont[] = "Times";
195 #elif defined(OS_CHROMEOS) 195 #elif defined(OS_CHROMEOS)
196 const char kDefaultFont[] = "Tinos"; 196 const char kDefaultFont[] = "Tinos";
197 #else 197 #else
198 const char kDefaultFont[] = "Times New Roman"; 198 const char kDefaultFont[] = "Times New Roman";
199 #endif 199 #endif
200 EXPECT_EQ(ASCIIToUTF16(kDefaultFont), 200 EXPECT_EQ(ASCIIToUTF16(kDefaultFont),
201 webkit_prefs.standard_font_family_map[prefs::kWebKitCommonScript]); 201 webkit_prefs.standard_font_family_map[prefs::kWebKitCommonScript]);
202 EXPECT_TRUE(webkit_prefs.javascript_enabled); 202 EXPECT_TRUE(webkit_prefs.javascript_enabled);
203 } 203 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_factory.cc ('k') | chrome/browser/prefs/pref_service_syncable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698