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

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

Issue 11365112: Change PrefStore::ReadResult to a boolean. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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
Index: chrome/browser/prefs/command_line_pref_store_unittest.cc
diff --git a/chrome/browser/prefs/command_line_pref_store_unittest.cc b/chrome/browser/prefs/command_line_pref_store_unittest.cc
index bc1edb9a1ed448ac36961a7383f67ef3ffaf246e..5d2c93930d9438ccb6b75a4d6a9c18eadafe6475 100644
--- a/chrome/browser/prefs/command_line_pref_store_unittest.cc
+++ b/chrome/browser/prefs/command_line_pref_store_unittest.cc
@@ -32,7 +32,7 @@ class TestCommandLinePrefStore : public CommandLinePrefStore {
void VerifyProxyMode(ProxyPrefs::ProxyMode expected_mode) {
const Value* value = NULL;
- ASSERT_EQ(PrefStore::READ_OK, GetValue(prefs::kProxy, &value));
+ ASSERT_TRUE(GetValue(prefs::kProxy, &value));
ASSERT_EQ(Value::TYPE_DICTIONARY, value->GetType());
ProxyConfigDictionary dict(static_cast<const DictionaryValue*>(value));
ProxyPrefs::ProxyMode actual_mode;
@@ -43,8 +43,7 @@ class TestCommandLinePrefStore : public CommandLinePrefStore {
void VerifySSLCipherSuites(const char* const* ciphers,
size_t cipher_count) {
const Value* value = NULL;
- ASSERT_EQ(PrefStore::READ_OK,
- GetValue(prefs::kCipherSuiteBlacklist, &value));
+ ASSERT_TRUE(GetValue(prefs::kCipherSuiteBlacklist, &value));
ASSERT_EQ(Value::TYPE_LIST, value->GetType());
const ListValue* list_value = static_cast<const ListValue*>(value);
ASSERT_EQ(cipher_count, list_value->GetSize());
@@ -68,8 +67,7 @@ TEST(CommandLinePrefStoreTest, SimpleStringPref) {
scoped_refptr<CommandLinePrefStore> store = new CommandLinePrefStore(&cl);
const Value* actual = NULL;
- EXPECT_EQ(PrefStore::READ_OK,
- store->GetValue(prefs::kApplicationLocale, &actual));
+ EXPECT_TRUE(store->GetValue(prefs::kApplicationLocale, &actual));
std::string result;
EXPECT_TRUE(actual->GetAsString(&result));
EXPECT_EQ("hi-MOM", result);
@@ -93,8 +91,8 @@ TEST(CommandLinePrefStoreTest, NoPrefs) {
scoped_refptr<CommandLinePrefStore> store = new CommandLinePrefStore(&cl);
const Value* actual = NULL;
- EXPECT_EQ(PrefStore::READ_NO_VALUE, store->GetValue(unknown_bool, &actual));
- EXPECT_EQ(PrefStore::READ_NO_VALUE, store->GetValue(unknown_string, &actual));
+ EXPECT_FALSE(store->GetValue(unknown_bool, &actual));
+ EXPECT_FALSE(store->GetValue(unknown_string, &actual));
}
// Tests a complex command line with multiple known and unknown switches.
@@ -108,13 +106,13 @@ TEST(CommandLinePrefStoreTest, MultipleSwitches) {
new TestCommandLinePrefStore(&cl);
const Value* actual = NULL;
- EXPECT_EQ(PrefStore::READ_NO_VALUE, store->GetValue(unknown_bool, &actual));
- EXPECT_EQ(PrefStore::READ_NO_VALUE, store->GetValue(unknown_string, &actual));
+ EXPECT_FALSE(store->GetValue(unknown_bool, &actual));
+ EXPECT_FALSE(store->GetValue(unknown_string, &actual));
store->VerifyProxyMode(ProxyPrefs::MODE_FIXED_SERVERS);
const Value* value = NULL;
- ASSERT_EQ(PrefStore::READ_OK, store->GetValue(prefs::kProxy, &value));
+ ASSERT_TRUE(store->GetValue(prefs::kProxy, &value));
ASSERT_EQ(Value::TYPE_DICTIONARY, value->GetType());
ProxyConfigDictionary dict(static_cast<const DictionaryValue*>(value));
« no previous file with comments | « chrome/browser/policy/managed_mode_policy_provider_unittest.cc ('k') | chrome/browser/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698