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

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

Issue 5441002: Clean up pref change notification handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix extension prefs breakage Created 10 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
« no previous file with comments | « chrome/browser/prefs/dummy_pref_store.cc ('k') | chrome/browser/prefs/pref_member_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_change_registrar_unittest.cc
diff --git a/chrome/browser/prefs/pref_change_registrar_unittest.cc b/chrome/browser/prefs/pref_change_registrar_unittest.cc
index 31c513b3d415e0007f50c9348b52a5ff72daad93..33101671985155b007a85b8c51345df0909c6a8f 100644
--- a/chrome/browser/prefs/pref_change_registrar_unittest.cc
+++ b/chrome/browser/prefs/pref_change_registrar_unittest.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/common/notification_details.h"
-#include "chrome/common/notification_observer.h"
+#include "chrome/common/notification_observer_mock.h"
#include "chrome/common/notification_source.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/pref_names.h"
@@ -25,13 +25,6 @@ class MockPrefService : public TestingPrefService {
MOCK_METHOD2(RemovePrefObserver, void(const char*, NotificationObserver*));
};
-// A mock observer used as a pref observer
-class MockObserver : public NotificationObserver {
- public:
- MOCK_METHOD3(Observe, void(NotificationType, const NotificationSource& source,
- const NotificationDetails& details));
-};
-
class PrefChangeRegistrarTest : public testing::Test {
public:
PrefChangeRegistrarTest() {}
@@ -45,12 +38,12 @@ class PrefChangeRegistrarTest : public testing::Test {
private:
scoped_ptr<MockPrefService> service_;
- scoped_ptr<MockObserver> observer_;
+ scoped_ptr<NotificationObserverMock> observer_;
};
void PrefChangeRegistrarTest::SetUp() {
service_.reset(new MockPrefService());
- observer_.reset(new MockObserver());
+ observer_.reset(new NotificationObserverMock());
}
TEST_F(PrefChangeRegistrarTest, AddAndRemove) {
« no previous file with comments | « chrome/browser/prefs/dummy_pref_store.cc ('k') | chrome/browser/prefs/pref_member_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698