BUILD.gn 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784
  1. # Copyright 2013 The Chromium Authors
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. # This is the root build file for GN. GN will start processing by loading this
  5. # file, and recursively load all dependencies until all dependencies are either
  6. # resolved or known not to exist (which will cause the build to fail). So if
  7. # you add a new build file, there must be some path of dependencies from this
  8. # file to your new one or GN won't know about it.
  9. import("//build/config/chromeos/ui_mode.gni")
  10. import("//build/config/compiler/compiler.gni")
  11. import("//build/config/dcheck_always_on.gni")
  12. import("//build/config/features.gni")
  13. import("//build/config/rust.gni")
  14. import("//build/config/sanitizers/sanitizers.gni")
  15. import("//build/config/ui.gni")
  16. import("//build/gn_logs.gni")
  17. import("//build/util/generate_wrapper.gni")
  18. import("//chrome/browser/buildflags.gni")
  19. import("//components/nacl/features.gni")
  20. import("//device/vr/buildflags/buildflags.gni")
  21. import("//extensions/buildflags/buildflags.gni")
  22. import("//gpu/vulkan/features.gni")
  23. import("//media/gpu/args.gni")
  24. import("//media/media_options.gni")
  25. import("//pdf/features.gni")
  26. import("//ppapi/buildflags/buildflags.gni")
  27. import("//printing/buildflags/buildflags.gni")
  28. import("//remoting/remoting_enable.gni")
  29. import("//third_party/closure_compiler/compile_js.gni")
  30. import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
  31. import("//ui/base/ui_features.gni")
  32. import("//ui/gl/features.gni")
  33. import("//v8/gni/v8.gni")
  34. if (is_android) {
  35. import("//build/config/android/config.gni")
  36. }
  37. if (is_fuchsia) {
  38. import("//build/config/fuchsia/generate_runner_scripts.gni")
  39. import("//third_party/fuchsia-sdk/sdk/build/component.gni")
  40. import("//third_party/fuchsia-sdk/sdk/build/package.gni")
  41. }
  42. if (is_linux) {
  43. import("build/config/linux/gtk/gtk.gni")
  44. }
  45. if (!is_ios) {
  46. import("//v8/gni/snapshot_toolchain.gni")
  47. }
  48. declare_args() {
  49. # A list of extra dependencies to add to the root target. This allows a
  50. # checkout to add additional targets without explicitly changing any checked-
  51. # in files.
  52. root_extra_deps = []
  53. }
  54. if (is_official_build) {
  55. # An official (maximally optimized!) component (optimized for build times)
  56. # build doesn't make sense and usually doesn't work.
  57. assert(!is_component_build)
  58. }
  59. # This file defines the following two main targets:
  60. #
  61. # "gn_all" is used to create explicit dependencies from the root BUILD.gn to
  62. # each top-level component that we wish to include when building everything via
  63. # "all". This is required since the set of targets built by "all" is determined
  64. # automatically based on reachability from the root BUILD.gn (for details, see
  65. # crbug.com/503241). Builders should typically use "all", or list targets
  66. # explicitly, rather than relying on "gn_all".
  67. #
  68. # "gn_visibility": targets that are normally not visible to top-level targets,
  69. # but are built anyway by "all". Since we don't want any such targets, we have
  70. # this placeholder to make sure hidden targets that aren't otherwise depended
  71. # on yet are accounted for.
  72. group("gn_all") {
  73. testonly = true
  74. deps = [
  75. ":gn_visibility",
  76. "//base:base_perftests",
  77. "//base:base_unittests",
  78. "//codelabs",
  79. "//components:components_unittests",
  80. "//components/gwp_asan:gwp_asan_unittests",
  81. "//infra/orchestrator:orchestrator_all",
  82. "//net:net_unittests",
  83. "//sandbox:sandbox_unittests",
  84. "//services:services_unittests",
  85. "//services/service_manager/public/cpp",
  86. "//skia:skia_unittests",
  87. "//sql:sql_unittests",
  88. "//third_party/angle/src/tests:angle_end2end_tests",
  89. "//third_party/angle/src/tests:angle_unittests",
  90. "//third_party/angle/src/tests:angle_white_box_tests",
  91. "//third_party/flatbuffers:flatbuffers_unittests",
  92. "//third_party/liburlpattern:liburlpattern_unittests",
  93. "//tools/binary_size:binary_size_trybot_py",
  94. "//tools/ipc_fuzzer:ipc_fuzzer_all",
  95. "//tools/metrics:metrics_metadata",
  96. "//ui/base:ui_base_unittests",
  97. "//ui/color:color_unittests",
  98. "//ui/gfx:gfx_unittests",
  99. "//url:url_unittests",
  100. ]
  101. if (!is_component_build) {
  102. deps += [ "//third_party/abseil-cpp:absl_tests" ]
  103. }
  104. if (enable_js_type_check) {
  105. deps += [ ":webui_closure_compile" ]
  106. }
  107. if (!is_android && !is_castos) {
  108. deps += [
  109. "//crypto:crypto_unittests",
  110. "//google_apis/gcm:gcm_unit_tests",
  111. ]
  112. }
  113. if (!is_ios && !is_android && !is_castos) {
  114. deps += [
  115. "//content/nw:nwjs",
  116. "//chrome",
  117. "//chrome/browser/ui/color:dump_colors",
  118. "//chrome/test:browser_tests",
  119. "//chrome/test:interactive_ui_tests",
  120. "//chrome/test:sync_integration_tests",
  121. "//components/subresource_filter/tools:subresource_filter_tools",
  122. "//components/zucchini:zucchini",
  123. "//components/zucchini:zucchini_unittests",
  124. "//gpu/gles2_conform_support:gles2_conform_test",
  125. "//gpu/khronos_glcts_support:khronos_glcts_test",
  126. "//net:hpack_example_generator",
  127. "//third_party/vulkan-deps/spirv-tools/src:SPIRV-Tools",
  128. "//tools/aggregation_service:aggregation_service_tool",
  129. "//tools/attribution_reporting:attribution_reporting_simulator",
  130. "//tools/perf/clear_system_cache",
  131. "//tools/polymer:polymer_tools_python_unittests",
  132. "//tools/privacy_budget:privacy_budget_tools",
  133. "//ui/accessibility:accessibility_perftests",
  134. "//ui/accessibility:accessibility_unittests",
  135. "//ui/accessibility/extensions:extension_tests",
  136. "//ui/accessibility/extensions:extensions",
  137. ]
  138. }
  139. if (!is_castos) {
  140. deps += [
  141. "//chrome/installer",
  142. "//chrome/updater",
  143. ]
  144. }
  145. if (enable_ppapi) {
  146. deps += [
  147. "//ppapi:ppapi_unittests",
  148. "//ppapi/examples",
  149. ]
  150. }
  151. if (is_chromeos_lacros) {
  152. deps += [
  153. "//chrome/test:lacros_chrome_browsertests",
  154. "//chrome/test:lacros_chrome_unittests",
  155. ]
  156. }
  157. if (!is_ios && !is_castos) {
  158. deps += [ "//chrome/test:unit_tests" ]
  159. }
  160. if (!is_ios) {
  161. deps += [
  162. ":chromedriver",
  163. "//cc:cc_unittests",
  164. "//components:components_browsertests",
  165. "//components/policy:policy_templates",
  166. "//components/url_formatter/tools:format_url",
  167. "//components/viz:viz_perftests",
  168. "//components/viz:viz_unittests",
  169. "//content/shell:content_shell",
  170. "//content/test:content_browsertests",
  171. "//content/test:content_unittests",
  172. "//device:device_unittests",
  173. "//gpu:gpu_benchmark",
  174. "//gpu:gpu_unittests",
  175. "//ipc:ipc_tests",
  176. "//media:media_unittests",
  177. "//media/capture:capture_unittests",
  178. "//media/midi:midi_unittests",
  179. "//media/mojo:media_mojo_unittests",
  180. "//mojo",
  181. "//mojo:mojo_unittests",
  182. "//net:net_perftests",
  183. "//storage:storage_unittests",
  184. "//third_party/blink/common:blink_common_unittests",
  185. "//third_party/blink/renderer/controller:blink_unittests",
  186. "//third_party/blink/renderer/platform:blink_platform_unittests",
  187. "//third_party/blink/renderer/platform/heap:blink_heap_unittests",
  188. "//third_party/blink/renderer/platform/wtf:wtf_unittests",
  189. "//third_party/libjingle_xmpp:libjingle_xmpp_unittests",
  190. "//tools/imagediff",
  191. "//ui/display:display_unittests",
  192. "//ui/events:events_unittests",
  193. "//ui/gl:gl_unittests",
  194. "//ui/latency:latency_unittests",
  195. "//ui/native_theme:native_theme_unittests",
  196. "//ui/touch_selection:ui_touch_selection_unittests",
  197. "//url/ipc:url_ipc_unittests",
  198. "//v8:gn_all",
  199. ]
  200. }
  201. if (is_win || is_linux || is_android) {
  202. deps += [
  203. "//weblayer/shell:weblayer_shell",
  204. "//weblayer/test:weblayer_browsertests",
  205. "//weblayer/test:weblayer_unittests",
  206. ]
  207. if (is_android) {
  208. deps += [
  209. "//weblayer/browser/android/javatests:weblayer_instrumentation_test_apk",
  210. "//weblayer/browser/java:weblayer_junit_tests",
  211. ]
  212. }
  213. }
  214. if (false && !is_ios && !is_android) {
  215. deps += [
  216. "//components/cronet:cronet_tests",
  217. "//components/cronet:cronet_unittests",
  218. "//components/viz/demo:viz_demo",
  219. ]
  220. }
  221. if (!is_ios) {
  222. deps += [
  223. "//google_apis/gcm:mcs_probe",
  224. "//media/cast:cast_unittests",
  225. "//third_party/catapult/telemetry:bitmaptools($host_toolchain)",
  226. ]
  227. if (!is_android) {
  228. if (!is_castos) {
  229. deps += [ "//chrome/test:telemetry_perf_unittests" ]
  230. }
  231. } else {
  232. import("//tools/perf/chrome_telemetry_build/android_browser_types.gni")
  233. foreach(_target_suffix, telemetry_android_browser_target_suffixes) {
  234. deps += [ "//chrome/test:telemetry_perf_unittests${_target_suffix}" ]
  235. }
  236. }
  237. } else {
  238. deps += [
  239. "//ios:all",
  240. "//third_party/crashpad/crashpad:crashpad_tests",
  241. ]
  242. }
  243. if (is_fuchsia) {
  244. # Add targets that only exist on Fuchsia.
  245. deps += [
  246. ":d8_fuchsia",
  247. "//build/fuchsia/cipd",
  248. "//chrome/app:chrome_fuchsia",
  249. "//fuchsia_web:gn_all",
  250. "//tools/fuchsia/size_tests:fuchsia_sizes",
  251. # Ensure this target continues to build.
  252. "//chromecast/bindings:bindings_manager_fuchsia",
  253. ]
  254. }
  255. deps += root_extra_deps
  256. if (enable_basic_printing) {
  257. deps += [ "//printing:printing_unittests" ]
  258. }
  259. if (enable_extensions) {
  260. deps += [
  261. "//extensions:extensions_browsertests",
  262. "//extensions:extensions_unittests",
  263. "//extensions/browser/api/declarative_net_request/filter_list_converter",
  264. "//extensions/shell:app_shell_unittests",
  265. ]
  266. }
  267. if (enable_pdf) {
  268. deps += [
  269. "//pdf/pdfium/fuzzers",
  270. "//third_party/pdfium/samples:pdfium_test",
  271. ]
  272. }
  273. if (enable_remoting) {
  274. deps += [ "//remoting:remoting_all" ]
  275. }
  276. if (toolkit_views) {
  277. deps += [
  278. "//ui/views:views_unittests",
  279. "//ui/views/examples:views_examples",
  280. "//ui/views/examples:views_examples_unittests",
  281. "//ui/views/examples:views_examples_with_content",
  282. ]
  283. }
  284. if (use_aura) {
  285. deps += [
  286. "//ui/aura:aura_demo",
  287. "//ui/aura:aura_unittests",
  288. "//ui/webui/examples:webui_examples",
  289. "//ui/wm:wm_unittests",
  290. ]
  291. }
  292. if (use_ozone) {
  293. deps += [
  294. "//ui/ozone",
  295. "//ui/ozone:unittests",
  296. ]
  297. if (!is_fuchsia) {
  298. deps += [ "//ui/ozone/demo" ]
  299. }
  300. }
  301. if (is_win) {
  302. deps += [
  303. "//chrome/credential_provider",
  304. "//chrome/credential_provider/test:gcp_unittests",
  305. ]
  306. }
  307. if (is_win || is_linux) {
  308. deps += [ "//tools/traffic_annotation/auditor:traffic_annotation_auditor" ]
  309. }
  310. if (is_mac) {
  311. deps += [
  312. "//chrome/installer/gcapi_mac:gcapi_example",
  313. "//tools/mac/power:all",
  314. ]
  315. }
  316. # Allow building md5sum tool for other OSes (android is added below).
  317. # For Windows, see: crbug.com/1090428.
  318. # TODO(cavalcantii): move it out of 'android' folder.
  319. if (!is_win) {
  320. deps += [ "//tools/android/md5sum" ]
  321. }
  322. if (is_android) {
  323. deps += [
  324. "//android_webview/js_sandbox/javatests:webview_js_sandbox_test_app",
  325. "//base:base_junit_tests",
  326. "//base/android/jni_generator:jni_generator_tests",
  327. "//base/android/linker:chromium_android_linker",
  328. "//build/android/gyp/test:hello_world",
  329. "//build/android/stacktrace:java_deobfuscate",
  330. "//build/config/android/test/proto:test_build_protos",
  331. "//chrome/android/monochrome:monochrome_public_apk_checker",
  332. "//chrome/android/webapk/shell_apk:maps_go_webapk",
  333. "//chrome/android/webapk/shell_apk:webapk",
  334. "//chrome/android/webapk/shell_apk/prepare_upload_dir:prepare_webapk_shell_upload_dir",
  335. "//chrome/test:android_browsertests",
  336. "//components:components_junit_tests",
  337. "//content/public/android:content_junit_tests",
  338. "//content/shell/android:content_shell_apk",
  339. "//device:device_junit_tests",
  340. "//media/gpu:video_decode_accelerator_unittest",
  341. "//net/android:net_junit_tests",
  342. "//services:services_junit_tests",
  343. "//testing/android/junit:junit_unit_tests",
  344. "//third_party/android_build_tools/lint:custom_lint_java",
  345. "//third_party/catapult/devil",
  346. "//third_party/r8:custom_d8_java",
  347. "//tools/android:android_tools",
  348. "//tools/android:memconsumer",
  349. "//tools/android:push_apps_to_background",
  350. "//tools/android/audio_focus_grabber:audio_focus_grabber_apk",
  351. "//tools/android/customtabs_benchmark:customtabs_benchmark_apk",
  352. "//tools/android/kerberos/SpnegoAuthenticator:spnego_authenticator_apk",
  353. "//ui/android:ui_junit_tests",
  354. "//weblayer/public/java:client_aar",
  355. "//weblayer/shell/android:weblayer_shell_apk",
  356. "//weblayer/shell/android:weblayer_support_apk",
  357. ]
  358. deps -= [
  359. "//net:net_perftests",
  360. "//url:url_unittests",
  361. ]
  362. if (!is_component_build) {
  363. deps += [
  364. "//components/cronet/android:cronet_package_android",
  365. "//components/cronet/android:cronet_perf_test_apk",
  366. "//components/cronet/android:cronet_sample_apk",
  367. "//components/cronet/android:cronet_sample_test_apk",
  368. "//components/cronet/android:cronet_test_instrumentation_apk",
  369. "//components/cronet/android:cronet_unittests_android",
  370. ]
  371. }
  372. if (!is_cast_android) {
  373. deps += [
  374. "//android_webview:empty_group",
  375. "//android_webview/test",
  376. "//android_webview/tools/automated_ui_tests:webview_ui_test_app",
  377. "//android_webview/tools/system_webview_shell",
  378. "//chrome/android:chrome_junit_tests",
  379. "//chrome/android:chrome_public_apk",
  380. "//chrome/android:chrome_public_test_apk",
  381. "//chrome/android:chrome_public_unit_test_apk",
  382. "//chrome/browser/android/examples/custom_tabs_client:custom_tabs_client_example_apk",
  383. "//chrome/browser/android/examples/partner_browser_customizations_provider:partner_browser_customizations_example_apk",
  384. "//content/shell/android:content_shell_test_apk",
  385. ]
  386. }
  387. if (enable_chrome_android_internal) {
  388. deps += [ "//clank" ]
  389. }
  390. }
  391. # NOTE: The following should really be 'is_android', but the fuzzing build
  392. # seems currently broken for this platform at the moment, and the
  393. # corresponding code build and works on Linux unmodified.
  394. # See instructions in the corresponding BUILD.gn.
  395. if (is_linux || is_chromeos) {
  396. deps +=
  397. [ "//third_party/android_crazy_linker:android_crazy_linker_zip_fuzzer" ]
  398. }
  399. if (is_linux || is_chromeos) {
  400. # This is only used by ChromeOS, but we want maximal fuzzer coverage, so
  401. # run it under linux too.
  402. deps += [
  403. "//third_party/minizip:minizip_compress_fuzzer",
  404. "//third_party/minizip:minizip_uncompress_fuzzer",
  405. ]
  406. }
  407. if (is_linux || is_chromeos || is_android) {
  408. deps += [
  409. "//third_party/breakpad:breakpad_unittests",
  410. "//third_party/breakpad:core-2-minidump",
  411. "//third_party/breakpad:generate_test_dump",
  412. "//third_party/breakpad:minidump-2-core",
  413. "//tools/dump_process_memory:dump_process",
  414. ]
  415. }
  416. if (is_linux || is_chromeos || is_android || is_mac) {
  417. deps += [ "//tools/memory/partition_allocator:all" ]
  418. }
  419. if (is_chromeos_ash) {
  420. deps += [
  421. "//ash:ash_unittests",
  422. "//ash/components:ash_components_unittests",
  423. "//ash/components/proximity_auth:proximity_auth_unittests",
  424. "//ash/keyboard/ui:keyboard_unittests",
  425. "//ash/webui:ash_webui_unittests",
  426. "//chrome/browser/metrics/perf:profile_provider_unittest",
  427. "//chrome/test:ash_crosapi_browsertests",
  428. "//chrome/test:usage_time_limit_unittests",
  429. "//chromeos/components:chromeos_components_unittests",
  430. "//components/exo/wayland:wayland_client_compatibility_tests",
  431. "//components/session_manager/core",
  432. "//third_party/shell-encryption:shell_encryption_unittests",
  433. "//tools/traffic_annotation/auditor:traffic_annotation_auditor",
  434. "//ui/chromeos:ui_chromeos_unittests",
  435. ]
  436. }
  437. if (is_chromeos) {
  438. deps += [ "//chromeos:chromeos_unittests" ]
  439. }
  440. if (is_chromeos_ash || is_mac || is_win) {
  441. deps += [
  442. "//rlz:rlz_id",
  443. "//rlz:rlz_lib",
  444. "//rlz:rlz_unittests",
  445. ]
  446. }
  447. if (is_linux || is_chromeos) {
  448. # The following are definitely linux-only.
  449. deps += [
  450. "//net:disk_cache_memory_test",
  451. "//net:quic_client",
  452. "//net:quic_server",
  453. "//sandbox/linux:chrome_sandbox",
  454. "//sandbox/linux:sandbox_linux_unittests",
  455. ]
  456. if (!is_clang) {
  457. deps += [ "//testing:empty_main" ]
  458. }
  459. if (!is_castos) {
  460. deps += [ "//chrome:xdg_mime" ]
  461. }
  462. if (use_dbus) {
  463. deps += [
  464. "//dbus:dbus_test_server",
  465. "//dbus:dbus_unittests",
  466. ]
  467. }
  468. if (is_chrome_branded && is_official_build) {
  469. # TODO(dpranke): add the linux_dump_symbols flag?
  470. deps += [ "//chrome:linux_symbols" ]
  471. }
  472. }
  473. if (is_ios || is_win || is_linux || is_chromeos_lacros || is_fuchsia) {
  474. deps += [
  475. "//base:base_i18n_perftests",
  476. "//google_apis:google_apis_unittests",
  477. ]
  478. }
  479. if ((is_win || is_mac || is_linux || is_chromeos || is_fuchsia) &&
  480. (target_cpu == "x86" || target_cpu == "x64")) {
  481. deps += [
  482. "//third_party/swiftshader/src/Vulkan:icd_file",
  483. "//third_party/swiftshader/src/Vulkan:swiftshader_libvulkan",
  484. ]
  485. }
  486. # TODO(GYP): Figure out which of these should (and can) build
  487. # for Chrome OS and iOS.
  488. if (!is_chromeos_ash && !is_ios) {
  489. deps += [
  490. "//base:build_utf8_validator_tables",
  491. "//base:check_example",
  492. "//cc:cc_perftests",
  493. "//components:components_perftests",
  494. "//device:device_unittests",
  495. "//gin:gin_shell",
  496. "//gin:gin_unittests",
  497. "//gpu:command_buffer_perftests",
  498. "//gpu:gl_tests",
  499. "//gpu:gpu_perftests",
  500. "//ipc:ipc_perftests",
  501. "//media:media_perftests",
  502. "//net:dump_cache",
  503. "//third_party/libphonenumber:libphonenumber_unittests",
  504. "//ui/compositor:compositor_unittests",
  505. ]
  506. if (!is_android && !is_castos) {
  507. deps += [
  508. "//chrome/test:load_library_perf_tests",
  509. "//chrome/test:sync_performance_tests",
  510. ]
  511. }
  512. if (!is_android) {
  513. deps += [
  514. "//courgette:courgette",
  515. "//courgette:courgette_fuzz",
  516. "//courgette:courgette_minimal_tool",
  517. "//courgette:courgette_unittests",
  518. "//media/cast:generate_barcode_video",
  519. "//media/cast:generate_timecode_audio",
  520. "//net:crash_cache",
  521. "//net:net_watcher", # TODO(GYP): This should be conditional on
  522. # use_v8_in_net
  523. "//net:run_testserver",
  524. "//net:stress_cache",
  525. "//net:tld_cleanup",
  526. "//third_party/leveldatabase:env_chromium_unittests",
  527. "//third_party/libaddressinput:libaddressinput_unittests",
  528. ]
  529. }
  530. if (enable_extensions) {
  531. deps += [ "//extensions/shell:app_shell" ]
  532. }
  533. # TODO(https://crbug.com/1299021): Implement building these NaCl targets
  534. # as ARM32 when Chrome is built for ARM64 (for Linux/Chrome OS).
  535. if (enable_nacl && target_cpu != "arm64") {
  536. deps += [ "//components/nacl/loader:nacl_loader_unittests" ]
  537. if (is_linux || is_chromeos) {
  538. # TODO(dpranke): Figure out what platforms should actually have this.
  539. deps += [ "//components/nacl/loader:nacl_helper" ]
  540. }
  541. }
  542. if (media_use_ffmpeg && !is_android) {
  543. deps += [ "//media:ffmpeg_regression_tests" ]
  544. }
  545. }
  546. if (enable_ppapi) {
  547. deps += [
  548. "//ppapi:pepper_hash_for_uma",
  549. "//ppapi:ppapi_perftests",
  550. ]
  551. }
  552. if (is_android || is_linux || is_chromeos_lacros) {
  553. deps += [
  554. "//components/network_hints/browser",
  555. "//content/public/app",
  556. "//mojo:mojo_perftests",
  557. "//services/service_manager/public/cpp",
  558. "//testing/gmock:gmock_main",
  559. "//third_party/breakpad:dump_syms($host_toolchain)",
  560. "//third_party/breakpad:microdump_stackwalk($host_toolchain)",
  561. "//third_party/breakpad:minidump_dump($host_toolchain)",
  562. "//third_party/breakpad:minidump_stackwalk($host_toolchain)",
  563. ]
  564. }
  565. if (is_linux || is_chromeos_lacros) {
  566. deps += [
  567. "//gpu/khronos_glcts_support:khronos_glcts_test",
  568. "//media/cast:cast_benchmarks",
  569. "//media/cast:tap_proxy",
  570. "//skia:filter_fuzz_stub",
  571. "//skia:image_operations_bench",
  572. "//ui/snapshot:snapshot_unittests",
  573. ]
  574. if (!is_castos) {
  575. deps += [ "//chrome/test:chrome_app_unittests" ]
  576. }
  577. if (!is_debug && !is_component_build && !is_castos) {
  578. deps += [ "//chrome/tools/service_discovery_sniffer" ]
  579. }
  580. }
  581. if (ozone_platform_x11 && !is_castos && target_cpu != "arm") {
  582. deps += [ "//gpu/tools/compositor_model_bench" ]
  583. }
  584. if (is_mac) {
  585. deps += [
  586. "//third_party/breakpad:crash_inspector",
  587. "//third_party/breakpad:dump_syms",
  588. # The following are accessibility API tools.
  589. "//tools/accessibility/inspect:ax_dump_events",
  590. "//tools/accessibility/inspect:ax_dump_tree",
  591. ]
  592. deps -= [
  593. # Mojo in GN contains some things which are never compiled in GYP on Mac,
  594. # so compilation fails on Mac. They need porting.
  595. "//mojo",
  596. ]
  597. }
  598. if (is_win) {
  599. deps += [
  600. "//base:pe_image_test",
  601. "//chrome/chrome_cleaner",
  602. "//chrome/chrome_elf:chrome_elf_unittests",
  603. "//chrome/chrome_elf:dll_hash_main",
  604. "//chrome/elevation_service:elevation_service_unittests",
  605. "//chrome/install_static:install_static_unittests",
  606. "//chrome/installer/gcapi",
  607. "//chrome/installer/setup:setup_unittests",
  608. "//chrome/notification_helper:notification_helper_unittests",
  609. "//chrome/test:delayloads_unittests",
  610. "//components/wifi:wifi_test",
  611. "//components/zucchini",
  612. "//net:quic_client",
  613. "//net:quic_server",
  614. "//sandbox/win:sbox_integration_tests",
  615. "//sandbox/win:sbox_unittests",
  616. "//sandbox/win:sbox_validation_tests",
  617. "//testing/gtest:gtest_main",
  618. # The following two are accessibility API debugging tools.
  619. "//tools/accessibility/inspect:ax_dump_events",
  620. "//tools/accessibility/inspect:ax_dump_tree",
  621. "//tools/win/chromeexts:chromeexts",
  622. ]
  623. # TODO(thakis): Enable this in cross builds, https://crbug.com/799827
  624. if (!(is_component_build && is_debug && target_cpu == "x86") &&
  625. host_os == "win") {
  626. deps += [ "//chrome/test/mini_installer:mini_installer_tests" ]
  627. }
  628. } else if (!is_android && !is_ios && !is_fuchsia) {
  629. deps += [ "//third_party/breakpad:symupload($host_toolchain)" ]
  630. }
  631. if (is_cast_android || is_castos || (is_fuchsia && enable_cast_receiver)) {
  632. deps += [ "//chromecast:cast_test_lists" ]
  633. }
  634. if (is_cast_android || is_castos) {
  635. deps += [
  636. "//chromecast:cast_shell",
  637. "//chromecast/cast_core:core_runtime_simple",
  638. ]
  639. }
  640. if (is_mac || is_win || is_android || is_linux || is_chromeos) {
  641. deps += [
  642. "//third_party/crashpad/crashpad:crashpad_tests",
  643. "//third_party/crashpad/crashpad/handler:crashpad_handler",
  644. "//third_party/crashpad/crashpad/tools:crashpad_database_util",
  645. ]
  646. }
  647. if (enable_message_center) {
  648. deps += [ "//ui/message_center:message_center_unittests" ]
  649. }
  650. if (!is_android && !is_ios) {
  651. deps += [ "//content/browser/bluetooth/tools:bluetooth_metrics_hash" ]
  652. }
  653. if (is_win || is_linux || is_chromeos) {
  654. deps += [ "//mojo" ]
  655. }
  656. if (is_mac || is_linux || is_chromeos || is_android || is_fuchsia) {
  657. deps += [ "//third_party/perfetto:all" ]
  658. }
  659. if (is_win || is_mac || is_linux || is_chromeos) {
  660. deps += [ "//third_party/sqlite:sqlite_shell" ]
  661. }
  662. if ((is_linux && !is_castos) || is_chromeos_lacros || is_fuchsia) {
  663. # TODO(https://crbug.com/1329673): Figure out if this should be in gn_all
  664. # and how cross-platform this is.
  665. deps += [ "//components/services/filesystem:filesystem_service_unittests" ]
  666. }
  667. if ((is_linux && !is_castos) || is_chromeos_lacros) {
  668. # TODO(https://crbug.com/1329673): Figure out if any of these should be in
  669. # gn_all and figure out how cross-platform they are.
  670. deps += [
  671. "//chrome/installer/util:strings",
  672. "//chrome/tools/convert_dict",
  673. "//components/constrained_window:unit_tests",
  674. "//components/metrics:serialization",
  675. "//components/sessions:unit_tests",
  676. "//media/cast:udp_proxy",
  677. "//storage/browser:dump_file_system",
  678. "//third_party/angle:libANGLE",
  679. "//third_party/angle:libEGL",
  680. "//third_party/angle:libGLESv2",
  681. "//third_party/leveldatabase:leveldb_test_targets",
  682. "//third_party/libjpeg_turbo:simd",
  683. "//third_party/opus:opus_compare",
  684. "//third_party/opus:opus_demo",
  685. "//third_party/opus:test_opus_api",
  686. "//third_party/opus:test_opus_decode",
  687. "//third_party/opus:test_opus_encode",
  688. "//third_party/opus:test_opus_padding",
  689. "//ui/display/types",
  690. "//ui/shell_dialogs:shell_dialogs_unittests",
  691. ]
  692. if (target_cpu == "x86" || target_cpu == "x64") {
  693. if (!is_android) {
  694. deps += [ "//chrome/test:load_library_perf_tests" ]
  695. }
  696. deps += [ "//third_party/libjpeg_turbo:simd_asm" ]
  697. }
  698. if ((is_linux || is_chromeos) && current_toolchain == host_toolchain) {
  699. deps += [ "//v8:v8_shell" ]
  700. }
  701. }
  702. if ((is_linux && !is_castos) || is_chromeos ||
  703. ((is_win || is_mac) && use_libfuzzer)) {
  704. deps += [
  705. "//testing/libfuzzer/fuzzers",
  706. "//third_party/freetype-testing:fuzzers",
  707. "//third_party/grpc:fuzzers",
  708. "//third_party/icu/fuzzers",
  709. "//third_party/qcms:fuzzers",
  710. "//third_party/ukey2/fuzzers",
  711. "//third_party/zlib/contrib/tests/fuzzers",
  712. ]
  713. if (is_chromeos_ash) {
  714. deps += [ "//chrome/services/ipp_parser/public/cpp:fuzzers" ]
  715. }
  716. # TODO(crbug.com/906751): Get the libFuzzer tests working on Windows.
  717. # Disable them for now because they cause the Windows clang ToT builder to
  718. # fail.
  719. if (!is_win) {
  720. deps += [ "//testing/libfuzzer/tests:libfuzzer_tests" ]
  721. }
  722. }
  723. # TODO(https://crbug.com/1299021): Remove the special case for arm64.
  724. if (enable_nacl && target_cpu != "arm64") {
  725. deps += [ "//native_client_sdk/src:nacl_core_sdk" ]
  726. }
  727. if (((is_linux || is_chromeos) && use_ozone) || is_fuchsia) {
  728. deps += [
  729. "//headless:headless_non_renderer",
  730. "//headless:headless_tests",
  731. ]
  732. }
  733. if (enable_vr) {
  734. deps += [
  735. "//chrome/browser/vr:vr_common_perftests",
  736. "//chrome/browser/vr:vr_common_unittests",
  737. "//chrome/browser/vr:vr_pixeltests",
  738. ]
  739. if (!is_android) {
  740. deps += [ "//tools/perf/contrib/vr_benchmarks:vr_perf_tests" ]
  741. } else {
  742. deps += [ "//chrome/browser/android/vr:vr_android_unittests" ]
  743. import("//tools/perf/chrome_telemetry_build/android_browser_types.gni")
  744. foreach(_target_suffix, telemetry_android_browser_target_suffixes) {
  745. deps += [
  746. "//tools/perf/contrib/vr_benchmarks:vr_perf_tests${_target_suffix}",
  747. ]
  748. }
  749. }
  750. }
  751. if (use_atk) {
  752. deps += [
  753. "//tools/accessibility/inspect:ax_dump_events",
  754. "//tools/accessibility/inspect:ax_dump_tree",
  755. ]
  756. }
  757. if (build_dawn_tests) {
  758. deps += [
  759. "//third_party/dawn/src/dawn/fuzzers:fuzzers",
  760. "//third_party/dawn/src/dawn/tests:dawn_end2end_tests",
  761. "//third_party/dawn/src/dawn/tests:dawn_unittests",
  762. "//third_party/dawn/src/tint:tint_unittests",
  763. "//third_party/dawn/src/tint/fuzzers",
  764. ]
  765. }
  766. # PFFFT.
  767. deps += [
  768. "//third_party/pffft:fuzzers",
  769. "//third_party/pffft:pffft_benchmark",
  770. "//third_party/pffft:pffft_unittest",
  771. ]
  772. # Minimal binaries to exercise Rust toolchain.
  773. deps += [ ":rust_build_tests" ]
  774. # More Rust targets.
  775. if (toolchain_has_rust) {
  776. deps += [
  777. "//mojo/public/rust",
  778. "//mojo/public/rust:mojo_rust_tests",
  779. "//third_party/rust/autocxx/chromium_integration/tests",
  780. # TODO(crbug.com/1291994): Determine whether it makes sense to build/run
  781. # this even on Android. If not, remove this and figure out how to run it
  782. # only on desktop testers.
  783. "//tools/crates/gnrt:gnrt_unittests",
  784. "//tools/crates/gnrt($host_toolchain)",
  785. ]
  786. }
  787. if (enable_rust) {
  788. deps += [ "//testing/rust_gtest_interop:rust_gtest_interop_unittests" ]
  789. }
  790. }
  791. # This group and the following exist to give targets for the waterfall to refer to.
  792. group("rust_build_tests") {
  793. testonly = true
  794. deps = [ "//build/rust/tests" ]
  795. }
  796. group("rust_autocxx_tests") {
  797. testonly = true
  798. deps = [ "//third_party/rust/autocxx/chromium_integration/tests" ]
  799. }
  800. # TODO(https://crbug.com/1112776): ensure remoting is functional on Linux builds with
  801. # other than X11 Ozone backends.
  802. if (enable_remoting && ((is_linux && ozone_platform_x11) ||
  803. ((is_chromeos || is_win) && !use_ozone))) {
  804. # On CQ, run the Traffic Annotation Auditor when a change affects one of these
  805. # targets.
  806. group("traffic_annotation_auditor_dependencies") {
  807. deps = [
  808. "//chrome:chrome",
  809. "//remoting/client",
  810. "//remoting/host:host",
  811. "//tools/traffic_annotation/summary:annotations_xml",
  812. ]
  813. if (is_win) {
  814. deps += [ "//chrome/chrome_cleaner:shipped_binaries" ]
  815. }
  816. }
  817. }
  818. if (is_chromeos_ash) {
  819. group("traffic_annotation_auditor_dependencies") {
  820. deps = [
  821. "//chrome",
  822. "//chromeos",
  823. "//tools/traffic_annotation/summary:annotations_xml",
  824. ]
  825. }
  826. }
  827. if (is_android) {
  828. # On CQ, run the Traffic Annotation Auditor when a change affects one of these
  829. # targets.
  830. group("traffic_annotation_auditor_dependencies") {
  831. deps = [
  832. "//chrome/android:chrome_public_apk",
  833. "//tools/traffic_annotation/summary:annotations_xml",
  834. ]
  835. }
  836. }
  837. if (is_fuchsia) {
  838. # TODO(https://crbug.com/731217): This can't practically be in //v8 without
  839. # duplicating all the Fuchsia running infrastructure there.
  840. fuchsia_component("d8_component") {
  841. testonly = true
  842. manifest = "//v8/gni/v8.cml"
  843. data_deps = [ "//v8:d8" ]
  844. }
  845. fuchsia_package("d8_pkg") {
  846. testonly = true
  847. package_name = "d8"
  848. deps = [ ":d8_component" ]
  849. }
  850. fuchsia_package_installer("d8_fuchsia") {
  851. testonly = true
  852. package = ":d8_pkg"
  853. package_name = "d8"
  854. }
  855. }
  856. # TODO(GYP_GONE): Figure out if we really need this target or if there's
  857. # some better way to specify things.
  858. if (is_win) {
  859. group("chrome_official_builder_no_unittests") {
  860. deps = [
  861. "//chrome/common/win:eventlog_provider",
  862. "//chrome/credential_provider",
  863. "//chrome/installer/gcapi",
  864. "//chrome/installer/mini_installer",
  865. "//chrome/updater/win:updater_zip",
  866. "//components/policy:pack_policy_templates",
  867. "//components/zucchini",
  868. "//courgette",
  869. "//courgette:copy_courgette_binaries",
  870. "//third_party/hyphenation-patterns",
  871. "//tools/metrics:metrics_metadata",
  872. ]
  873. if (target_cpu == "x86") {
  874. if (is_clang) {
  875. deps += [ "//courgette(//build/toolchain/win:win_clang_x64)" ]
  876. } else {
  877. deps += [ "//courgette(//build/toolchain/win:x64)" ]
  878. }
  879. }
  880. if (is_chrome_branded) {
  881. deps += [ "//remoting/host:remoting_host_installation" ]
  882. }
  883. }
  884. group("chrome_official_builder") {
  885. testonly = true
  886. deps = [
  887. ":chrome_official_builder_no_unittests",
  888. "//base:base_unittests",
  889. "//chrome/test:browser_tests",
  890. "//ipc:ipc_tests",
  891. "//media:media_unittests",
  892. "//media/midi:midi_unittests",
  893. "//net:net_unittests",
  894. "//printing:printing_unittests",
  895. "//sql:sql_unittests",
  896. "//third_party/breakpad:symupload($host_toolchain)",
  897. "//ui/base:ui_base_unittests",
  898. "//ui/gfx:gfx_unittests",
  899. "//ui/touch_selection:ui_touch_selection_unittests",
  900. "//ui/views:views_unittests",
  901. "//url:url_unittests",
  902. ]
  903. }
  904. }
  905. if (is_chromeos_ash) {
  906. # This group is used to collect all targets used when verifying a new version
  907. # of Chrome for Chrome OS.
  908. group("chromiumos_preflight") {
  909. testonly = true
  910. data_deps = [
  911. "//chrome",
  912. "//chrome/test/chromedriver",
  913. "//components/chromeos_camera:jpeg_decode_accelerator_unittest",
  914. "//components/exo/wayland:wayland_client_integration_tests",
  915. "//components/exo/wayland:wayland_client_perftests",
  916. "//components/exo/wayland:wayland_client_tests",
  917. "//components/policy/test_support:fake_dmserver",
  918. "//media:media_unittests",
  919. "//media/capture:capture_unittests",
  920. "//sandbox/linux:chrome_sandbox",
  921. "//sandbox/linux:sandbox_linux_unittests",
  922. "//third_party/breakpad:minidump_stackwalk($host_toolchain)",
  923. "//third_party/dawn/src/dawn/tests:dawn_end2end_tests",
  924. "//third_party/dawn/src/dawn/tests:dawn_unittests",
  925. "//ui/ozone:ozone_integration_tests",
  926. # Blocked on https://github.com/catapult-project/catapult/issues/2297
  927. #"//third_party/catapult/telemetry:bitmaptools",
  928. "//tools/perf/clear_system_cache",
  929. "//ui/ozone/gl:ozone_gl_unittests",
  930. ]
  931. if (enable_plugins) {
  932. data_deps += [ "//ppapi/examples/video_decode" ]
  933. }
  934. if (use_v4l2_codec || use_vaapi) {
  935. data_deps += [
  936. "//components/chromeos_camera:jpeg_encode_accelerator_unittest",
  937. "//media/gpu:video_decode_accelerator_perf_tests",
  938. "//media/gpu:video_decode_accelerator_tests",
  939. "//media/gpu:video_encode_accelerator_perf_tests",
  940. "//media/gpu:video_encode_accelerator_tests",
  941. "//media/gpu/chromeos:image_processor_test",
  942. ]
  943. if (use_vaapi) {
  944. data_deps += [
  945. "//media/gpu/vaapi:decode_test",
  946. "//media/gpu/vaapi:vaapi_unittest",
  947. ]
  948. }
  949. if (use_v4l2_codec) {
  950. data_deps += [ "//media/gpu/v4l2:v4l2_stateless_decoder" ]
  951. }
  952. }
  953. }
  954. }
  955. group("gn_visibility") {
  956. deps = [
  957. "//build/config/sanitizers:options_sources",
  958. # "//third_party/pdfium:pdfium_embeddertests", # TODO(GYP): visibility?
  959. # "//third_party/pdfium:pdfium_unittests", # TODO(GYP): visibility?
  960. ]
  961. if (!is_ios) {
  962. deps += [ "//v8:postmortem-metadata" ]
  963. if (!v8_use_external_startup_data) {
  964. deps += [ "//v8:v8_snapshot" ]
  965. }
  966. }
  967. }
  968. if (!is_ios) {
  969. group("chromedriver") {
  970. testonly = true
  971. if (is_fuchsia || is_android) {
  972. # On Fuchsia and non-Cast Android, ChromeDriver runs on the host, not the
  973. # device.
  974. if (!is_cast_android) {
  975. deps = [ "//chrome/test/chromedriver:chromedriver($host_toolchain)" ]
  976. }
  977. if (is_android && !is_cast_android) {
  978. deps += [ "//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_apk" ]
  979. }
  980. } else if (!is_castos) {
  981. deps = [
  982. "//chrome/test/chromedriver:chromedriver",
  983. "//chrome/test/chromedriver:chromedriver_unittests",
  984. ]
  985. }
  986. }
  987. # This group includes all of the targets needed to build and test Blink,
  988. # including running web tests (see below). This target is defined here because
  989. # previously //third_party/WebKit, now //third_party/blink, couldn't depend on
  990. # //content/shell. This might not longer be true, see
  991. # https://crbug.com/1018659.
  992. group("blink_tests") {
  993. testonly = true
  994. deps = [
  995. ":blink_web_tests",
  996. ":blink_wpt_tests",
  997. "//third_party/blink/public:all_blink",
  998. ]
  999. }
  1000. # Web tests runner
  1001. # third_party/blink/tools/run_web_tests.py
  1002. group("run_web_tests") {
  1003. testonly = true
  1004. deps = [
  1005. ":blink_web_tests",
  1006. ":blink_wpt_tests",
  1007. ]
  1008. }
  1009. if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) {
  1010. # WPT Webdriver tests runner
  1011. # chrome/test/chromedriver/test/run_webdriver_tests.py
  1012. script_test("webdriver_wpt_tests") {
  1013. # The script is wrapped in testing/xvfb.py; the actual
  1014. # run_webdriver_tests.py script is passed as an arg in gn_isolate_map.pyl
  1015. script = "//testing/xvfb.py"
  1016. data = [
  1017. "//build/skia_gold_common/",
  1018. "//chrome/test/chromedriver/chrome_paths.py",
  1019. "//chrome/test/chromedriver/server/server.py",
  1020. "//chrome/test/chromedriver/test/run_webdriver_tests.py",
  1021. "//chrome/test/chromedriver/util.py",
  1022. "//third_party/blink/tools/blinkpy/",
  1023. "//third_party/blink/web_tests/external/wpt/webdriver/",
  1024. "//third_party/blink/web_tests/VirtualTestSuites",
  1025. "//third_party/blink/web_tests/WebDriverExpectations",
  1026. "//third_party/pywebsocket3/src/mod_pywebsocket/",
  1027. "//third_party/wpt_tools/",
  1028. ]
  1029. data_deps = [
  1030. "//chrome:chrome",
  1031. "//chrome/test/chromedriver",
  1032. "//testing:test_scripts_shared",
  1033. "//third_party/catapult/third_party/typ",
  1034. ]
  1035. if (is_win) {
  1036. data_deps += [ "//build/win:copy_cdb_to_output" ]
  1037. }
  1038. }
  1039. script_test("wpt_tests_isolate") {
  1040. script = "//third_party/blink/tools/run_wpt_tests.py"
  1041. data_deps = [
  1042. "//chrome:chrome",
  1043. "//chrome/test/chromedriver",
  1044. "//third_party/blink/tools:wpt_tests_isolate",
  1045. ]
  1046. }
  1047. script_test("wpt_tests_isolate_content_shell") {
  1048. script = "//third_party/blink/tools/run_wpt_tests.py"
  1049. args = [ "--product=content_shell" ]
  1050. data_deps = [
  1051. ":blink_web_tests_support_data",
  1052. "//third_party/blink/tools:wpt_tests_isolate",
  1053. ]
  1054. }
  1055. }
  1056. group("blink_web_tests_support_data") {
  1057. testonly = true
  1058. data_deps = [
  1059. ":layout_test_data_mojo_bindings",
  1060. ":layout_test_data_mojo_bindings_lite",
  1061. "//content/shell:content_shell",
  1062. "//content/test:mojo_bindings_web_test_mojom_js_data_deps",
  1063. "//content/test:mojo_web_test_bindings_js_data_deps",
  1064. "//device/bluetooth/public/mojom:fake_bluetooth_interfaces_js_data_deps",
  1065. "//device/vr/public/mojom:vr_service_js_data_deps",
  1066. "//media/capture/mojom:image_capture_js_data_deps",
  1067. "//media/midi:mojo_js_data_deps",
  1068. "//mojo/public/interfaces/bindings/tests:test_data_deps",
  1069. "//mojo/public/js/ts/bindings/tests:test_interfaces_js_data_deps",
  1070. "//mojo/public/mojom/base:base_js_data_deps",
  1071. "//services/device/public/mojom:generic_sensor_js_data_deps",
  1072. "//services/device/public/mojom:mojom_js_data_deps",
  1073. "//services/device/public/mojom:usb_js_data_deps",
  1074. "//services/shape_detection/public/mojom:mojom_js_data_deps",
  1075. "//skia/public/mojom:mojom_js_data_deps",
  1076. "//testing/buildbot/filters:blink_web_tests_filter",
  1077. "//third_party/blink/public:blink_devtools_frontend_resources_files",
  1078. "//third_party/blink/public:blink_devtools_inspector_resources",
  1079. "//third_party/blink/public/mojom:mojom_platform_js_data_deps",
  1080. "//third_party/blink/renderer/core:js_files_for_form_controls_web_tests",
  1081. "//third_party/catapult/third_party/typ",
  1082. "//third_party/hyphenation-patterns:test_data",
  1083. "//third_party/mesa_headers",
  1084. "//tools/imagediff",
  1085. "//ui/base:goldctl",
  1086. ]
  1087. if (is_android) {
  1088. data_deps += [
  1089. "//third_party/breakpad:breakpad_unittests",
  1090. "//third_party/breakpad:dump_syms",
  1091. "//third_party/breakpad:microdump_stackwalk",
  1092. "//third_party/breakpad:minidump_dump",
  1093. "//third_party/breakpad:minidump_stackwalk",
  1094. "//third_party/breakpad:symupload",
  1095. "//tools/android/forwarder2",
  1096. ]
  1097. } else {
  1098. data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ]
  1099. }
  1100. if (!is_win && !is_android) {
  1101. data_deps +=
  1102. [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
  1103. }
  1104. if (is_mac) {
  1105. data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
  1106. }
  1107. if (is_linux || is_chromeos) {
  1108. data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
  1109. }
  1110. if (is_fuchsia) {
  1111. data_deps += [
  1112. "//build/config/fuchsia:deployment_resources",
  1113. "//content/shell:content_shell_fuchsia",
  1114. "//content/shell:content_shell_pkg__archive-manifest",
  1115. "//content/shell:content_shell_pkg__archive-metadata",
  1116. ]
  1117. }
  1118. data = [
  1119. "//build/skia_gold_common/",
  1120. "//testing/scripts/common.py",
  1121. "//testing/scripts/run_isolated_script_test.py",
  1122. "//testing/xvfb.py",
  1123. "//third_party/blink/tools/",
  1124. "//third_party/blink/web_tests/resources/",
  1125. "//third_party/pywebsocket3/src/mod_pywebsocket/",
  1126. "//third_party/test_fonts/test_fonts/",
  1127. "//third_party/wpt_tools/",
  1128. ]
  1129. if (is_win) {
  1130. data += [
  1131. "//third_party/apache-win32/",
  1132. "//third_party/perl/perl/",
  1133. ]
  1134. data_deps += [ "//build/win:copy_cdb_to_output" ]
  1135. }
  1136. if (is_mac) {
  1137. data += [
  1138. "//third_party/apache-mac/",
  1139. "//third_party/apache-mac-arm64/",
  1140. ]
  1141. }
  1142. if (is_linux || is_fuchsia) {
  1143. data += [ "//third_party/apache-linux/" ]
  1144. }
  1145. if (is_android) {
  1146. data += [
  1147. "//third_party/catapult/",
  1148. "//build/android/",
  1149. ]
  1150. }
  1151. }
  1152. _common_web_test_script = "//testing/scripts/run_isolated_script_test.py"
  1153. _common_web_test_args = [ "@WrappedPath(" + rebase_path(
  1154. "//third_party/blink/tools/run_web_tests.py",
  1155. root_build_dir) + ")" ]
  1156. if (is_debug) {
  1157. _common_web_test_args += [ "--debug" ]
  1158. } else {
  1159. _common_web_test_args += [ "--release" ]
  1160. if (dcheck_always_on) {
  1161. _common_web_test_args += [ "--timeout-ms=12000" ]
  1162. }
  1163. }
  1164. if (is_android) {
  1165. _common_web_test_args += [
  1166. "--platform",
  1167. "android",
  1168. ]
  1169. }
  1170. _common_web_test_args += [
  1171. "--seed",
  1172. "4",
  1173. "--debug-rwt-logging",
  1174. "--no-show-results",
  1175. "--zero-tests-executed-ok",
  1176. "--clobber-old-results",
  1177. "--exit-after-n-failures",
  1178. "5000",
  1179. "--exit-after-n-crashes-or-timeouts",
  1180. "100",
  1181. ]
  1182. # https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_tests.md
  1183. script_test("blink_web_tests") {
  1184. script = _common_web_test_script
  1185. args = _common_web_test_args
  1186. data_deps = [ ":blink_web_tests_support_data" ]
  1187. data = [
  1188. "//third_party/blink/perf_tests/",
  1189. "//third_party/blink/web_tests/SmokeTests/Default.txt",
  1190. "//third_party/blink/web_tests/VirtualTestSuites",
  1191. # List all test expectations here
  1192. "//third_party/blink/web_tests/ASANExpectations",
  1193. "//third_party/blink/web_tests/LeakExpectations",
  1194. "//third_party/blink/web_tests/MSANExpectations",
  1195. "//third_party/blink/web_tests/NeverFixTests",
  1196. "//third_party/blink/web_tests/SlowTests",
  1197. "//third_party/blink/web_tests/StaleTestExpectations",
  1198. "//third_party/blink/web_tests/TestExpectations",
  1199. "//third_party/blink/web_tests/WebDriverExpectations",
  1200. "//third_party/blink/web_tests/WebGPUExpectations",
  1201. # === List Test Cases folders here ===
  1202. "//third_party/blink/web_tests/accessibility/",
  1203. "//third_party/blink/web_tests/android/",
  1204. "//third_party/blink/web_tests/animations/",
  1205. "//third_party/blink/web_tests/app_banner/",
  1206. "//third_party/blink/web_tests/bindings/",
  1207. "//third_party/blink/web_tests/clipboard/",
  1208. "//third_party/blink/web_tests/compositing/",
  1209. "//third_party/blink/web_tests/crypto/",
  1210. "//third_party/blink/web_tests/css-parser/",
  1211. "//third_party/blink/web_tests/css1/",
  1212. "//third_party/blink/web_tests/css2.1/",
  1213. "//third_party/blink/web_tests/css3/",
  1214. "//third_party/blink/web_tests/cssom/",
  1215. "//third_party/blink/web_tests/custom-elements/",
  1216. "//third_party/blink/web_tests/custom-properties/",
  1217. "//third_party/blink/web_tests/dark-mode/",
  1218. "//third_party/blink/web_tests/document-transition/",
  1219. "//third_party/blink/web_tests/dom/",
  1220. "//third_party/blink/web_tests/editing/",
  1221. "//third_party/blink/web_tests/fast/",
  1222. "//third_party/blink/web_tests/fonts/",
  1223. "//third_party/blink/web_tests/fragmentation/",
  1224. "//third_party/blink/web_tests/fullscreen/",
  1225. "//third_party/blink/web_tests/gamepad/",
  1226. "//third_party/blink/web_tests/harness-tests/",
  1227. "//third_party/blink/web_tests/hittesting/",
  1228. "//third_party/blink/web_tests/html/",
  1229. "//third_party/blink/web_tests/html5lib/",
  1230. "//third_party/blink/web_tests/http/",
  1231. "//third_party/blink/web_tests/idle-callback/",
  1232. "//third_party/blink/web_tests/ietestcenter/",
  1233. "//third_party/blink/web_tests/images/",
  1234. "//third_party/blink/web_tests/inspector-protocol/",
  1235. "//third_party/blink/web_tests/intersection-observer/",
  1236. "//third_party/blink/web_tests/jquery/",
  1237. "//third_party/blink/web_tests/js/",
  1238. "//third_party/blink/web_tests/lifecycle/",
  1239. "//third_party/blink/web_tests/loader/",
  1240. "//third_party/blink/web_tests/media/",
  1241. "//third_party/blink/web_tests/media_capabilities/",
  1242. "//third_party/blink/web_tests/mhtml/",
  1243. "//third_party/blink/web_tests/navigator_language/",
  1244. "//third_party/blink/web_tests/navigator_webdriver/",
  1245. "//third_party/blink/web_tests/netinfo/",
  1246. "//third_party/blink/web_tests/overflow/",
  1247. "//third_party/blink/web_tests/paint/",
  1248. "//third_party/blink/web_tests/payments/",
  1249. "//third_party/blink/web_tests/permissionclient/",
  1250. "//third_party/blink/web_tests/plugins/",
  1251. "//third_party/blink/web_tests/pointer-lock/",
  1252. "//third_party/blink/web_tests/print_testharness/",
  1253. "//third_party/blink/web_tests/printing/",
  1254. "//third_party/blink/web_tests/register-protocol-handler/",
  1255. "//third_party/blink/web_tests/regress/",
  1256. "//third_party/blink/web_tests/resize-observer/",
  1257. "//third_party/blink/web_tests/resources/",
  1258. "//third_party/blink/web_tests/rootscroller/",
  1259. "//third_party/blink/web_tests/screen_orientation/",
  1260. "//third_party/blink/web_tests/scrollbars/",
  1261. "//third_party/blink/web_tests/scrollingcoordinator/",
  1262. "//third_party/blink/web_tests/security/",
  1263. "//third_party/blink/web_tests/handwriting/",
  1264. "//third_party/blink/web_tests/shadow-dom/",
  1265. "//third_party/blink/web_tests/storage/",
  1266. "//third_party/blink/web_tests/svg/",
  1267. "//third_party/blink/web_tests/synthetic_gestures/",
  1268. "//third_party/blink/web_tests/tables/",
  1269. "//third_party/blink/web_tests/test_runner/",
  1270. "//third_party/blink/web_tests/third_party/",
  1271. "//third_party/blink/web_tests/timezonechange/",
  1272. "//third_party/blink/web_tests/touchadjustment/",
  1273. "//third_party/blink/web_tests/transforms/",
  1274. "//third_party/blink/web_tests/transitions/",
  1275. "//third_party/blink/web_tests/traversal/",
  1276. "//third_party/blink/web_tests/typedcssom/",
  1277. "//third_party/blink/web_tests/vibration/",
  1278. "//third_party/blink/web_tests/virtual/",
  1279. "//third_party/blink/web_tests/virtualkeyboard/",
  1280. "//third_party/blink/web_tests/wake-lock/",
  1281. "//third_party/blink/web_tests/wasm/",
  1282. "//third_party/blink/web_tests/webaudio/",
  1283. "//third_party/blink/web_tests/webexposed/",
  1284. "//third_party/blink/web_tests/webgpu/",
  1285. "//third_party/blink/web_tests/xmlviewer/",
  1286. # === Test Case Folders Ends ===
  1287. ]
  1288. if (is_win || is_linux || is_fuchsia) {
  1289. data += [
  1290. "//third_party/blink/web_tests/platform/win/",
  1291. "//third_party/blink/web_tests/platform/win10/",
  1292. ]
  1293. if (is_linux || is_fuchsia) {
  1294. data += [ "//third_party/blink/web_tests/platform/linux/" ]
  1295. }
  1296. if (is_fuchsia) {
  1297. data += [ "//third_party/blink/web_tests/platform/fuchsia/" ]
  1298. }
  1299. } else if (is_mac) {
  1300. data += [
  1301. "//third_party/blink/web_tests/SmokeTests/Mac.txt",
  1302. "//third_party/blink/web_tests/platform/mac/",
  1303. "//third_party/blink/web_tests/platform/mac-mac10.13/",
  1304. "//third_party/blink/web_tests/platform/mac-mac10.14/",
  1305. "//third_party/blink/web_tests/platform/mac-mac10.15/",
  1306. "//third_party/blink/web_tests/platform/mac-mac11/",
  1307. "//third_party/blink/web_tests/platform/mac-mac11-arm64/",
  1308. "//third_party/blink/web_tests/platform/mac-mac12-arm64/",
  1309. ]
  1310. }
  1311. # flag-specific tests only runs on linux as of now
  1312. if (is_linux) {
  1313. data += [
  1314. "//third_party/blink/web_tests/FlagSpecificConfig",
  1315. "//third_party/blink/web_tests/FlagExpectations/",
  1316. "//third_party/blink/web_tests/flag-specific/",
  1317. ]
  1318. }
  1319. }
  1320. script_test("blink_wpt_tests") {
  1321. script = _common_web_test_script
  1322. args = _common_web_test_args
  1323. # Use --wpt-only to skip tests under web_tests/virtual/
  1324. args += [ "--wpt-only" ]
  1325. data_deps = [ ":blink_web_tests_support_data" ]
  1326. data = [
  1327. "//third_party/blink/perf_tests/",
  1328. "//third_party/blink/web_tests/SmokeTests/Default.txt",
  1329. "//third_party/blink/web_tests/VirtualTestSuites",
  1330. # List all test expectations here
  1331. "//third_party/blink/web_tests/ASANExpectations",
  1332. "//third_party/blink/web_tests/LeakExpectations",
  1333. "//third_party/blink/web_tests/MSANExpectations",
  1334. "//third_party/blink/web_tests/NeverFixTests",
  1335. "//third_party/blink/web_tests/SlowTests",
  1336. "//third_party/blink/web_tests/StaleTestExpectations",
  1337. "//third_party/blink/web_tests/TestExpectations",
  1338. "//third_party/blink/web_tests/WebDriverExpectations",
  1339. "//third_party/blink/web_tests/WebGPUExpectations",
  1340. # === List Test Cases folders here ===
  1341. "//third_party/blink/web_tests/external/",
  1342. "//third_party/blink/web_tests/wpt_internal/",
  1343. "//third_party/blink/web_tests/virtual/",
  1344. # === Test Case Folders Ends ===
  1345. ]
  1346. if (is_win || is_linux || is_fuchsia) {
  1347. data += [
  1348. "//third_party/blink/web_tests/platform/win/",
  1349. "//third_party/blink/web_tests/platform/win10/",
  1350. ]
  1351. if (is_linux || is_fuchsia) {
  1352. data += [ "//third_party/blink/web_tests/platform/linux/" ]
  1353. }
  1354. if (is_fuchsia) {
  1355. data += [ "//third_party/blink/web_tests/platform/fuchsia/" ]
  1356. }
  1357. } else if (is_mac) {
  1358. data += [
  1359. "//third_party/blink/web_tests/SmokeTests/Mac.txt",
  1360. "//third_party/blink/web_tests/platform/mac/",
  1361. "//third_party/blink/web_tests/platform/mac-mac10.13/",
  1362. "//third_party/blink/web_tests/platform/mac-mac10.14/",
  1363. "//third_party/blink/web_tests/platform/mac-mac10.15/",
  1364. "//third_party/blink/web_tests/platform/mac-mac11-arm64/",
  1365. ]
  1366. }
  1367. # flag-specific tests only runs on linux as of now
  1368. if (is_linux) {
  1369. data += [
  1370. "//third_party/blink/web_tests/FlagSpecificConfig",
  1371. "//third_party/blink/web_tests/FlagExpectations/",
  1372. "//third_party/blink/web_tests/flag-specific/",
  1373. ]
  1374. }
  1375. }
  1376. script_test("devtools_web_tests") {
  1377. # This target differs from :blink_web_tests in that it uses the
  1378. # same test harness but runs an entirely different set of tests
  1379. # and doesn't have a dependency on the web_test directory at all.
  1380. script = _common_web_test_script
  1381. args = _common_web_test_args + [
  1382. "--layout-tests-directory=@WrappedPath(" + rebase_path(
  1383. "//third_party/devtools-frontend/src/test/webtests",
  1384. root_out_dir) + ")",
  1385. "http/tests/devtools",
  1386. ]
  1387. data_deps = [ ":blink_web_tests_support_data" ]
  1388. data = [ "//third_party/devtools-frontend/src/test/webtests/" ]
  1389. }
  1390. script_test("webgpu_blink_web_tests") {
  1391. # This target differs from :blink_web_tests in that it uses the same
  1392. # test harness and a few additional flags but, more importantly, only runs
  1393. # the web_tests/wpt_internal/webgpu tests, so it doesn't have a data
  1394. # dependency on the whole web_test directory.
  1395. script = _common_web_test_script
  1396. args = _common_web_test_args
  1397. if (is_asan) {
  1398. args += [ "--timeout-ms=30000" ]
  1399. }
  1400. args += [
  1401. "--ignore-default-expectations",
  1402. "--additional-expectations",
  1403. "@WrappedPath(../../third_party/blink/web_tests/WebGPUExpectations)",
  1404. "--isolated-script-test-filter=wpt_internal/webgpu/web_platform/reftests/*",
  1405. ]
  1406. data_deps = [
  1407. ":blink_web_tests_support_data",
  1408. "//third_party/webgpu-cts",
  1409. ]
  1410. data = [
  1411. "//third_party/blink/web_tests/external/wpt/common/",
  1412. "//third_party/blink/web_tests/external/wpt/resources/",
  1413. "//third_party/blink/web_tests/FlagSpecificConfig",
  1414. "//third_party/blink/web_tests/VirtualTestSuites",
  1415. "//third_party/blink/web_tests/WebGPUExpectations",
  1416. "//third_party/blink/web_tests/wpt_internal/",
  1417. "//third_party/webgpu-cts/scripts/",
  1418. ]
  1419. }
  1420. copy("layout_test_data_mojo_bindings") {
  1421. testonly = true
  1422. sources = [ "$root_gen_dir/mojo/public/js/mojo_bindings.js" ]
  1423. outputs =
  1424. [ "$root_gen_dir/layout_test_data/mojo/public/js/mojo_bindings.js" ]
  1425. deps = [ "//mojo/public/js:bindings" ]
  1426. }
  1427. copy("layout_test_data_mojo_bindings_lite") {
  1428. testonly = true
  1429. sources = [ "$root_gen_dir/mojo/public/js/mojo_bindings_lite.js" ]
  1430. outputs = [
  1431. "$root_gen_dir/layout_test_data/mojo/public/js/mojo_bindings_lite.js",
  1432. ]
  1433. deps = [ "//mojo/public/js:bindings_lite" ]
  1434. }
  1435. script_test("blink_python_tests") {
  1436. script = "//testing/scripts/run_isolated_script_test.py"
  1437. args = [ "@WrappedPath(" +
  1438. rebase_path("//third_party/blink/tools/run_blinkpy_tests.py",
  1439. root_build_dir) + ")" ]
  1440. data = [
  1441. # These tests use //build/android/devil_chromium.py even when !is_android,
  1442. # so cannot use the helpers in //build/android (they assert(is_android)).
  1443. "//build/android/",
  1444. "//build/gn_helpers.py",
  1445. "//build/config/gclient_args.gni",
  1446. "//build/skia_gold_common/",
  1447. "//components/crash/content/tools/generate_breakpad_symbols.py",
  1448. "//testing/unexpected_passes_common/",
  1449. "//third_party/blink/renderer/bindings/scripts/",
  1450. "//third_party/blink/renderer/build/scripts/",
  1451. "//third_party/blink/tools/",
  1452. "//third_party/blink/web_tests/ASANExpectations",
  1453. "//third_party/blink/web_tests/LeakExpectations",
  1454. "//third_party/blink/web_tests/MSANExpectations",
  1455. "//third_party/blink/web_tests/NeverFixTests",
  1456. "//third_party/blink/web_tests/SlowTests",
  1457. "//third_party/blink/web_tests/StaleTestExpectations",
  1458. "//third_party/blink/web_tests/TestExpectations",
  1459. "//third_party/blink/web_tests/VirtualTestSuites",
  1460. "//third_party/catapult/common/py_utils/",
  1461. "//third_party/catapult/devil/",
  1462. "//third_party/catapult/dependency_manager/",
  1463. "//third_party/catapult/third_party/typ/",
  1464. "//third_party/depot_tools/pylint-1.5",
  1465. "//third_party/depot_tools/pylint_main.py",
  1466. "//third_party/depot_tools/pylintrc",
  1467. "//third_party/ply/",
  1468. "//third_party/wpt_tools/",
  1469. "//tools/idl_parser/",
  1470. ]
  1471. data_deps = [ "//ui/base:goldctl" ]
  1472. }
  1473. }
  1474. group("chromium_builder_perf") {
  1475. testonly = true
  1476. if (!is_ios && !is_android && !is_castos) {
  1477. data_deps = [
  1478. "//cc:cc_perftests",
  1479. "//chrome/test:load_library_perf_tests",
  1480. "//chrome/test:performance_test_suite",
  1481. "//components/tracing:tracing_perftests",
  1482. "//gpu:command_buffer_perftests",
  1483. "//gpu:gpu_perftests",
  1484. "//media:media_perftests",
  1485. "//tools/perf/chrome_telemetry_build:telemetry_chrome_test",
  1486. ]
  1487. if (!is_chromeos_ash) {
  1488. data_deps += [ "//chrome/test:performance_browser_tests" ]
  1489. }
  1490. if (!is_win) {
  1491. data_deps +=
  1492. [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
  1493. }
  1494. }
  1495. if ((is_linux && !is_castos) || is_chromeos_lacros) {
  1496. if (is_official_build) {
  1497. # In GN builds, this is controlled by the 'linux_dump_symbols'
  1498. # flag, which defaults to 1 for official builds. For now,
  1499. # we skip the separate flag and just key off of is_official_build.
  1500. data_deps += [ "//chrome:linux_symbols" ]
  1501. }
  1502. data_deps += [ "//tools/perf/clear_system_cache" ]
  1503. }
  1504. if (is_win) {
  1505. data_deps += [
  1506. "//chrome/installer/mini_installer:mini_installer",
  1507. "//components:components_perftests",
  1508. "//third_party/angle/src/tests:angle_perftests",
  1509. ]
  1510. }
  1511. # An `if (is_fuchsia)` condition in //chrome/test/BUILD.gn prevents this
  1512. # target from being defined.
  1513. # TODO(crbug.com/1310086): Resolve that and remove this exception.
  1514. if (is_fuchsia) {
  1515. data_deps -= [ "//chrome/test:performance_test_suite" ]
  1516. }
  1517. }
  1518. if (!is_ios && !is_android && !is_castos) {
  1519. group("chromium_builder_asan") {
  1520. testonly = true
  1521. deps = [
  1522. "//chrome:chrome",
  1523. "//content/shell:content_shell",
  1524. "//third_party/blink/public/mojom:mojom_modules_js",
  1525. "//v8:d8",
  1526. ]
  1527. if (!is_win) {
  1528. deps += [ "//skia:filter_fuzz_stub" ]
  1529. }
  1530. if (enable_ipc_fuzzer && !is_component_build) {
  1531. deps += [ "//tools/ipc_fuzzer:ipc_fuzzer_all" ]
  1532. }
  1533. if (!is_chromeos_ash) {
  1534. deps += [
  1535. "//third_party/pdfium/samples:pdfium_test",
  1536. "//v8:v8_shell($v8_snapshot_toolchain)",
  1537. ]
  1538. }
  1539. if (!is_component_build) {
  1540. # See https://bugs.chromium.org/p/chromium/issues/detail?id=942546#c11.
  1541. deps += [
  1542. "//third_party/webrtc/rtc_tools:rtp_generator",
  1543. "//third_party/webrtc/rtc_tools:video_replay",
  1544. ]
  1545. }
  1546. if (build_dawn_tests) {
  1547. deps += [ "//third_party/dawn/src/tint/fuzzers:fuzzers" ]
  1548. }
  1549. }
  1550. }
  1551. if (is_android) {
  1552. group("optimize_gn_gen") {
  1553. deps = [
  1554. # These run expensive scripts in non-default toolchains. Generally, host
  1555. # toolchain targets are loaded in the later part of the run, and the
  1556. # result is they push out the end of generation. By preloading these, the
  1557. # scripts can be parallelized with the rest of the load.
  1558. "//build/config/linux(//build/toolchain/linux:clang_x64)",
  1559. "//build/config/posix(//build/toolchain/linux:clang_x64)",
  1560. # Include x86 toolchains as well since V8 uses them for 32-bit snapshot
  1561. # generation.
  1562. "//build/config/linux(//build/toolchain/linux:clang_x86)",
  1563. "//build/config/posix(//build/toolchain/linux:clang_x86)",
  1564. ]
  1565. }
  1566. }
  1567. if (enable_js_type_check) {
  1568. group("webui_closure_compile") {
  1569. testonly = true
  1570. data_deps = [
  1571. "components/neterror/resources:closure_compile",
  1572. "components/security_interstitials:closure_compile",
  1573. "mojo/public/tools/bindings/generators/js_templates/lite/test:closure_compile",
  1574. "ui/webui/resources:closure_compile",
  1575. ]
  1576. if (is_chromeos_ash) {
  1577. data_deps += [
  1578. "ash/webui:closure_compile",
  1579. "ui/file_manager:closure_compile",
  1580. ]
  1581. }
  1582. if (!is_castos) {
  1583. data_deps += [
  1584. "chrome/browser/resources:closure_compile",
  1585. "chrome/test:closure_compile",
  1586. ]
  1587. }
  1588. }
  1589. }
  1590. # Write debug logs to gn_logs.txt.
  1591. _lines = [
  1592. "Generated during 'gn gen' by //BUILD.gn.",
  1593. "",
  1594. ] + build_gn_logs
  1595. # GN evaluates each .gn file once per toolchain, so restricting to default
  1596. # toolchain will ensure write_file() is called only once.
  1597. assert(current_toolchain == default_toolchain)
  1598. write_file("$root_build_dir/gn_logs.txt", _lines)