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 "tools/json_schema_compiler/test/objects.h" | 5 #include "tools/json_schema_compiler/test/objects.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
9 | 11 |
10 using namespace test::api::objects; | 12 using namespace test::api::objects; |
11 | 13 |
12 TEST(JsonSchemaCompilerObjectsTest, ObjectParamParamsCreate) { | 14 TEST(JsonSchemaCompilerObjectsTest, ObjectParamParamsCreate) { |
13 { | 15 { |
14 scoped_ptr<base::ListValue> strings(new base::ListValue()); | 16 scoped_ptr<base::ListValue> strings(new base::ListValue()); |
15 strings->Append(new base::StringValue("one")); | 17 strings->Append(new base::StringValue("one")); |
16 strings->Append(new base::StringValue("two")); | 18 strings->Append(new base::StringValue("two")); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 OnObjectFired::SomeObject object; | 64 OnObjectFired::SomeObject object; |
63 object.state = FIRST_STATE_BAR; | 65 object.state = FIRST_STATE_BAR; |
64 scoped_ptr<base::ListValue> results(OnObjectFired::Create(object)); | 66 scoped_ptr<base::ListValue> results(OnObjectFired::Create(object)); |
65 | 67 |
66 base::DictionaryValue expected; | 68 base::DictionaryValue expected; |
67 expected.SetString("state", "bar"); | 69 expected.SetString("state", "bar"); |
68 base::DictionaryValue* result = NULL; | 70 base::DictionaryValue* result = NULL; |
69 ASSERT_TRUE(results->GetDictionary(0, &result)); | 71 ASSERT_TRUE(results->GetDictionary(0, &result)); |
70 ASSERT_TRUE(result->Equals(&expected)); | 72 ASSERT_TRUE(result->Equals(&expected)); |
71 } | 73 } |
OLD | NEW |