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

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

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit Created 8 years, 1 month 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/pref_service.cc ('k') | chrome/browser/prefs/pref_value_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_service_unittest.cc
diff --git a/chrome/browser/prefs/pref_service_unittest.cc b/chrome/browser/prefs/pref_service_unittest.cc
index cd046e8fb7c621a23050179a20af9ee51ed30f54..280a3460c56cc00ad1886c378fcf43f4032d86a1 100644
--- a/chrome/browser/prefs/pref_service_unittest.cc
+++ b/chrome/browser/prefs/pref_service_unittest.cc
@@ -60,7 +60,7 @@ TEST(PrefServiceTest, NoObserverFire) {
// Setting the pref to the same value should not set the pref value a second
// time.
- EXPECT_CALL(obs, Observe(_, _, _)).Times(0);
+ EXPECT_CALL(obs, OnPreferenceChanged(_, _)).Times(0);
prefs.SetString(pref_name, new_pref_value);
Mock::VerifyAndClearExpectations(&obs);
@@ -71,7 +71,7 @@ TEST(PrefServiceTest, NoObserverFire) {
Mock::VerifyAndClearExpectations(&obs);
// Clearing the pref again should not cause the pref to fire.
- EXPECT_CALL(obs, Observe(_, _, _)).Times(0);
+ EXPECT_CALL(obs, OnPreferenceChanged(_, _)).Times(0);
prefs.ClearPref(pref_name);
Mock::VerifyAndClearExpectations(&obs);
}
@@ -137,7 +137,7 @@ TEST(PrefServiceTest, Observers) {
// Make sure obs2 still works after removing obs.
registrar.Remove(pref_name, &obs);
- EXPECT_CALL(obs, Observe(_, _, _)).Times(0);
+ EXPECT_CALL(obs, OnPreferenceChanged(_, _)).Times(0);
obs2.Expect(&prefs, pref_name, &expected_new_pref_value);
// This should only fire the observer in obs2.
prefs.SetString(pref_name, new_pref_value);
@@ -379,7 +379,7 @@ TEST_F(PrefServiceSetValueTest, SetStringValue) {
prefs_.Set(kName, default_value);
Mock::VerifyAndClearExpectations(&observer_);
- EXPECT_CALL(observer_, Observe(_, _, _)).Times(0);
+ EXPECT_CALL(observer_, OnPreferenceChanged(_, _)).Times(0);
prefs_.Set(kName, default_value);
Mock::VerifyAndClearExpectations(&observer_);
@@ -395,7 +395,7 @@ TEST_F(PrefServiceSetValueTest, SetDictionaryValue) {
registrar.Init(&prefs_);
registrar.Add(kName, &observer_);
- EXPECT_CALL(observer_, Observe(_, _, _)).Times(0);
+ EXPECT_CALL(observer_, OnPreferenceChanged(_, _)).Times(0);
prefs_.RemoveUserPref(kName);
Mock::VerifyAndClearExpectations(&observer_);
@@ -405,7 +405,7 @@ TEST_F(PrefServiceSetValueTest, SetDictionaryValue) {
prefs_.Set(kName, new_value);
Mock::VerifyAndClearExpectations(&observer_);
- EXPECT_CALL(observer_, Observe(_, _, _)).Times(0);
+ EXPECT_CALL(observer_, OnPreferenceChanged(_, _)).Times(0);
prefs_.Set(kName, new_value);
Mock::VerifyAndClearExpectations(&observer_);
@@ -421,7 +421,7 @@ TEST_F(PrefServiceSetValueTest, SetListValue) {
registrar.Init(&prefs_);
registrar.Add(kName, &observer_);
- EXPECT_CALL(observer_, Observe(_, _, _)).Times(0);
+ EXPECT_CALL(observer_, OnPreferenceChanged(_, _)).Times(0);
prefs_.RemoveUserPref(kName);
Mock::VerifyAndClearExpectations(&observer_);
@@ -431,7 +431,7 @@ TEST_F(PrefServiceSetValueTest, SetListValue) {
prefs_.Set(kName, new_value);
Mock::VerifyAndClearExpectations(&observer_);
- EXPECT_CALL(observer_, Observe(_, _, _)).Times(0);
+ EXPECT_CALL(observer_, OnPreferenceChanged(_, _)).Times(0);
prefs_.Set(kName, new_value);
Mock::VerifyAndClearExpectations(&observer_);
« no previous file with comments | « chrome/browser/prefs/pref_service.cc ('k') | chrome/browser/prefs/pref_value_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698