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..461e9b57386806a419854c66a57fa4f8641da319 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" |
@@ -72,6 +72,21 @@ class MockPrefNotifier : public PrefNotifierImpl { |
using PrefNotifierImpl::OnInitializationCompleted; |
}; |
+class PrefObserverMock : public PrefObserver { |
+ public: |
+ PrefObserverMock() {} |
+ virtual ~PrefObserverMock() {} |
+ |
+ MOCK_METHOD2(OnPreferenceChanged, void(PrefServiceBase*, const std::string&)); |
Mattias Nissler (ping if slow)
2012/12/04 10:10:34
same comment regarding moving the mock declaration
Jói
2012/12/04 10:55:57
In this case it needs to derive from PrefObserver,
Mattias Nissler (ping if slow)
2012/12/04 11:18:33
Yes, you are right, I had missed that this version
|
+ |
+ 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: |