| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |