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

Side by Side Diff: base/prefs/pref_value_map_unittest.cc

Issue 11243002: Move the bits of Prefs where production code has only trivially easy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, fix gypi problem Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/prefs/pref_value_map.cc ('k') | base/prefs/public/pref_change_registrar.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/prefs/pref_value_map.h"
5 #include "base/values.h" 6 #include "base/values.h"
6 #include "chrome/browser/prefs/pref_value_map.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 class PrefValueMapTest : public testing::Test { 9 class PrefValueMapTest : public testing::Test {
10 }; 10 };
11 11
12 TEST_F(PrefValueMapTest, SetValue) { 12 TEST_F(PrefValueMapTest, SetValue) {
13 PrefValueMap map; 13 PrefValueMap map;
14 const Value* result = NULL; 14 const Value* result = NULL;
15 EXPECT_FALSE(map.GetValue("key", &result)); 15 EXPECT_FALSE(map.GetValue("key", &result));
16 EXPECT_FALSE(result); 16 EXPECT_FALSE(result);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 first_map.Swap(&second_map); 102 first_map.Swap(&second_map);
103 103
104 EXPECT_TRUE(first_map.GetValue("d", NULL)); 104 EXPECT_TRUE(first_map.GetValue("d", NULL));
105 EXPECT_TRUE(first_map.GetValue("e", NULL)); 105 EXPECT_TRUE(first_map.GetValue("e", NULL));
106 EXPECT_TRUE(first_map.GetValue("f", NULL)); 106 EXPECT_TRUE(first_map.GetValue("f", NULL));
107 107
108 EXPECT_TRUE(second_map.GetValue("a", NULL)); 108 EXPECT_TRUE(second_map.GetValue("a", NULL));
109 EXPECT_TRUE(second_map.GetValue("b", NULL)); 109 EXPECT_TRUE(second_map.GetValue("b", NULL));
110 EXPECT_TRUE(second_map.GetValue("c", NULL)); 110 EXPECT_TRUE(second_map.GetValue("c", NULL));
111 } 111 }
OLDNEW
« no previous file with comments | « base/prefs/pref_value_map.cc ('k') | base/prefs/public/pref_change_registrar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698