Index: chrome/browser/prefs/pref_notifier_impl_unittest.cc |
diff --git a/chrome/browser/prefs/pref_notifier_impl_unittest.cc b/chrome/browser/prefs/pref_notifier_impl_unittest.cc |
index 4c5211e5758fe1559b378d1409d4f19777d0edea..8460dc7617cccf5e98cd27315ab71fa7c38e2b03 100644 |
--- a/chrome/browser/prefs/pref_notifier_impl_unittest.cc |
+++ b/chrome/browser/prefs/pref_notifier_impl_unittest.cc |
@@ -5,8 +5,8 @@ |
#include "base/bind.h" |
#include "base/callback.h" |
#include "base/prefs/public/pref_observer.h" |
+#include "chrome/browser/prefs/mock_pref_change_callback.h" |
#include "chrome/browser/prefs/pref_notifier_impl.h" |
-#include "chrome/browser/prefs/pref_observer_mock.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/prefs/pref_value_store.h" |
#include "chrome/common/chrome_notification_types.h" |
@@ -34,7 +34,9 @@ class MockPrefInitObserver { |
// OnPreferenceChanged public for tests. |
class TestingPrefNotifierImpl : public PrefNotifierImpl { |
public: |
- TestingPrefNotifierImpl(PrefService* service) : PrefNotifierImpl(service) {} |
+ explicit TestingPrefNotifierImpl(PrefService* service) |
+ : PrefNotifierImpl(service) { |
+ } |
// Make public for tests. |
using PrefNotifierImpl::OnPreferenceChanged; |
@@ -72,6 +74,21 @@ class MockPrefNotifier : public PrefNotifierImpl { |
using PrefNotifierImpl::OnInitializationCompleted; |
}; |
+class PrefObserverMock : public PrefObserver { |
+ public: |
+ PrefObserverMock() {} |
+ virtual ~PrefObserverMock() {} |
+ |
+ MOCK_METHOD2(OnPreferenceChanged, void(PrefServiceBase*, const std::string&)); |
+ |
+ void Expect(PrefServiceBase* prefs, |
+ const std::string& pref_name, |
+ const Value* value) { |
+ EXPECT_CALL(*this, OnPreferenceChanged(prefs, pref_name)) |
+ .With(PrefValueMatches(prefs, pref_name, value)); |
+ } |
+}; |
+ |
// Test fixture class. |
class PrefNotifierTest : public testing::Test { |
protected: |