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/callbacks.h" | 5 #include "tools/json_schema_compiler/test/callbacks.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 using namespace test::api::callbacks; | 9 using namespace test::api::callbacks; |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 TEST(JsonSchemaCompilerCallbacksTest, ReturnsMultipleResultCreate) { | 24 TEST(JsonSchemaCompilerCallbacksTest, ReturnsMultipleResultCreate) { |
25 ReturnsMultiple::Results::SomeObject some_object; | 25 ReturnsMultiple::Results::SomeObject some_object; |
26 some_object.state = ReturnsMultiple::Results::SomeObject::STATE_FOO; | 26 some_object.state = ReturnsMultiple::Results::SomeObject::STATE_FOO; |
27 scoped_ptr<base::ListValue> results = | 27 scoped_ptr<base::ListValue> results = |
28 ReturnsMultiple::Results::Create(5, some_object); | 28 ReturnsMultiple::Results::Create(5, some_object); |
29 | 29 |
30 base::DictionaryValue* expected_dict = new base::DictionaryValue(); | 30 base::DictionaryValue* expected_dict = new base::DictionaryValue(); |
31 expected_dict->SetString("state", "foo"); | 31 expected_dict->SetString("state", "foo"); |
32 base::ListValue expected; | 32 base::ListValue expected; |
33 expected.Append(base::Value::CreateIntegerValue(5)); | 33 expected.Append(new base::FundamentalValue(5)); |
34 expected.Append(expected_dict); | 34 expected.Append(expected_dict); |
35 EXPECT_TRUE(results->Equals(&expected)); | 35 EXPECT_TRUE(results->Equals(&expected)); |
36 } | 36 } |
OLD | NEW |