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 import("//media/media_options.gni") | 5 import("//media/media_options.gni") |
6 import("//services/catalog/public/tools/catalog.gni") | 6 import("//services/catalog/public/tools/catalog.gni") |
7 import("//services/service_manager/public/cpp/service.gni") | 7 import("//services/service_manager/public/cpp/service.gni") |
8 import("//services/service_manager/public/service_manifest.gni") | 8 import("//services/service_manager/public/service_manifest.gni") |
| 9 import("//services/service_manager/public/tools/test/service_test.gni") |
9 import("//testing/test.gni") | 10 import("//testing/test.gni") |
10 | 11 |
11 config("mojo_media_config") { | 12 config("mojo_media_config") { |
12 if (!enable_mojo_media) { | 13 if (!enable_mojo_media) { |
13 assert(mojo_media_services == [], "Mojo media is not enabled") | 14 assert(mojo_media_services == [], "Mojo media is not enabled") |
14 assert(mojo_media_host == "none", "Mojo media is not enabled") | 15 assert(mojo_media_host == "none", "Mojo media is not enabled") |
15 assert(!enable_test_mojo_media_client, "Mojo media is not enabled") | 16 assert(!enable_test_mojo_media_client, "Mojo media is not enabled") |
16 } else { | 17 } else { |
17 defines = [ "ENABLE_MOJO_MEDIA" ] | 18 defines = [ "ENABLE_MOJO_MEDIA" ] |
18 | 19 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 156 |
156 data_deps = [ | 157 data_deps = [ |
157 ":media_manifest", | 158 ":media_manifest", |
158 ] | 159 ] |
159 } | 160 } |
160 | 161 |
161 # crbug.com/676055: media_service_unittests currently fails to link in Windows | 162 # crbug.com/676055: media_service_unittests currently fails to link in Windows |
162 # component builds, so don't declare it, otherwise the "all" target will still | 163 # component builds, so don't declare it, otherwise the "all" target will still |
163 # try to build it. | 164 # try to build it. |
164 if (!(is_win && is_component_build)) { | 165 if (!(is_win && is_component_build)) { |
165 test("media_service_unittests") { | 166 service_test("media_service_unittests") { |
166 testonly = true | 167 testonly = true |
167 | 168 |
168 sources = [ | 169 sources = [ |
169 "media_service_unittest.cc", | 170 "media_service_unittest.cc", |
170 "run_all_unittests.cc", | |
171 ] | 171 ] |
172 | 172 |
| 173 catalog = ":media_service_unittests_catalog" |
| 174 |
173 deps = [ | 175 deps = [ |
174 "//base", | 176 "//base", |
175 "//base/test:test_support", | |
176 "//media", | 177 "//media", |
177 "//media/base:test_support", | 178 "//media/base:test_support", |
178 "//media/mojo/clients", | 179 "//media/mojo/clients", |
179 "//media/mojo/common", | 180 "//media/mojo/common", |
180 "//media/mojo/interfaces", | 181 "//media/mojo/interfaces", |
181 "//mojo/edk/system", | |
182 "//services/catalog:lib", | |
183 "//services/service_manager/public/cpp:service_test_support", | 182 "//services/service_manager/public/cpp:service_test_support", |
184 "//testing/gmock", | 183 "//testing/gmock", |
185 "//testing/gtest", | 184 "//testing/gtest", |
186 ] | 185 ] |
187 | 186 |
188 data_deps = [ | 187 data_deps = [ |
189 ":media", | 188 ":media", |
190 ":media_service_unittests_catalog_copy", | |
191 ] | 189 ] |
192 } | 190 } |
193 } # !(is_win && is_component_build) | 191 } # !(is_win && is_component_build) |
194 | 192 |
195 service_manifest("media_manifest") { | 193 service_manifest("media_manifest") { |
196 name = "media" | 194 name = "media" |
197 source = "media_manifest.json" | 195 source = "media_manifest.json" |
198 } | 196 } |
199 | 197 |
200 service_manifest("test_manifest") { | 198 service_manifest("test_manifest") { |
(...skipping 17 matching lines...) Expand all Loading... |
218 | 216 |
219 service_manifest("pipeline_test_manifest") { | 217 service_manifest("pipeline_test_manifest") { |
220 name = "media_pipeline_integration_unittests" | 218 name = "media_pipeline_integration_unittests" |
221 source = "pipeline_test_manifest.json" | 219 source = "pipeline_test_manifest.json" |
222 } | 220 } |
223 | 221 |
224 catalog("media_service_unittests_catalog") { | 222 catalog("media_service_unittests_catalog") { |
225 embedded_services = [ ":test_manifest" ] | 223 embedded_services = [ ":test_manifest" ] |
226 standalone_services = [ ":media_manifest" ] | 224 standalone_services = [ ":media_manifest" ] |
227 } | 225 } |
228 | |
229 copy("media_service_unittests_catalog_copy") { | |
230 sources = get_target_outputs(":media_service_unittests_catalog") | |
231 outputs = [ | |
232 "${root_out_dir}/media_service_unittests_catalog.json", | |
233 ] | |
234 deps = [ | |
235 ":media_service_unittests_catalog", | |
236 ] | |
237 } | |
OLD | NEW |