OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <limits> | 5 #include <limits> |
6 | 6 |
7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 #include "base/utf_string_conversions.h" |
10 #include "base/values.h" | 11 #include "base/values.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
12 | 13 |
13 class ValuesTest: public testing::Test { | 14 class ValuesTest: public testing::Test { |
14 }; | 15 }; |
15 | 16 |
16 // TODO(viettrungluu): I changed the keys for DictionaryValue from std::wstring | 17 // TODO(viettrungluu): I changed the keys for DictionaryValue from std::wstring |
17 // to std::string. I've temporarily kept the old methods taking std::wstring for | 18 // to std::string. I've temporarily kept the old methods taking std::wstring for |
18 // compatibility. The ...Deprecated tests are the old tests which use these | 19 // compatibility. The ...Deprecated tests are the old tests which use these |
19 // methods, and remain to test compatibility. They will be removed once the old | 20 // methods, and remain to test compatibility. They will be removed once the old |
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 EXPECT_TRUE(res_sub_dict->GetString(L"sub_base_key", &sub_base_key_value)); | 1071 EXPECT_TRUE(res_sub_dict->GetString(L"sub_base_key", &sub_base_key_value)); |
1071 EXPECT_EQ("sub_base_key_value_base", sub_base_key_value); // Preserved. | 1072 EXPECT_EQ("sub_base_key_value_base", sub_base_key_value); // Preserved. |
1072 std::string sub_collide_key_value; | 1073 std::string sub_collide_key_value; |
1073 EXPECT_TRUE(res_sub_dict->GetString(L"sub_collide_key", | 1074 EXPECT_TRUE(res_sub_dict->GetString(L"sub_collide_key", |
1074 &sub_collide_key_value)); | 1075 &sub_collide_key_value)); |
1075 EXPECT_EQ("sub_collide_key_value_merge", sub_collide_key_value); // Replaced. | 1076 EXPECT_EQ("sub_collide_key_value_merge", sub_collide_key_value); // Replaced. |
1076 std::string sub_merge_key_value; | 1077 std::string sub_merge_key_value; |
1077 EXPECT_TRUE(res_sub_dict->GetString(L"sub_merge_key", &sub_merge_key_value)); | 1078 EXPECT_TRUE(res_sub_dict->GetString(L"sub_merge_key", &sub_merge_key_value)); |
1078 EXPECT_EQ("sub_merge_key_value_merge", sub_merge_key_value); // Merged in. | 1079 EXPECT_EQ("sub_merge_key_value_merge", sub_merge_key_value); // Merged in. |
1079 } | 1080 } |
OLD | NEW |