# Copyright 2023 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/config/chromeos/ui_mode.gni")
assert(is_chromeos_ash)
static_library("mahi") {
sources = [
"mahi_availability.cc",
"mahi_availability.h",
"mahi_browser_client_wrapper.cc",
"mahi_browser_client_wrapper.h",
"mahi_browser_delegate_ash.cc",
"mahi_browser_delegate_ash.h",
"mahi_cache_manager.cc",
"mahi_cache_manager.h",
"mahi_manager_impl.cc",
"mahi_manager_impl.h",
]
public_deps = [ "//chrome/browser:browser_public_dependencies" ]
deps = [
"//ash",
"//ash/constants",
"//ash/webui/settings/public/constants:mojom",
"//base",
"//chrome/browser:browser_process",
"//chrome/browser/ash/login/demo_mode",
"//chrome/browser/ash/magic_boost",
"//chrome/browser/feedback",
"//chromeos/components/magic_boost/public/cpp:cpp",
"//chromeos/components/mahi/public/cpp",
"//chromeos/strings:strings_grit",
"//components/feedback",
"//components/history/core/browser:browser",
"//components/manta",
"//components/variations/service:service",
"//ui/aura",
"//ui/base",
"//ui/gfx",
"//ui/views",
"//url",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"mahi_browser_delegate_ash_unittest.cc",
"mahi_cache_manager_unittest.cc",
"mahi_manager_impl_unittest.cc",
]
deps = [
":mahi",
":test_util",
"//ash",
"//ash:test_support",
"//ash/constants",
"//base",
"//base/test:test_support",
"//chrome/browser/ash/magic_boost:magic_boost",
"//chrome/browser/ash/mahi/media_app:unit_tests",
"//chromeos/components/magic_boost/public/cpp:cpp",
"//chromeos/constants",
"//chromeos/crosapi/mojom",
"//components/signin/public/identity_manager:test_support",
"//content/test:test_support",
"//services/network:test_support",
"//ui/aura:test_support",
"//ui/gfx",
"//ui/lottie",
"//ui/views",
]
}
source_set("browser_tests") {
testonly = true
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
sources = [ "mahi_ui_browsertest.cc" ]
deps = [
":test_util",
"//ash",
"//ash/constants",
"//base",
"//base/test:test_support",
"//chrome/browser/ui/views/mahi",
"//chrome/test:test_support",
"//chromeos/components/magic_boost/public/cpp",
"//chromeos/components/mahi/public/cpp",
"//chromeos/constants",
"//content/public/browser",
"//content/test:test_support",
"//testing/gtest",
"//ui/base",
"//ui/compositor",
"//ui/events:test_support",
"//ui/gfx",
"//ui/views",
"//url",
]
}
static_library("test_util") {
testonly = true
sources = [
"fake_mahi_browser_delegate_ash.cc",
"fake_mahi_browser_delegate_ash.h",
"mahi_test_util.cc",
"mahi_test_util.h",
"mahi_ui_browser_test_base.cc",
"mahi_ui_browser_test_base.h",
]
deps = [
":mahi",
"//ash:test_support",
"//base",
"//chrome/browser",
"//chrome/browser/ash/system_web_apps/test_support:test_support_ui",
"//chrome/browser/ui",
"//chrome/browser/ui/views/mahi",
"//chrome/test:test_support_ui",
"//chromeos/components/magic_boost/public/cpp",
"//chromeos/crosapi/mojom",
"//components/manta:manta",
"//testing/gtest",
"//ui/events:test_support",
]
}