BUILD.gn 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. # Copyright 2020 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. import("//build/config/chromeos/ui_mode.gni")
  5. import("//build/config/linux/gtk/gtk.gni")
  6. import("//build/lacros/lacros_resource_sizes.gni")
  7. import("//chromeos/tast_control.gni")
  8. if (is_chromeos_device) {
  9. import("//build/config/chromeos/rules.gni")
  10. }
  11. # Code lives in the lacros-chrome browser only, not ash-chrome.
  12. assert(is_chromeos_lacros)
  13. assert(!use_gtk)
  14. component("lacros") {
  15. defines = [ "IS_CHROMEOS_LACROS_IMPL" ]
  16. deps = [
  17. ":lacros_paths",
  18. "//base",
  19. "//build:chromeos_buildflags",
  20. "//chromeos/crosapi/cpp",
  21. "//chromeos/crosapi/cpp:crosapi_constants",
  22. "//chromeos/crosapi/mojom",
  23. "//chromeos/process_proxy",
  24. "//chromeos/startup",
  25. "//components/crash/core/common",
  26. "//media/mojo/mojom/stable:stable_video_decoder",
  27. "//mojo/public/cpp/bindings",
  28. "//ui/native_theme",
  29. ]
  30. sources = [
  31. "crosapi_pref_observer.cc",
  32. "crosapi_pref_observer.h",
  33. "lacros_service.cc",
  34. "lacros_service.h",
  35. "lacros_service_never_blocking_state.cc",
  36. "lacros_service_never_blocking_state.h",
  37. "native_theme_cache.cc",
  38. "native_theme_cache.h",
  39. "system_idle_cache.cc",
  40. "system_idle_cache.h",
  41. ]
  42. }
  43. static_library("lacros_paths") {
  44. deps = [
  45. "//base",
  46. "//chromeos/crosapi/cpp:crosapi_constants",
  47. ]
  48. sources = [
  49. "lacros_paths.cc",
  50. "lacros_paths.h",
  51. ]
  52. }
  53. source_set("test_support") {
  54. testonly = true
  55. deps = [
  56. "//base",
  57. "//chromeos/crosapi/mojom",
  58. "//chromeos/lacros",
  59. "//chromeos/startup",
  60. ]
  61. sources = [
  62. "lacros_test_helper.cc",
  63. "lacros_test_helper.h",
  64. ]
  65. }
  66. lacros_resource_sizes_test("resource_sizes_lacros_chrome") {
  67. data_deps = [ "//chrome:chrome" ]
  68. }
  69. if (is_chromeos_device) {
  70. lacros_tast_tests("lacros_all_tast_tests") {
  71. # The following expression filters out all non-critical tests. See the link
  72. # below for more details:
  73. # https://chromium.googlesource.com/chromiumos/platform/tast/+/main/docs/test_attributes.md
  74. tast_attr_expr = "\"group:mainline\" && \"dep:lacros\" && !informational"
  75. # To disable a specific test, add it to the
  76. # tast_disabled_tests_from_lacros_all list in "tast_control.gni" and cite
  77. # a bug.
  78. tast_disabled_tests = tast_disabled_tests_from_lacros_all
  79. }
  80. lacros_tast_tests("lacros_all_tast_tests_informational") {
  81. # The following expression runs all informational tests. See the link below
  82. # for more details:
  83. # https://chromium.googlesource.com/chromiumos/platform/tast/+/main/docs/test_attributes.md
  84. tast_attr_expr = "\"group:mainline\" && (\"dep:lacros\" || \"dep:lacros_unstable\") && informational"
  85. # To disable a specific test, add it to the
  86. # tast_disabled_tests_from_lacros_all list in "tast_control.gni" and cite
  87. # a bug.
  88. tast_disabled_tests = tast_disabled_tests_from_lacros_all
  89. }
  90. lacros_tast_tests("lacros_fyi_tast_tests") {
  91. tast_tests = [
  92. "lacros.AppLauncherLaunch",
  93. "lacros.AppLauncherLaunch.unstable",
  94. "lacros.AudioPlay",
  95. "lacros.AudioPlay.unstable",
  96. "lacros.Basic",
  97. "lacros.Basic.unstable",
  98. "lacros.ShelfLaunch",
  99. "lacros.ShelfLaunch.unstable",
  100. ]
  101. }
  102. lacros_tast_tests("lacros_variations_tast_tests") {
  103. tast_tests = [ "lacros.VariationSmoke" ]
  104. }
  105. }