OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 | 6 |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chrome/browser/value_store/value_store_change.h" | 11 #include "chrome/browser/value_store/value_store_change.h" |
12 #include "chrome/common/extensions/value_builder.h" | 12 #include "extensions/common/value_builder.h" |
13 | 13 |
14 using base::DictionaryValue; | 14 using base::DictionaryValue; |
15 using base::Value; | 15 using base::Value; |
16 using extensions::DictionaryBuilder; | 16 using extensions::DictionaryBuilder; |
17 using extensions::ListBuilder; | 17 using extensions::ListBuilder; |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 TEST(ValueStoreChangeTest, NullOldValue) { | 21 TEST(ValueStoreChangeTest, NullOldValue) { |
22 ValueStoreChange change("key", NULL, Value::CreateStringValue("value")); | 22 ValueStoreChange change("key", NULL, Value::CreateStringValue("value")); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 .Set("newValue", v2)) | 86 .Set("newValue", v2)) |
87 .Set("key.with.dots", DictionaryBuilder() | 87 .Set("key.with.dots", DictionaryBuilder() |
88 .Set("oldValue", v3) | 88 .Set("oldValue", v3) |
89 .Set("newValue", v4)) | 89 .Set("newValue", v4)) |
90 .Build(); | 90 .Build(); |
91 | 91 |
92 EXPECT_TRUE(from_json->Equals(expected_from_json.get())); | 92 EXPECT_TRUE(from_json->Equals(expected_from_json.get())); |
93 } | 93 } |
94 | 94 |
95 } // namespace | 95 } // namespace |
OLD | NEW |