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

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

Issue 7520023: Converted IncognitoForced boolean policy into IncognitoModeAvailability enum policy. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed unnecessary comment. Created 9 years, 4 months 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 | « chrome/browser/prefs/pref_value_map.cc ('k') | chrome/browser/profiles/profile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_value_map_unittest.cc
diff --git a/chrome/browser/prefs/pref_value_map_unittest.cc b/chrome/browser/prefs/pref_value_map_unittest.cc
index cc47a8594b32b52b2b9bfce9a62d60136a3b2d18..08aa57851550ec8bd59e2729cef0a70a7f62aa7c 100644
--- a/chrome/browser/prefs/pref_value_map_unittest.cc
+++ b/chrome/browser/prefs/pref_value_map_unittest.cc
@@ -23,6 +23,19 @@ TEST_F(PrefValueMapTest, SetValue) {
EXPECT_TRUE(StringValue("hi mom!").Equals(result));
}
+TEST_F(PrefValueMapTest, GetAndSetIntegerValue) {
+ PrefValueMap map;
+ ASSERT_TRUE(map.SetValue("key", Value::CreateIntegerValue(5)));
+
+ int int_value = 0;
+ EXPECT_TRUE(map.GetInteger("key", &int_value));
+ EXPECT_EQ(5, int_value);
+
+ map.SetInteger("key", -14);
+ EXPECT_TRUE(map.GetInteger("key", &int_value));
+ EXPECT_EQ(-14, int_value);
+}
+
TEST_F(PrefValueMapTest, RemoveValue) {
PrefValueMap map;
EXPECT_FALSE(map.RemoveValue("key"));
« no previous file with comments | « chrome/browser/prefs/pref_value_map.cc ('k') | chrome/browser/profiles/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698