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

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

Issue 5441002: Clean up pref change notification handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix extension prefs breakage Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/prefs/dummy_pref_store.h"
6 #include "chrome/browser/prefs/pref_member.h" 5 #include "chrome/browser/prefs/pref_member.h"
7 #include "chrome/browser/prefs/pref_value_store.h" 6 #include "chrome/browser/prefs/pref_value_store.h"
8 #include "chrome/common/notification_service.h" 7 #include "chrome/common/notification_service.h"
9 #include "chrome/test/testing_pref_service.h" 8 #include "chrome/test/testing_pref_service.h"
10 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
11 10
12 namespace { 11 namespace {
13 12
14 static const char kBoolPref[] = "bool"; 13 static const char kBoolPref[] = "bool";
15 static const char kIntPref[] = "int"; 14 static const char kIntPref[] = "int";
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 184
186 prefs.SetString(kStringPref, "hello"); 185 prefs.SetString(kStringPref, "hello");
187 EXPECT_EQ(2, test_obj.observe_cnt_); 186 EXPECT_EQ(2, test_obj.observe_cnt_);
188 EXPECT_EQ("hello", prefs.GetString(kStringPref)); 187 EXPECT_EQ("hello", prefs.GetString(kStringPref));
189 } 188 }
190 189
191 TEST(PrefMemberTest, NoInit) { 190 TEST(PrefMemberTest, NoInit) {
192 // Make sure not calling Init on a PrefMember doesn't cause problems. 191 // Make sure not calling Init on a PrefMember doesn't cause problems.
193 IntegerPrefMember pref; 192 IntegerPrefMember pref;
194 } 193 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_change_registrar_unittest.cc ('k') | chrome/browser/prefs/pref_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698