blob: 724a9694d08205478c327e90e6a69e7674ea7673 [file] [log] [blame]
prashantv4025129e2015-04-21 21:54:221# Copyright 2015 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
slan7d09f9e2016-04-08 15:47:025import("//build/buildflag_header.gni")
slanca520532015-11-05 20:35:336import("//build/config/features.gni")
7import("//build/config/locales.gni")
mbjorge47b1c9b2016-09-20 22:23:038import("//build/config/sanitizers/sanitizers.gni")
slanca520532015-11-05 20:35:339import("//build/config/ui.gni")
slan87db9d12015-10-05 20:37:3810import("//chromecast/build/tests/cast_test.gni")
prashantv4025129e2015-04-21 21:54:2211import("//chromecast/chromecast.gni")
slan25bb71f22016-01-06 21:23:5512import("//media/media_options.gni")
slan0c9838b2015-08-05 18:37:4013import("//tools/grit/repack.gni")
14import("//ui/ozone/ozone.gni")
machenbachd65ec5c2016-07-22 09:05:2315import("//v8/gni/v8.gni")
prashantv4025129e2015-04-21 21:54:2216
slan074ec342016-01-29 23:52:2617if (is_android) {
18 import("//build/config/android/rules.gni")
19}
20
halliwell5240d4d2016-04-22 14:34:3221config("playready_config") {
22 if (use_playready) {
slan62afce42015-11-13 22:53:5823 defines = [ "PLAYREADY_CDM_AVAILABLE" ]
prashantv4025129e2015-04-21 21:54:2224 }
25}
26
slan87db9d12015-10-05 20:37:3827# A list of all public test() binaries. This is an organizational target that
28# cannot be depended upon or built directly. Build cast_group_test_list instead.
29cast_test_group("cast_tests") {
mbjorgeb64c791f2016-09-20 18:04:5630 filters = []
slan87db9d12015-10-05 20:37:3831 tests = [
32 "//base:base_unittests",
slanf48fe872015-06-23 19:41:5233 "//chromecast/base:cast_base_unittests",
kmackayfa656b092016-02-04 23:23:5434 "//chromecast/base/component:cast_component_unittests",
gunsch5ed6d7d2015-08-31 22:56:1935 "//chromecast/crypto:cast_crypto_unittests",
sanfin2de00582017-02-09 19:24:4036 "//chromecast/media:cast_media_unittests",
mbjorgec83cce952016-07-27 02:40:3137 "//chromecast/system/reboot:cast_reboot_unittests",
slan87db9d12015-10-05 20:37:3838 "//content/test:content_unittests",
39 "//crypto:crypto_unittests",
slan87db9d12015-10-05 20:37:3840 "//media:media_unittests",
41 "//media/midi:midi_unittests",
42 "//net:net_unittests",
slan87db9d12015-10-05 20:37:3843 "//sandbox/linux:sandbox_linux_unittests",
44 "//sql:sql_unittests",
pwnall1e6964dbe2016-10-11 18:15:4745 "//storage/browser:storage_unittests",
slan87db9d12015-10-05 20:37:3846 "//third_party/cacheinvalidation:cacheinvalidation_unittests",
47 "//ui/base:ui_base_unittests",
slanf48fe872015-06-23 19:41:5248 ]
slan87db9d12015-10-05 20:37:3849
mbjorgeb64c791f2016-09-20 18:04:5650 if (!is_cast_audio_only) {
51 tests += [ "//gpu:gpu_unittests" ]
jlevasseurff442c02017-01-30 17:19:4052
53 if (use_aura) {
54 tests += [ "//chromecast/graphics:cast_graphics_unittests" ]
55 }
mbjorgeb64c791f2016-09-20 18:04:5656 }
57
sanfin09990de52015-11-16 19:08:1958 if (is_linux) {
59 tests += [ "//chromecast/crash:cast_crash_unittests" ]
60 }
61
mbjorgeb64c791f2016-09-20 18:04:5662 if (!is_android && use_alsa) {
63 tests += [ "//chromecast/media/cma/backend/alsa:cast_alsa_cma_backend_unittests" ]
64 }
slan87db9d12015-10-05 20:37:3865
mbjorgeb64c791f2016-09-20 18:04:5666 if (!is_android) {
67 tests += [
alokpe3bd5ed2016-11-16 15:57:1068 ":cast_shell_browsertests",
69 ":cast_shell_unittests",
mbjorgeb64c791f2016-09-20 18:04:5670 "//ipc:ipc_tests",
71 "//jingle:jingle_unittests",
72 "//url:url_unittests",
73 ]
slan87db9d12015-10-05 20:37:3874
mbjorgeb64c791f2016-09-20 18:04:5675 cast_media_unittests_filter = {
76 test_name = "cast_media_unittests"
77
78 # --test-launcher-jobs=1 => so internal code can bind to port
79 args = [ "--test-launcher-jobs=1" ]
80 }
81 filters += [ cast_media_unittests_filter ]
82
alokpe3bd5ed2016-11-16 15:57:1083 cast_shell_browsertests_filter = {
84 test_name = "cast_shell_browsertests"
mbjorgeb64c791f2016-09-20 18:04:5685
86 # --enable-local-file-accesses => to load sample media files
87 # --test-launcher-jobs=1 => so internal code can bind to port
88 args = [
89 "--no-sandbox",
90 "--enable-local-file-accesses",
mbjorgeb64c791f2016-09-20 18:04:5691 "--test-launcher-jobs=1",
92 ]
kmackay96fd40e2017-01-04 19:27:3293 if (is_cast_audio_only) {
94 args += [ "--ozone-platform=headless" ]
95 } else {
96 args += [ "--ozone-platform=cast" ]
97 }
mbjorgeb64c791f2016-09-20 18:04:5698 if (!is_cast_desktop_build) {
99 args += [ "--use-gpu-in-tests" ]
mbjorgee37679292016-12-13 23:53:06100
101 # TODO(derekjchow): Make these tests pass on Chromecast devices.
102 # Once all of the CastMediaBlockerTest.* have been un-DISABLEd and
103 # are running successfully, revisit these tests and see if they pass
104 # on devices. (crbug/665118, internal b/32023194)
105 gtest_excludes = [
106 "CastMediaBlockerBrowserTest.Video_BlockUnblock",
107 "CastMediaBlockerBrowserTest.Audio_BlockUnblock",
108 ]
mbjorgedea0ad02017-03-16 23:29:36109
110 # TODO(mbjorge): The ReusedRenderer test is failing on v1 and cast audio
111 # devices. Temporarily disable them as part of an effort_to re-green
112 # the unittests. Current failures (2017-03-15) are being disabled to get
113 # back to a green state. Re-enable once the tests have been fixed.
114 # Limitations in the build mean this unfortunately is getting disabled
115 # across all devices, even though it is only failing on some.
116 # b/36238710, b/36239051, hotlist/461351
117 gtest_excludes += [ "RendererPrelauncherTest.ReusedRenderer" ]
mbjorgeb64c791f2016-09-20 18:04:56118 }
mbjorge61cec502017-03-16 00:28:31119
120 # TODO(mbjorge): Temporarily disable AudioPlaybackWavPcm because it is
121 # failing on device. As part of an effort to re-green the unittests,
122 # current (2017-03-15) failures are being disabled to get back to a
123 # green state. Re-enable once the tests have been fixed.
124 # b/36239152, hotlist/461351
125 if (enable_assistant && !is_cast_desktop_build) {
126 gtest_excludes += [ "CastNavigationBrowserTest.AudioPlaybackWavPcm" ]
127 }
mbjorgeb64c791f2016-09-20 18:04:56128 }
alokpe3bd5ed2016-11-16 15:57:10129 filters += [ cast_shell_browsertests_filter ]
mbjorgeb64c791f2016-09-20 18:04:56130
131 ipc_tests_filter = {
132 test_name = "ipc_tests"
133
134 # --test-launcher-jobs=1 => so internal code can bind to port
135 args = [ "--test-launcher-jobs=1" ]
136 }
137 filters += [ ipc_tests_filter ]
138
139 url_unittests_filter = {
140 test_name = "url_unittests"
141
142 if (target_os == "linux" && !is_cast_desktop_build) {
143 # DoAppendUTF8Invalid fails because of dcheck_always_on flag in Eng builds
144 gtest_excludes = [ "URLCanonTest.DoAppendUTF8Invalid" ]
145 }
146 }
147 filters += [ url_unittests_filter ]
148 }
149
150 base_unittests_filter = {
151 test_name = "base_unittests"
152 if (target_os == "linux" && !is_cast_desktop_build) {
153 # Disable ProcessMetricsTest.GetNumberOfThreads (b/15610509)
154 # Disable ProcessUtilTest.* (need to define OS_ANDROID)
155 # Disable StackContainer.BufferAlignment (don't support 16-byte alignment)
156 # Disable SystemMetrics2Test.GetSystemMemoryInfo (buffers>0 can't be guaranteed)
mbjorgeb51704e2017-02-14 01:11:25157 # Disable TimeFormattingTest.TimeFormat* for flakiness on devices (crbug/671429)
mbjorgeb64c791f2016-09-20 18:04:56158 gtest_excludes = [
159 "ProcessMetricsTest.GetNumberOfThreads",
160 "ProcessUtilTest.*",
161 "StackContainer.BufferAlignment",
162 "SystemMetrics2Test.GetSystemMemoryInfo",
mbjorgeb51704e2017-02-14 01:11:25163 "TimeFormattingTest.TimeFormat*",
mbjorgeb64c791f2016-09-20 18:04:56164 ]
165
166 if (is_cast_audio_only) {
167 # Also disable TimeFormattingTest on audio-only builds, since we don't
168 # include the necessary info in icudtl.dat.
169 gtest_excludes += [ "TimeFormattingTest.*" ]
170 }
171 }
172 }
173 filters += [ base_unittests_filter ]
174
175 content_unittests_filter = {
176 test_name = "content_unittests"
mbjorge9a7b1892017-04-06 01:55:46177
178 # IsSupportedVideoConfig_VP9TransferFunctions fails on all cast builds since
179 # the cast IsSupporedVideoConfigs ignore the transfer function parameter.
180 # (b/36984215).
181 gtest_excludes = [ "*.IsSupportedVideoConfig_VP9TransferFunctions" ]
mbjorgeb64c791f2016-09-20 18:04:56182 if (target_os == "linux" && !is_cast_desktop_build) {
slan87db9d12015-10-05 20:37:38183 # DesktopCaptureDeviceTest.*: No capture device on Eureka
184 # Disable PepperGamepadHostTest.WaitForReply (pepper not supported on Eureka)
185 # Disable GpuDataManagerImplPrivateTest.SetGLStrings and
186 # RenderWidgetHostTest.Background because we disable the blacklist to enable WebGL (b/16142554)
bshaya27e79282016-12-09 23:41:16187 gtest_excludes += [
mbjorgeb64c791f2016-09-20 18:04:56188 "DOMStorageDatabaseTest.TestCanOpenAndReadWebCoreDatabase",
189 "DesktopCaptureDeviceTest.Capture",
190 "GamepadProviderTest.PollingAccess",
191 "GpuDataManagerImplPrivateTest.SetGLStrings",
192 "PepperGamepadHostTest.WaitForReply",
193 "RenderWidgetHostTest.Background",
194 ]
195 }
bshaya27e79282016-12-09 23:41:16196 if (is_cast_audio_only) {
197 # No way to display URL's on audio only cast devices.
198 gtest_excludes += [ "NavigationEntryTest.NavigationEntryURLs" ]
199 }
mbjorgeb64c791f2016-09-20 18:04:56200 }
201 filters += [ content_unittests_filter ]
slan87db9d12015-10-05 20:37:38202
mbjorgeb64c791f2016-09-20 18:04:56203 media_unittests_filter = {
204 test_name = "media_unittests"
205 if (target_os == "linux" && !is_cast_desktop_build) {
slan87db9d12015-10-05 20:37:38206 # Disable VP9 related tests (b/18593324)
207 # PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM
208 # PipelineIntegrationTest.BasicPlayback_VideoOnly_VP9_WebM
209 # PipelineIntegrationTest.BasicPlayback_VP9*
210 # PipelineIntegrationTest.P444_VP9_WebM
211 # Disable VP8A tests (b/18593324)
212 # PipelineIntegrationTest.BasicPlayback_VP8A*
213 # Disable OpusAudioDecoderTest/AudioDecoderTest.ProduceAudioSamples/0 (unit
214 # test fails when Opus decoder uses fixed-point)
215 # Due to b/16456550, disable the following four test cases:
216 # AudioOutputControllerTest.PlayDivertSwitchDeviceRevertClose
217 # AudioOutputControllerTest.PlaySwitchDeviceClose
218 # AudioStreamHandlerTest.Play
219 # SoundsManagerTest.Play
220 # Disable AudioStreamHandlerTest.ConsecutivePlayRequests (b/16539293)
mbjorgeb64c791f2016-09-20 18:04:56221 gtest_excludes = [
222 "AudioOutputControllerTest.PlayDivertSwitchDeviceRevertClose",
223 "AudioOutputControllerTest.PlaySwitchDeviceClose",
224 "AudioStreamHandlerTest.Play",
225 "AudioStreamHandlerTest.ConsecutivePlayRequests",
226 "PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM",
227 "PipelineIntegrationTest.BasicPlayback_VideoOnly_VP9_WebM",
228 "PipelineIntegrationTest.BasicPlayback_VP9*",
229 "PipelineIntegrationTest.P444_VP9_WebM",
230 "PipelineIntegrationTest.BasicPlayback_VP8A*",
231 "OpusAudioDecoderTest/AudioDecoderTest.ProduceAudioSamples/0",
232 "SoundsManagerTest.Play",
233 ]
234 } else if (target_os == "android" || is_cast_desktop_build) {
235 # Disable PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM (not supported)
236 gtest_excludes =
237 [ "PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM" ]
almasrymina93bf2752016-06-29 20:40:57238 }
mbjorgeb64c791f2016-09-20 18:04:56239 }
240 filters += [ media_unittests_filter ]
241
242 net_unittests_filter = {
243 test_name = "net_unittests"
mbjorgef3f79af2016-10-14 00:13:04244 if (using_sanitizer) {
245 # TODO(mbjorge): net_unittests do not complete when run with sanitizers,
246 # (in particular, TSAN and UBSAN), resulting in build machines getting stuck
247 # for many hours. Disable them for now, since these are getting run on
248 # Chromium bots anyway. (internal b/31279943)
249 gtest_excludes = [ "*" ]
250 } else if (target_os == "linux" && !is_cast_desktop_build) {
mbjorgeb64c791f2016-09-20 18:04:56251 # Run net_unittests first to avoid random failures due to slow python startup
mbjorgeb64c791f2016-09-20 18:04:56252 # URLRequestTestHTTP.GetTest_ManyCookies takes roughly 55s to run. Increase
253 # timeout to 90s from 45s to allow it to pass (b/19821476)
254 # ProxyScriptFetcherImplTest.HttpMimeType is flaking (b/19848784)
derekjchowac29ce32016-12-06 17:11:59255 # Running a batch of net_unittests has high overhead. Run tests in batches of 50 to reduce number of batches (b/23156294).
rsleevi5d916f6c2016-12-21 22:39:41256 gtest_excludes = [ "ProxyScriptFetcherImplTest.HttpMimeType" ]
mbjorgeb64c791f2016-09-20 18:04:56257 args = [
258 "--test-launcher-timeout=90000",
derekjchowac29ce32016-12-06 17:11:59259 "--test-launcher-batch-limit=50",
mbjorgeb64c791f2016-09-20 18:04:56260 ]
261 } else if (is_cast_desktop_build || target_os == "android") {
mbjorge1641c3f2016-06-17 18:39:47262 # URLRequestTestHTTP.GetTest_ManyCookies takes roughly 55s to run. Increase
263 # timeout to 90s from 45s to allow it to pass (b/19821476) (b/29415636).
264 # CTLogVerifierTest.VerifiesValidConsistencyProofsFromReferenceGenerator
265 # times out occasionally, paricularly on the CQ bots; disable to reduce
266 # CQ flakiness (crbug/598406) (b/29415636).
267 # Running a batch of net_unittests has high overhead, so
268 # run tests in batches of 25 to reduce number of batches (b/23156294).
mbjorgeb64c791f2016-09-20 18:04:56269 gtest_excludes = [ "CTLogVerifierTest.VerifiesValidConsistencyProofsFromReferenceGenerator" ]
270 args = [
271 "--test-launcher-timeout=90000",
272 "--test-launcher-batch-limit=25",
273 ]
slan25bb71f22016-01-06 21:23:55274 }
slan87db9d12015-10-05 20:37:38275 }
mbjorgeb64c791f2016-09-20 18:04:56276 filters += [ net_unittests_filter ]
slan87db9d12015-10-05 20:37:38277}
278
279# Creates the build and run lists for all test targets.
280cast_test_group_list("cast_test_lists") {
281 build_list_path = "$root_out_dir/tests/build_test_list.txt"
mbjorge3ca202d2017-01-19 23:19:31282 runtime_deps_path = "$root_out_dir/tests/runtime_deps.json"
slan87db9d12015-10-05 20:37:38283 run_list_path = "$root_out_dir/tests/run_test_list.txt"
284
mbjorge697d8ae152016-06-21 03:48:57285 additional_options = [ "--ozone-platform=headless --test-launcher-bot-mode" ]
slan87db9d12015-10-05 20:37:38286
287 build_tests = true
288
289 test_groups = [ ":cast_tests" ]
290
291 if (chromecast_branding != "public") {
292 test_groups += [ "//chromecast/internal:internal_cast_tests" ]
293 }
slanf48fe872015-06-23 19:41:52294}
slan0c9838b2015-08-05 18:37:40295
sanfin23024072016-06-18 01:02:06296if (is_android) {
297 cast_test_group("cast_junit_tests") {
298 test_type = "junit"
299 tests = [
300 "//base:base_junit_tests",
301 "//content/public/android:content_junit_tests",
302 "//net/android:net_junit_tests",
303 "//testing/android/junit:junit_unit_tests",
304 "//ui/android:ui_junit_tests",
305 ]
306 }
307
308 cast_test_group_list("cast_junit_test_lists") {
309 test_type = "junit"
310 build_list_path = "$root_out_dir/junit/build_junit_test_list.txt"
mbjorge3ca202d2017-01-19 23:19:31311 runtime_deps_path = "$root_out_dir/junit/runtime_deps.json"
sanfin23024072016-06-18 01:02:06312 run_list_path = "$root_out_dir/junit/run_junit_test_list.txt"
313 build_tests = true
314 test_groups = [ ":cast_junit_tests" ]
315 }
316}
317
alokpe3bd5ed2016-11-16 15:57:10318test("cast_shell_unittests") {
319 deps = [
320 ":cast_shell_lib",
321 "//chromecast/app:test_support",
322 "//chromecast/app:unittests",
323 "//chromecast/browser:unittests",
derekjchow3a461eeb2017-01-10 19:03:33324 "//ui/gl:test_support",
alokpe3bd5ed2016-11-16 15:57:10325 ]
326}
327
328test("cast_shell_browsertests") {
329 deps = [
330 ":cast_shell_lib",
331 "//chromecast/app:test_support",
332 "//chromecast/browser:browsertests",
333 ]
mbjorgeffa03d802017-02-22 21:52:47334
335 data_deps = [
336 ":chromecast_locales_pak",
337 ]
alokpe3bd5ed2016-11-16 15:57:10338}
339
alokpcd91e6032016-11-10 22:13:07340group("cast_shell_lib") {
mbjorge095af3442016-11-16 02:41:46341 data_deps = [
342 ":cast_shell_pak",
343 ]
344
slan0c9838b2015-08-05 18:37:40345 deps = [
slan0c9838b2015-08-05 18:37:40346 "//chromecast/app",
347 "//chromecast/browser",
348 "//chromecast/common",
slan0c9838b2015-08-05 18:37:40349 "//chromecast/renderer",
350 ]
slan0c9838b2015-08-05 18:37:40351
alokpcd91e6032016-11-10 22:13:07352 if (chromecast_branding != "public") {
353 deps += [ "//chromecast/internal/shell" ]
354 }
slan0c9838b2015-08-05 18:37:40355}
356
357executable("cast_shell") {
358 sources = [
359 "app/cast_main.cc",
360 ]
361
362 deps = [
alokpcd91e6032016-11-10 22:13:07363 ":cast_shell_lib",
alokpcd91e6032016-11-10 22:13:07364 ":chromecast_locales_pak",
brettwba7a73d2015-08-31 22:17:39365 "//build/config/sanitizers:deps",
slan0c9838b2015-08-05 18:37:40366 "//chromecast/app",
367 "//content/public/app:both",
368 ]
slan0c9838b2015-08-05 18:37:40369}
370
371repack("cast_shell_pak") {
372 sources = [
373 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
374 "$root_gen_dir/blink/public/resources/blink_resources.pak",
375 "$root_gen_dir/chromecast/app/shell_resources.pak",
rockot97597152016-10-03 06:27:38376 "$root_gen_dir/chromecast/browser/cast_browser_resources.pak",
slan0c9838b2015-08-05 18:37:40377 "$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
378 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
379 "$root_gen_dir/content/content_resources.pak",
380 "$root_gen_dir/net/net_resources.pak",
381 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
382 "$root_gen_dir/ui/resources/webui_resources.pak",
383 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
384 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
385 ]
386
slan0c9838b2015-08-05 18:37:40387 output = "$root_out_dir/assets/cast_shell.pak"
388
389 deps = [
390 "//chromecast/app:resources",
rockot97597152016-10-03 06:27:38391 "//chromecast/browser:resources",
slan0c9838b2015-08-05 18:37:40392 "//content:resources",
393 "//content/app/resources",
394 "//content/app/strings",
395 "//net:net_resources",
slan0c9838b2015-08-05 18:37:40396 "//third_party/WebKit/public:image_resources_grit",
agrieved7a71c882015-11-20 19:53:28397 "//third_party/WebKit/public:resources",
slan0c9838b2015-08-05 18:37:40398 "//ui/resources",
399 "//ui/strings",
400 ]
401
slan9ccf3592015-09-10 19:40:33402 if (chromecast_branding != "public") {
slan65a12682016-02-10 01:24:39403 sources += [ "$root_gen_dir/chromecast/internal/cast_shell_internal.pak" ]
slan9ccf3592015-09-10 19:40:33404
slan65a12682016-02-10 01:24:39405 deps += [ "//chromecast/internal:cast_shell_internal_pak" ]
slan0c9838b2015-08-05 18:37:40406 }
407}
slanca520532015-11-05 20:35:33408
slan5c5624b2017-03-23 20:24:14409# Intermediate targets that repack grit resources by locale. For each locale
410# in |locales_with_fake_bidi| (see //build/config/locales.gni), all resources
411# are packed into a single .pak file in an output directory. These targets
412# should not be depended on directly; depend on ":chromecast_locales_pak"
413# instead.
414foreach(locale, locales_with_fake_bidi) {
415 repack("_cast_repack_${locale}") {
416 visibility = [ ":chromecast_locales_pak" ]
417 output = "$root_out_dir/chromecast_locales/${locale}.pak"
418 sources = [
419 "$root_gen_dir/chromecast/app/chromecast_settings_${locale}.pak",
420 ]
421 deps = [
422 "//chromecast/app:chromecast_settings",
423 ]
slanca520532015-11-05 20:35:33424
slan5c5624b2017-03-23 20:24:14425 if (chromecast_branding != "public") {
426 sources += [ "$root_gen_dir/chromecast/internal/webui/app_strings_${locale}.pak" ]
427 deps += [ "//chromecast/internal/webui:chromecast_app_strings" ]
slanca520532015-11-05 20:35:33428
gfhuang79ceb4f2016-09-07 06:43:03429 if (enable_chromecast_webui) {
slan5c5624b2017-03-23 20:24:14430 sources += [ "$root_gen_dir/chromecast/internal/webui/webui_localized_${locale}.pak" ]
431 deps += [ "//chromecast/internal/webui:chromecast_webui_localized" ]
gfhuang79ceb4f2016-09-07 06:43:03432 }
slanca520532015-11-05 20:35:33433 }
slanca520532015-11-05 20:35:33434 }
slan5c5624b2017-03-23 20:24:14435}
slanca520532015-11-05 20:35:33436
slan5c5624b2017-03-23 20:24:14437# A meta-target which repacks resources by locale.
438group("chromecast_locales_pak") {
439 deps = []
440 foreach(locale, locales_with_fake_bidi) {
441 deps += [ ":_cast_repack_${locale}" ]
gfhuang79ceb4f2016-09-07 06:43:03442 }
slanca520532015-11-05 20:35:33443}
slan074ec342016-01-29 23:52:26444
slan7d09f9e2016-04-08 15:47:02445buildflag_header("chromecast_features") {
446 header = "chromecast_features.h"
tsunghung38c960952017-03-16 18:23:00447 flags = [
448 "IS_CAST_AUDIO_ONLY=$is_cast_audio_only",
449 "IS_CAST_USING_CMA_BACKEND=$is_cast_using_cma_backend",
450 ]
slan7d09f9e2016-04-08 15:47:02451}
452
slan074ec342016-01-29 23:52:26453if (is_android) {
slan074ec342016-01-29 23:52:26454 android_assets("cast_shell_apk_assets") {
455 assert(v8_use_external_startup_data)
456
457 sources = [
458 "$root_out_dir/assets/cast_shell.pak",
459 ]
460
461 deps = [
462 ":cast_shell_pak",
463 "//third_party/icu:icu_assets",
464 "//v8:v8_external_startup_data_assets",
465 ]
sanfin52f72e82016-04-13 22:36:05466 disable_compression = true
slan074ec342016-01-29 23:52:26467 }
468
slan074ec342016-01-29 23:52:26469 android_apk("cast_shell_apk") {
470 apk_name = "CastShell"
471 android_manifest = "$root_gen_dir/cast_shell_manifest/AndroidManifest.xml"
472 android_manifest_dep = "//chromecast/browser/android:cast_shell_manifest"
yucliu5c1cc482016-12-01 20:35:10473
474 shared_libraries = [ "//chromecast/android:libcast_shell_android" ]
475
slan074ec342016-01-29 23:52:26476 deps = [
477 ":cast_shell_apk_assets",
yucliu5c1cc482016-12-01 20:35:10478 "//base:base_java",
slan074ec342016-01-29 23:52:26479 "//chromecast/android:libcast_shell_android",
480 "//chromecast/browser/android:cast_shell_java",
481 ]
482 }
483}