# Copyright 2024 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/chromeos/crosier_tests.gni")
import("//build/config/chromeos/ui_mode.gni")
assert(is_chromeos_ash)
static_library("shelf") {
sources = [
"app_shortcut_shelf_item_controller.cc",
"app_shortcut_shelf_item_controller.h",
"app_window_base.cc",
"app_window_base.h",
"app_window_shelf_controller.cc",
"app_window_shelf_controller.h",
"app_window_shelf_item_controller.cc",
"app_window_shelf_item_controller.h",
"arc_app_shelf_id.cc",
"arc_app_shelf_id.h",
"arc_app_window.cc",
"arc_app_window.h",
"arc_app_window_delegate.h",
"arc_app_window_info.cc",
"arc_app_window_info.h",
"arc_playstore_shortcut_shelf_item_controller.cc",
"arc_playstore_shortcut_shelf_item_controller.h",
"arc_shelf_spinner_item_controller.cc",
"arc_shelf_spinner_item_controller.h",
"browser_app_shelf_controller.cc",
"browser_app_shelf_controller.h",
"browser_app_shelf_item_controller.cc",
"browser_app_shelf_item_controller.h",
"browser_shortcut_shelf_item_controller.cc",
"browser_shortcut_shelf_item_controller.h",
"browser_status_monitor.cc",
"browser_status_monitor.h",
"chrome_shelf_controller.cc",
"chrome_shelf_controller.h",
"chrome_shelf_controller_util.cc",
"chrome_shelf_controller_util.h",
"chrome_shelf_item_factory.cc",
"chrome_shelf_item_factory.h",
"chrome_shelf_prefs.cc",
"chrome_shelf_prefs.h",
"crostini_app_display.cc",
"crostini_app_display.h",
"crostini_app_window.cc",
"crostini_app_window.h",
"extension_shelf_context_menu.cc",
"extension_shelf_context_menu.h",
"extension_uninstaller.cc",
"extension_uninstaller.h",
"isolated_web_app_installer_context_menu.cc",
"isolated_web_app_installer_context_menu.h",
"isolated_web_app_installer_shelf_item_controller.cc",
"isolated_web_app_installer_shelf_item_controller.h",
"lacros_app_window.cc",
"lacros_app_window.h",
"lacros_shelf_item_controller.h",
"settings_window_observer.cc",
"settings_window_observer.h",
"shelf_app_updater.cc",
"shelf_app_updater.h",
"shelf_context_menu.cc",
"shelf_context_menu.h",
"shelf_controller_helper.cc",
"shelf_controller_helper.h",
"shelf_extension_app_updater.cc",
"shelf_extension_app_updater.h",
"shelf_spinner_controller.cc",
"shelf_spinner_controller.h",
"shelf_spinner_item_controller.cc",
"shelf_spinner_item_controller.h",
"standalone_browser_extension_app_context_menu.cc",
"standalone_browser_extension_app_context_menu.h",
"standalone_browser_extension_app_shelf_item_controller.cc",
"standalone_browser_extension_app_shelf_item_controller.h",
]
public_deps = [ "//chrome/browser:browser_public_dependencies" ]
deps = [
"//ash",
"//ash/components/arc",
"//ash/components/arc:arc_base_utils",
"//ash/components/arc:prefs",
"//ash/constants",
"//ash/public/cpp",
"//ash/webui/mall:app_id",
"//ash/webui/projector_app/public/cpp",
"//chrome/app/theme:chrome_unscaled_resources",
"//chrome/app/vector_icons",
"//chrome/browser:browser_process",
"//chrome/browser/apps:icon_standardizer",
"//chrome/browser/apps/app_service:constants",
"//chrome/browser/ash/accessibility",
"//chrome/browser/ash/app_list",
"//chrome/browser/ash/app_list/app_service",
"//chrome/browser/ash/app_list/arc",
"//chrome/browser/ash/app_list/internal_app",
"//chrome/browser/ash/app_list/search",
"//chrome/browser/ash/app_restore",
"//chrome/browser/ash/apps",
"//chrome/browser/ash/arc",
"//chrome/browser/ash/arc/fileapi",
"//chrome/browser/ash/arc/pip",
"//chrome/browser/ash/arc/session",
"//chrome/browser/ash/crosapi:browser_util",
"//chrome/browser/ash/crostini",
"//chrome/browser/ash/eche_app",
"//chrome/browser/ash/extensions",
"//chrome/browser/ash/extensions/autotest_private",
"//chrome/browser/ash/file_manager",
"//chrome/browser/ash/guest_os",
"//chrome/browser/ash/login/demo_mode",
"//chrome/browser/ash/plugin_vm",
"//chrome/browser/ash/policy/handlers",
"//chrome/browser/ash/profiles",
"//chrome/browser/chromeos/extensions/login_screen/login/cleanup",
"//chrome/browser/extensions",
"//chrome/browser/image_decoder",
"//chrome/browser/profiles:profile",
"//chrome/browser/scalable_iph:scalable_iph_factory",
"//chrome/browser/sync",
"//chrome/browser/ui/apps",
"//chrome/browser/ui/ash/app_icon_color_cache",
"//chrome/browser/ui/ash/default_pinned_apps",
"//chrome/browser/ui/ash/keyboard",
"//chrome/browser/ui/ash/multi_user",
"//chrome/browser/ui/ash/shelf/app_service",
"//chrome/browser/ui/ash/system_web_apps",
"//chrome/browser/ui/tabs:tab_enums",
"//chrome/browser/ui/webui/ash/settings/app_management",
"//chrome/browser/web_applications",
"//chrome/common",
"//chromeos/ash/components/scalable_iph",
"//chromeos/constants",
"//chromeos/strings:strings_grit",
"//chromeos/ui/wm",
"//components/app_constants",
"//components/crx_file",
"//components/exo",
"//components/favicon/content",
"//components/pref_registry",
"//components/prefs",
"//components/sync_preferences",
"//components/webapps/common",
"//extensions/common",
"//ui/chromeos/styles:cros_tokens_color_mappings_generator",
]
allow_circular_includes_from = [
"//chrome/browser/ash/app_list",
"//chrome/browser/ash/app_list/app_service",
"//chrome/browser/ash/app_list/arc",
"//chrome/browser/ash/app_list/internal_app",
"//chrome/browser/ash/app_list/search",
"//chrome/browser/ash/app_restore",
"//chrome/browser/ash/apps",
"//chrome/browser/ash/arc",
"//chrome/browser/ash/arc/fileapi",
"//chrome/browser/ash/arc/pip",
"//chrome/browser/ash/arc/session",
"//chrome/browser/ash/crostini",
"//chrome/browser/ash/extensions/autotest_private",
"//chrome/browser/ash/plugin_vm",
"//chrome/browser/ash/policy/handlers",
"//chrome/browser/chromeos/extensions/login_screen/login/cleanup",
"//chrome/browser/extensions",
"//chrome/browser/ui/ash/multi_user",
"//chrome/browser/ui/ash/shelf/app_service",
]
}
static_library("test_support") {
testonly = true
sources = [
"chrome_shelf_controller_test_util.cc",
"chrome_shelf_controller_test_util.h",
]
deps = [
":shelf",
"//ash/public/cpp",
"//base/test:test_support",
"//ui/events",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"arc_app_shelf_id_unittest.cc",
"chrome_shelf_controller_unittest.cc",
"chrome_shelf_prefs_unittest.cc",
"isolated_web_app_installer_shelf_item_controller_unittest.cc",
"shelf_context_menu_unittest.cc",
]
deps = [
":shelf",
":test_support",
"//ash",
"//ash/components/arc",
"//ash/components/arc:arc_test_support",
"//ash/constants",
"//ash/public/cpp",
"//ash/webui/mall:app_id",
"//base",
"//chrome/browser/apps/app_service",
"//chrome/browser/apps/app_service:app_registry_cache_waiter",
"//chrome/browser/apps/app_service:test_support",
"//chrome/browser/apps/app_service/app_icon",
"//chrome/browser/apps/app_service/app_icon:util",
"//chrome/browser/ash/app_list",
"//chrome/browser/ash/app_list:test_support",
"//chrome/browser/ash/app_list/app_service",
"//chrome/browser/ash/app_list/arc",
"//chrome/browser/ash/app_list/arc:test_support",
"//chrome/browser/ash/app_list/internal_app",
"//chrome/browser/ash/apps",
"//chrome/browser/ash/arc",
"//chrome/browser/ash/arc/session",
"//chrome/browser/ash/crostini:test_support",
"//chrome/browser/ash/eche_app",
"//chrome/browser/ash/file_manager",
"//chrome/browser/ash/guest_os",
"//chrome/browser/ash/login/demo_mode:test_support",
"//chrome/browser/ash/profiles",
"//chrome/browser/ash/system_web_apps",
"//chrome/browser/ash/system_web_apps/apps",
"//chrome/browser/ash/system_web_apps/apps/camera_app",
"//chrome/browser/ash/system_web_apps/test_support",
"//chrome/browser/ash/system_web_apps/types",
"//chrome/browser/extensions",
"//chrome/browser/sync",
"//chrome/browser/ui",
"//chrome/browser/ui/apps",
"//chrome/browser/ui/ash",
"//chrome/browser/ui/ash/multi_user",
"//chrome/browser/ui/ash/session",
"//chrome/browser/ui/ash/shelf/app_service",
"//chrome/browser/web_applications",
"//chrome/browser/web_applications:web_applications_test_support",
"//chrome/common",
"//chrome/test:test_support",
"//chrome/test:test_support_unit",
"//chromeos/ash/components/browser_context_helper",
"//chromeos/ash/components/dbus/chunneld",
"//chromeos/ash/components/dbus/concierge",
"//chromeos/ash/components/dbus/seneschal",
"//chromeos/ash/components/scalable_iph:constants",
"//chromeos/ash/components/standalone_browser",
"//components/account_id",
"//components/app_constants",
"//components/exo",
"//components/keep_alive_registry",
"//components/prefs",
"//components/sync_preferences",
"//components/sync_preferences:test_support",
"//components/webapps/common",
"//content/public/browser",
"//content/test:test_support",
"//extensions/browser",
"//extensions/common",
"//testing/gtest",
]
}
source_set("browser_tests") {
testonly = true
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
sources = [
"app_shortcut_shelf_item_controller_browsertest.cc",
"arc_app_shelf_browsertest.cc",
"browser_app_shelf_controller_browsertest.cc",
"browser_shortcut_shelf_item_controller_browsertest.cc",
"chrome_shelf_controller_browsertest.cc",
"extension_shelf_context_menu_browsertest.cc",
"shelf_browsertest.cc",
]
deps = [
":shelf",
":test_support",
"//ash",
"//ash/components/arc:arc_test_support",
"//ash/constants",
"//ash/public/cpp",
"//base/test:test_support",
"//chrome/browser/apps/app_service",
"//chrome/browser/apps/app_service:app_registry_cache_waiter",
"//chrome/browser/apps/app_service:test_support",
"//chrome/browser/apps/browser_instance",
"//chrome/browser/apps/platform_apps",
"//chrome/browser/ash/accessibility",
"//chrome/browser/ash/accessibility:test_support",
"//chrome/browser/ash/app_list",
"//chrome/browser/ash/app_list/arc",
"//chrome/browser/ash/arc",
"//chrome/browser/ash/arc/session",
"//chrome/browser/ash/crosapi",
"//chrome/browser/ash/crosapi:browser_util",
"//chrome/browser/ash/crosapi:test_support",
"//chrome/browser/ash/crostini",
"//chrome/browser/ash/file_manager",
"//chrome/browser/ash/file_manager:test_support",
"//chrome/browser/ash/guest_os",
"//chrome/browser/ash/login/demo_mode",
"//chrome/browser/ash/login/demo_mode:test_support",
"//chrome/browser/ash/system_web_apps",
"//chrome/browser/extensions",
"//chrome/browser/profiles:profile",
"//chrome/browser/ui",
"//chrome/browser/ui:test_support",
"//chrome/browser/ui/ash/system_web_apps",
"//chrome/browser/web_applications",
"//chrome/browser/web_applications:web_applications_test_support",
"//chrome/common",
"//chrome/test:test_support",
"//chromeos/ash/components/standalone_browser",
"//chromeos/constants",
"//components/app_constants",
"//components/crx_file",
"//components/exo:test_support",
"//components/prefs",
"//components/webapps/browser:test_support",
"//components/webapps/common",
"//content/test:test_support",
"//extensions/browser",
"//extensions/common",
"//net",
"//testing/gtest",
"//ui/display",
"//ui/events:test_support",
]
}
if (is_chromeos_device) {
crosier_tests("integration_tests") {
sources = [ "shelf_integration_test.cc" ]
sources_metadata = [ "shelf_integration_test.yaml" ]
deps = [
":shelf",
"//ash",
"//ash/public/cpp",
"//base/test:test_support",
"//chrome/browser/ash/file_manager",
"//chrome/browser/web_applications",
"//chrome/test:ash_integration_test_support",
"//chrome/test:test_support",
"//components/app_constants",
"//content/test:test_support",
"//ui/aura",
"//ui/compositor",
]
}
}