| 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/dummy_pref_store.h" | 5 #include "chrome/browser/prefs/dummy_pref_store.h" |
| 6 #include "chrome/browser/pref_member.h" | 6 #include "chrome/browser/prefs/pref_member.h" |
| 7 #include "chrome/browser/pref_value_store.h" | 7 #include "chrome/browser/prefs/pref_value_store.h" |
| 8 #include "chrome/common/notification_service.h" | 8 #include "chrome/common/notification_service.h" |
| 9 #include "chrome/test/testing_pref_service.h" | 9 #include "chrome/test/testing_pref_service.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 static const char kBoolPref[] = "bool"; | 14 static const char kBoolPref[] = "bool"; |
| 15 static const char kIntPref[] = "int"; | 15 static const char kIntPref[] = "int"; |
| 16 static const char kRealPref[] = "real"; | 16 static const char kRealPref[] = "real"; |
| 17 static const char kStringPref[] = "string"; | 17 static const char kStringPref[] = "string"; |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 prefs.SetString(kStringPref, "hello"); | 186 prefs.SetString(kStringPref, "hello"); |
| 187 EXPECT_EQ(2, test_obj.observe_cnt_); | 187 EXPECT_EQ(2, test_obj.observe_cnt_); |
| 188 EXPECT_EQ("hello", prefs.GetString(kStringPref)); | 188 EXPECT_EQ("hello", prefs.GetString(kStringPref)); |
| 189 } | 189 } |
| 190 | 190 |
| 191 TEST(PrefMemberTest, NoInit) { | 191 TEST(PrefMemberTest, NoInit) { |
| 192 // Make sure not calling Init on a PrefMember doesn't cause problems. | 192 // Make sure not calling Init on a PrefMember doesn't cause problems. |
| 193 IntegerPrefMember pref; | 193 IntegerPrefMember pref; |
| 194 } | 194 } |
| OLD | NEW |