summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/json_pref_store_unittest.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/json_pref_store_unittest.cc b/chrome/browser/json_pref_store_unittest.cc
index 01f7c7c..37bd44e 100644
--- a/chrome/browser/json_pref_store_unittest.cc
+++ b/chrome/browser/json_pref_store_unittest.cc
@@ -49,8 +49,11 @@ TEST_F(JsonPrefStoreTest, NonExistentFile) {
FilePath bogus_input_file = data_dir_.AppendASCII("read.txt");
JsonPrefStore pref_store(bogus_input_file);
EXPECT_EQ(PrefStore::PREF_READ_ERROR_NO_FILE, pref_store.ReadPrefs());
- EXPECT_FALSE(pref_store.ReadOnly());
+ EXPECT_TRUE(pref_store.ReadOnly());
EXPECT_TRUE(pref_store.Prefs()->empty());
+ // Writing to a read-only store should return true, but do nothing.
+ EXPECT_TRUE(pref_store.WritePrefs());
+ EXPECT_FALSE(file_util::PathExists(bogus_input_file));
}
TEST_F(JsonPrefStoreTest, Basic) {