• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3# found in the LICENSE file.
4
5import("../../../tools/bindings/mojom.gni")
6
7mojom("test_interfaces") {
8  testonly = true
9  sources = [
10    "math_calculator.mojom",
11    "no_module.mojom",
12    "ping_service.mojom",
13    "rect.mojom",
14    "regression_tests.mojom",
15    "sample_factory.mojom",
16    "sample_interfaces.mojom",
17    "sample_service.mojom",
18    "scoping.mojom",
19    "serialization_test_structs.mojom",
20    "test_bad_messages.mojom",
21    "test_constants.mojom",
22    "test_data_view.mojom",
23    "test_native_types.mojom",
24    "test_structs.mojom",
25    "test_sync_methods.mojom",
26    "validation_test_interfaces.mojom",
27  ]
28  public_deps = [
29    ":test_mojom_import",
30    ":test_mojom_import2",
31  ]
32}
33
34component("test_export_component") {
35  testonly = true
36  deps = [
37    ":test_export",
38  ]
39}
40
41if (!is_ios) {
42  component("test_export_blink_component") {
43    testonly = true
44    deps = [
45      ":test_export_blink",
46    ]
47  }
48}
49
50mojom("test_export") {
51  testonly = true
52  sources = [
53    "test_export.mojom",
54  ]
55  export_class_attribute = "MOJO_TEST_EXPORT"
56  export_define = "MOJO_TEST_IMPLEMENTATION=1"
57  export_header = "mojo/public/cpp/bindings/tests/mojo_test_export.h"
58  if (!is_ios) {
59    export_class_attribute_blink = "MOJO_TEST_BLINK_EXPORT"
60    export_define_blink = "MOJO_TEST_BLINK_IMPLEMENTATION=1"
61    export_header_blink =
62        "mojo/public/cpp/bindings/tests/mojo_test_blink_export.h"
63  }
64  visibility = [ ":test_export_component" ]
65  if (!is_ios) {
66    visibility_blink = [ ":test_export_blink_component" ]
67  }
68}
69
70mojom("test_exported_import") {
71  testonly = true
72  sources = [
73    "test_import.mojom",
74  ]
75  public_deps = [
76    ":test_export",
77  ]
78
79  overridden_deps = [ ":test_export" ]
80  component_deps = [ ":test_export_component" ]
81  if (!is_ios) {
82    overridden_deps_blink = [ ":test_export" ]
83    component_deps_blink = [ ":test_export_blink_component" ]
84  }
85}
86
87mojom("test_mojom_import") {
88  testonly = true
89  sources = [
90    "sample_import.mojom",
91  ]
92}
93
94mojom("test_mojom_import_wrapper") {
95  testonly = true
96  public_deps = [
97    ":test_mojom_import",
98  ]
99}
100
101mojom("test_mojom_import_wrapper_wrapper") {
102  testonly = true
103  public_deps = [
104    ":test_mojom_import_wrapper",
105  ]
106}
107
108mojom("test_mojom_import2") {
109  testonly = true
110  sources = [
111    "sample_import2.mojom",
112  ]
113  public_deps = [
114    ":test_mojom_import",
115    ":test_mojom_import_wrapper_wrapper",
116  ]
117}
118
119mojom("test_struct_traits_interfaces") {
120  testonly = true
121  sources = [
122    "struct_with_traits.mojom",
123  ]
124}
125
126mojom("test_interfaces_experimental") {
127  testonly = true
128  sources = [
129    "test_unions.mojom",
130  ]
131}
132
133mojom("test_associated_interfaces") {
134  # These files are not included in the test_interfaces target because
135  # associated interfaces are not supported by all bindings languages yet.
136  testonly = true
137  sources = [
138    "test_associated_interfaces.mojom",
139    "validation_test_associated_interfaces.mojom",
140  ]
141
142  public_deps = [
143    ":test_interfaces",
144  ]
145}
146
147mojom("versioning_test_service_interfaces") {
148  testonly = true
149  sources = [
150    "versioning_test_service.mojom",
151  ]
152}
153
154mojom("versioning_test_client_interfaces") {
155  testonly = true
156  sources = [
157    "versioning_test_client.mojom",
158  ]
159}
160
161mojom("test_wtf_types") {
162  testonly = true
163
164  sources = [
165    "test_wtf_types.mojom",
166  ]
167}
168
169mojom("test_no_sources") {
170  testonly = true
171
172  public_deps = [
173    ":test_interfaces",
174  ]
175}
176