| Index: chrome/browser/prefs/pref_service_unittest.cc
|
| ===================================================================
|
| --- chrome/browser/prefs/pref_service_unittest.cc (revision 59196)
|
| +++ chrome/browser/prefs/pref_service_unittest.cc (working copy)
|
| @@ -212,6 +212,11 @@
|
| scoped_ptr<Value> default_value(Value::CreateStringValue(default_string));
|
| prefs_.RegisterStringPref(name_, default_string);
|
| prefs_.AddPrefObserver(name_, &observer_);
|
| + // Changing the controlling store from default to user triggers notification.
|
| + SetExpectPrefChanged();
|
| + prefs_.Set(name_, *default_value);
|
| + Mock::VerifyAndClearExpectations(&observer_);
|
| +
|
| SetExpectNoNotification();
|
| prefs_.Set(name_, *default_value);
|
| Mock::VerifyAndClearExpectations(&observer_);
|
| @@ -228,6 +233,8 @@
|
| prefs_.RegisterDictionaryPref(name_);
|
| prefs_.AddPrefObserver(name_, &observer_);
|
|
|
| + // Dictionary values are special: setting one to NULL is the same as clearing
|
| + // the user value, allowing the NULL default to take (or keep) control.
|
| SetExpectNoNotification();
|
| prefs_.Set(name_, *null_value_);
|
| Mock::VerifyAndClearExpectations(&observer_);
|
| @@ -260,6 +267,8 @@
|
| prefs_.RegisterListPref(name_);
|
| prefs_.AddPrefObserver(name_, &observer_);
|
|
|
| + // List values are special: setting one to NULL is the same as clearing the
|
| + // user value, allowing the NULL default to take (or keep) control.
|
| SetExpectNoNotification();
|
| prefs_.Set(name_, *null_value_);
|
| Mock::VerifyAndClearExpectations(&observer_);
|
|
|