| 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 27dfa7dad536a3b72674f4d6e3b960eef7d3c757..97e39d7c85791e8cdc6c1d5f617870cf860eed67 100644
|
| --- a/chrome/browser/prefs/pref_service_unittest.cc
|
| +++ b/chrome/browser/prefs/pref_service_unittest.cc
|
| @@ -37,8 +37,8 @@
|
|
|
| using content::BrowserThread;
|
| using content::WebContentsTester;
|
| -using testing::_;
|
| using testing::Mock;
|
| +using testing::_;
|
|
|
| TEST(PrefServiceTest, NoObserverFire) {
|
| TestingPrefServiceSimple prefs;
|
| @@ -310,52 +310,6 @@ class PrefServiceUserFilePrefsTest : public testing::Test {
|
|
|
| // Verifies that ListValue and DictionaryValue pref with non emtpy default
|
| // preserves its empty value.
|
| -TEST_F(PrefServiceUserFilePrefsTest, PreserveEmptyValue) {
|
| - FilePath pref_file = temp_dir_.path().AppendASCII("write.json");
|
| -
|
| - ASSERT_TRUE(file_util::CopyFile(
|
| - data_dir_.AppendASCII("read.need_empty_value.json"),
|
| - pref_file));
|
| -
|
| - PrefServiceMockBuilder builder;
|
| - builder.WithUserFilePrefs(pref_file, message_loop_.message_loop_proxy());
|
| - scoped_ptr<PrefServiceSyncable> prefs(builder.CreateSyncable());
|
| -
|
| - // Register testing prefs.
|
| - prefs->RegisterListPref("list",
|
| - PrefServiceSyncable::UNSYNCABLE_PREF);
|
| - prefs->RegisterDictionaryPref("dict",
|
| - PrefServiceSyncable::UNSYNCABLE_PREF);
|
| -
|
| - base::ListValue* non_empty_list = new base::ListValue;
|
| - non_empty_list->Append(base::Value::CreateStringValue("test"));
|
| - prefs->RegisterListPref("list_needs_empty_value",
|
| - non_empty_list,
|
| - PrefServiceSyncable::UNSYNCABLE_PREF);
|
| -
|
| - base::DictionaryValue* non_empty_dict = new base::DictionaryValue;
|
| - non_empty_dict->SetString("dummy", "whatever");
|
| - prefs->RegisterDictionaryPref("dict_needs_empty_value",
|
| - non_empty_dict,
|
| - PrefServiceSyncable::UNSYNCABLE_PREF);
|
| -
|
| - // Set all testing prefs to empty.
|
| - ClearListValue(prefs.get(), "list");
|
| - ClearListValue(prefs.get(), "list_needs_empty_value");
|
| - ClearDictionaryValue(prefs.get(), "dict");
|
| - ClearDictionaryValue(prefs.get(), "dict_needs_empty_value");
|
| -
|
| - // Write to file.
|
| - prefs->CommitPendingWrite();
|
| - message_loop_.RunUntilIdle();
|
| -
|
| - // Compare to expected output.
|
| - FilePath golden_output_file =
|
| - data_dir_.AppendASCII("write.golden.need_empty_value.json");
|
| - ASSERT_TRUE(file_util::PathExists(golden_output_file));
|
| - EXPECT_TRUE(file_util::TextContentsEqual(golden_output_file, pref_file));
|
| -}
|
| -
|
| class PrefServiceSetValueTest : public testing::Test {
|
| protected:
|
| static const char kName[];
|
|
|