OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 source_set("json_schema") { | 5 source_set("json_schema") { |
6 sources = [ | 6 sources = [ |
7 "json_schema_constants.cc", | 7 "json_schema_constants.cc", |
8 "json_schema_constants.h", | 8 "json_schema_constants.h", |
9 "json_schema_validator.cc", | 9 "json_schema_validator.cc", |
10 "json_schema_validator.h", | 10 "json_schema_validator.h", |
11 ] | 11 ] |
12 | 12 |
13 deps = [ | 13 deps = [ |
14 "//base", | 14 "//base", |
15 "//third_party/re2", | 15 "//third_party/re2", |
16 ] | 16 ] |
17 } | 17 } |
18 | 18 |
| 19 bundle_data("unit_tests_bundle_data") { |
| 20 visibility = [ ":unit_tests" ] |
| 21 testonly = true |
| 22 sources = [ |
| 23 "//components/test/data/json_schema/array_tuple_schema.json", |
| 24 "//components/test/data/json_schema/choices_schema.json", |
| 25 "//components/test/data/json_schema/complex_instance.json", |
| 26 "//components/test/data/json_schema/complex_schema.json", |
| 27 "//components/test/data/json_schema/enum_schema.json", |
| 28 "//components/test/data/json_schema/pattern_properties_dot.json", |
| 29 "//components/test/data/json_schema/reference_types.json", |
| 30 ] |
| 31 outputs = [ |
| 32 "{{bundle_resources_dir}}/" + |
| 33 "{{source_root_relative_dir}}/{{source_file_part}}", |
| 34 ] |
| 35 } |
| 36 |
19 source_set("unit_tests") { | 37 source_set("unit_tests") { |
20 testonly = true | 38 testonly = true |
21 sources = [ | 39 sources = [ |
22 "json_schema_validator_unittest.cc", | 40 "json_schema_validator_unittest.cc", |
23 "json_schema_validator_unittest_base.cc", | 41 "json_schema_validator_unittest_base.cc", |
24 "json_schema_validator_unittest_base.h", | 42 "json_schema_validator_unittest_base.h", |
25 ] | 43 ] |
26 deps = [ | 44 deps = [ |
27 ":json_schema", | 45 ":json_schema", |
| 46 ":unit_tests_bundle_data", |
28 "//base", | 47 "//base", |
29 "//testing/gtest", | 48 "//testing/gtest", |
30 ] | 49 ] |
31 } | 50 } |
OLD | NEW |