| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |