| 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/simple_api.h" | 5 #include "tools/json_schema_compiler/test/simple_api.h" |
| 6 #include "tools/json_schema_compiler/test/crossref.h" | 6 #include "tools/json_schema_compiler/test/crossref.h" |
| 7 | 7 |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 using namespace test::api::crossref; | 10 using namespace test::api::crossref; |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 static scoped_ptr<base::DictionaryValue> CreateTestTypeDictionary() { | 14 static scoped_ptr<base::DictionaryValue> CreateTestTypeDictionary() { |
| 15 base::DictionaryValue* value(new base::DictionaryValue()); | 15 base::DictionaryValue* value(new base::DictionaryValue()); |
| 16 value->SetWithoutPathExpansion("number", base::Value::CreateDoubleValue(1.1)); | 16 value->SetWithoutPathExpansion("number", new base::FundamentalValue(1.1)); |
| 17 value->SetWithoutPathExpansion("integer", base::Value::CreateIntegerValue(4)); | 17 value->SetWithoutPathExpansion("integer", base::Value::CreateIntegerValue(4)); |
| 18 value->SetWithoutPathExpansion("string", | 18 value->SetWithoutPathExpansion("string", |
| 19 base::Value::CreateStringValue("bling")); | 19 base::Value::CreateStringValue("bling")); |
| 20 value->SetWithoutPathExpansion("boolean", | 20 value->SetWithoutPathExpansion("boolean", |
| 21 base::Value::CreateBooleanValue(true)); | 21 base::Value::CreateBooleanValue(true)); |
| 22 return scoped_ptr<base::DictionaryValue>(value); | 22 return scoped_ptr<base::DictionaryValue>(value); |
| 23 } | 23 } |
| 24 | 24 |
| 25 } // namespace | 25 } // namespace |
| 26 | 26 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 scoped_ptr<base::ListValue> params_value(new base::ListValue()); | 115 scoped_ptr<base::ListValue> params_value(new base::ListValue()); |
| 116 scoped_ptr<base::DictionaryValue> param_object_value( | 116 scoped_ptr<base::DictionaryValue> param_object_value( |
| 117 new base::DictionaryValue()); | 117 new base::DictionaryValue()); |
| 118 param_object_value->Set("testType", CreateTestTypeDictionary().release()); | 118 param_object_value->Set("testType", CreateTestTypeDictionary().release()); |
| 119 params_value->Append(param_object_value.release()); | 119 params_value->Append(param_object_value.release()); |
| 120 scoped_ptr<TestTypeInObject::Params> params( | 120 scoped_ptr<TestTypeInObject::Params> params( |
| 121 TestTypeInObject::Params::Create(*params_value)); | 121 TestTypeInObject::Params::Create(*params_value)); |
| 122 EXPECT_FALSE(params.get()); | 122 EXPECT_FALSE(params.get()); |
| 123 } | 123 } |
| 124 } | 124 } |
| OLD | NEW |