| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/prefs/pref_change_registrar.h" | 7 #include "base/prefs/pref_change_registrar.h" |
| 8 #include "base/prefs/pref_observer.h" | 8 #include "base/prefs/pref_observer.h" |
| 9 #include "base/prefs/pref_registry_simple.h" | 9 #include "base/prefs/pref_registry_simple.h" |
| 10 #include "base/prefs/testing_pref_service.h" | 10 #include "base/prefs/testing_pref_service.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } // namespace | 36 } // namespace |
| 37 | 37 |
| 38 class PrefChangeRegistrarTest : public testing::Test { | 38 class PrefChangeRegistrarTest : public testing::Test { |
| 39 public: | 39 public: |
| 40 PrefChangeRegistrarTest() {} | 40 PrefChangeRegistrarTest() {} |
| 41 virtual ~PrefChangeRegistrarTest() {} | 41 virtual ~PrefChangeRegistrarTest() {} |
| 42 | 42 |
| 43 protected: | 43 protected: |
| 44 virtual void SetUp() OVERRIDE; | 44 virtual void SetUp() override; |
| 45 | 45 |
| 46 base::Closure observer() const { | 46 base::Closure observer() const { |
| 47 return base::Bind(&base::DoNothing); | 47 return base::Bind(&base::DoNothing); |
| 48 } | 48 } |
| 49 | 49 |
| 50 MockPrefService* service() const { return service_.get(); } | 50 MockPrefService* service() const { return service_.get(); } |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 scoped_ptr<MockPrefService> service_; | 53 scoped_ptr<MockPrefService> service_; |
| 54 }; | 54 }; |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 pref_service_->SetUserPref(kHomePageIsNewTabPage, | 191 pref_service_->SetUserPref(kHomePageIsNewTabPage, |
| 192 new FundamentalValue(true)); | 192 new FundamentalValue(true)); |
| 193 Mock::VerifyAndClearExpectations(this); | 193 Mock::VerifyAndClearExpectations(this); |
| 194 | 194 |
| 195 EXPECT_CALL(*this, OnPreferenceChanged(_)).Times(0); | 195 EXPECT_CALL(*this, OnPreferenceChanged(_)).Times(0); |
| 196 pref_service_->SetUserPref(kApplicationLocale, new StringValue("en_US.utf8")); | 196 pref_service_->SetUserPref(kApplicationLocale, new StringValue("en_US.utf8")); |
| 197 Mock::VerifyAndClearExpectations(this); | 197 Mock::VerifyAndClearExpectations(this); |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace base | 200 } // namespace base |
| OLD | NEW |