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

Unified Diff: base/prefs/public/pref_change_registrar_unittest.cc

Issue 11519026: base: Do not use Value::Create* functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: scoped_ptr Created 8 years 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 | « base/prefs/pref_value_map_unittest.cc ('k') | base/prefs/testing_pref_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/public/pref_change_registrar_unittest.cc
diff --git a/base/prefs/public/pref_change_registrar_unittest.cc b/base/prefs/public/pref_change_registrar_unittest.cc
index f8f5e287f0b93993e663a356151b22b5c477d0cb..8e495fb7bb1cab4ecad435b28e3cd36b9d7523ca 100644
--- a/base/prefs/public/pref_change_registrar_unittest.cc
+++ b/base/prefs/public/pref_change_registrar_unittest.cc
@@ -13,6 +13,7 @@
using testing::Mock;
using testing::Eq;
+namespace base {
namespace {
const char kHomePage[] = "homepage";
@@ -39,7 +40,7 @@ class PrefChangeRegistrarTest : public testing::Test {
virtual ~PrefChangeRegistrarTest() {}
protected:
- virtual void SetUp();
+ virtual void SetUp() OVERRIDE;
base::Closure observer() const {
return base::Bind(&base::DoNothing);
@@ -163,10 +164,10 @@ TEST_F(ObserveSetOfPreferencesTest, IsManaged) {
scoped_ptr<PrefChangeRegistrar> pref_set(CreatePrefChangeRegistrar());
EXPECT_FALSE(pref_set->IsManaged());
pref_service_->SetManagedPref(kHomePage,
- Value::CreateStringValue("http://crbug.com"));
+ new StringValue("http://crbug.com"));
EXPECT_TRUE(pref_set->IsManaged());
pref_service_->SetManagedPref(kHomePageIsNewTabPage,
- Value::CreateBooleanValue(true));
+ new FundamentalValue(true));
EXPECT_TRUE(pref_set->IsManaged());
pref_service_->RemoveManagedPref(kHomePage);
EXPECT_TRUE(pref_set->IsManaged());
@@ -187,17 +188,17 @@ TEST_F(ObserveSetOfPreferencesTest, Observe) {
pref_set.Add(kHomePageIsNewTabPage, callback);
EXPECT_CALL(*this, OnPreferenceChanged(kHomePage));
- pref_service_->SetUserPref(kHomePage,
- Value::CreateStringValue("http://crbug.com"));
+ pref_service_->SetUserPref(kHomePage, new StringValue("http://crbug.com"));
Mock::VerifyAndClearExpectations(this);
EXPECT_CALL(*this, OnPreferenceChanged(kHomePageIsNewTabPage));
pref_service_->SetUserPref(kHomePageIsNewTabPage,
- Value::CreateBooleanValue(true));
+ new FundamentalValue(true));
Mock::VerifyAndClearExpectations(this);
EXPECT_CALL(*this, OnPreferenceChanged(_)).Times(0);
- pref_service_->SetUserPref(kApplicationLocale,
- Value::CreateStringValue("en_US.utf8"));
+ pref_service_->SetUserPref(kApplicationLocale, new StringValue("en_US.utf8"));
Mock::VerifyAndClearExpectations(this);
}
+
+} // namespace base
« no previous file with comments | « base/prefs/pref_value_map_unittest.cc ('k') | base/prefs/testing_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698