| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//build/json_schema_api.gni") | 6 import("//build/json_schema_api.gni") |
| 7 import("//extensions/features/features.gni") |
| 7 import("//tools/json_schema_compiler/json_features.gni") | 8 import("//tools/json_schema_compiler/json_features.gni") |
| 8 | 9 |
| 10 assert(enable_extensions) |
| 11 |
| 9 json_schema_api("api") { | 12 json_schema_api("api") { |
| 10 visibility = [ ":*" ] | 13 visibility = [ ":*" ] |
| 11 | 14 |
| 12 sources = [ | 15 sources = [ |
| 13 "additional_properties.json", | 16 "additional_properties.json", |
| 14 "any.json", | 17 "any.json", |
| 15 "arrays.json", | 18 "arrays.json", |
| 16 "callbacks.json", | 19 "callbacks.json", |
| 17 "choices.json", | 20 "choices.json", |
| 18 "crossref.json", | 21 "crossref.json", |
| 19 "enums.json", | 22 "enums.json", |
| 20 "error_generation.json", | 23 "error_generation.json", |
| 21 "functions_as_parameters.json", | 24 "functions_as_parameters.json", |
| 22 "functions_on_types.json", | 25 "functions_on_types.json", |
| 23 "idl_basics.idl", | 26 "idl_basics.idl", |
| 24 "idl_object_types.idl", | 27 "idl_object_types.idl", |
| 25 "idl_other_namespace.idl", | 28 "idl_other_namespace.idl", |
| 26 "idl_other_namespace_sub_namespace.idl", | 29 "idl_other_namespace_sub_namespace.idl", |
| 27 "objects.json", | 30 "objects.json", |
| 28 "objects_movable.idl", | 31 "objects_movable.idl", |
| 29 "objects_movable_json.json", | 32 "objects_movable_json.json", |
| 30 "simple_api.json", | 33 "simple_api.json", |
| 31 ] | 34 ] |
| 32 | 35 |
| 33 schemas = true | 36 schemas = true |
| 34 root_namespace = "test::api::%(namespace)s" | 37 root_namespace = "test::api::%(namespace)s" |
| 38 |
| 39 deps = [ |
| 40 "//extensions/features", |
| 41 ] |
| 35 } | 42 } |
| 36 | 43 |
| 37 if (enable_extensions) { | 44 json_features("features_compiler_test") { |
| 38 json_features("features_compiler_test") { | 45 feature_class = "APIFeature" |
| 39 feature_class = "APIFeature" | 46 provider_class = "CompilerTestFeatureProvider" |
| 40 provider_class = "CompilerTestFeatureProvider" | 47 sources = [ |
| 41 sources = [ | 48 "features_test.json", |
| 42 "features_test.json", | 49 "features_test2.json", |
| 43 "features_test2.json", | 50 ] |
| 44 ] | |
| 45 } | |
| 46 } | 51 } |
| 47 | 52 |
| 48 source_set("schema_test") { | 53 source_set("unit_tests") { |
| 49 testonly = true | 54 testonly = true |
| 50 sources = [ | 55 sources = [ |
| 56 "additional_properties_unittest.cc", |
| 57 "any_unittest.cc", |
| 58 "arrays_unittest.cc", |
| 59 "callbacks_unittest.cc", |
| 60 "choices_unittest.cc", |
| 61 "crossref_unittest.cc", |
| 62 "enums_unittest.cc", |
| 63 "error_generation_unittest.cc", |
| 64 "functions_as_parameters_unittest.cc", |
| 65 "functions_on_types_unittest.cc", |
| 66 "idl_schemas_unittest.cc", |
| 67 "objects_unittest.cc", |
| 68 "simple_api_unittest.cc", |
| 51 "test_util.cc", | 69 "test_util.cc", |
| 52 "test_util.h", | 70 "test_util.h", |
| 53 ] | 71 ] |
| 54 | 72 |
| 55 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 73 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 56 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 74 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 57 | 75 |
| 58 public_deps = [ | 76 public_deps = [ |
| 77 ":features_compiler_test", |
| 78 ] |
| 79 |
| 80 deps = [ |
| 59 ":api", | 81 ":api", |
| 60 "//base", | 82 "//base", |
| 83 "//testing/gtest", |
| 61 ] | 84 ] |
| 62 } | 85 } |
| 63 | |
| 64 if (enable_extensions) { | |
| 65 source_set("features_generation_test") { | |
| 66 testonly = true | |
| 67 public_deps = [ | |
| 68 ":features_compiler_test", | |
| 69 ] | |
| 70 } | |
| 71 } | |
| OLD | NEW |