Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5929)

Unified Diff: chrome/browser/prefs/pref_notifier_impl_unittest.cc

Issue 11316163: Remove the last usages of PrefObserver outside of Prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Win and CrOS build. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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:

Powered by Google App Engine
This is Rietveld 408576698