# 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.
source_set("partial_translate") {
sources = [
"partial_translate_delegate.h",
"partial_translate_mediator.h",
"partial_translate_mediator.mm",
]
deps = [
"//components/prefs",
"//components/strings",
"//components/translate/core/browser:translate_pref_names",
"//ios/chrome/app/strings",
"//ios/chrome/browser/shared/model/web_state_list",
"//ios/chrome/browser/shared/public/commands",
"//ios/chrome/browser/shared/public/features",
"//ios/chrome/browser/shared/ui/symbols",
"//ios/chrome/browser/ui/browser_container:edit_menu_alert_delegate",
"//ios/chrome/browser/ui/browser_container:edit_menu_utils",
"//ios/chrome/browser/ui/fullscreen",
"//ios/chrome/browser/web_selection/model",
"//ios/public/provider/chrome/browser/partial_translate:partial_translate_api",
"//ios/web/public",
]
}
source_set("unit_tests") {
testonly = true
sources = [ "partial_translate_mediator_unittest.mm" ]
deps = [
":partial_translate",
"//base/test:test_support",
"//components/sync_preferences",
"//components/sync_preferences:test_support",
"//components/translate/core/browser:translate_pref_names",
"//ios/chrome/browser/shared/model/profile/test",
"//ios/chrome/browser/shared/model/web_state_list",
"//ios/chrome/browser/shared/model/web_state_list/test:test_support",
"//ios/chrome/browser/shared/public/commands",
"//ios/chrome/browser/shared/public/features",
"//ios/chrome/browser/ui/browser_container:edit_menu_alert_delegate",
"//ios/chrome/browser/web/model:web_internal",
"//ios/chrome/browser/web_selection/model",
"//ios/chrome/test/providers/partial_translate",
"//ios/web/public/test",
"//testing/gtest",
"//third_party/ocmock",
]
}
source_set("eg_test_support+eg2") {
configs += [ "//build/config/ios:xctest_config" ]
testonly = true
sources = [
"partial_translate_app_interface.h",
"partial_translate_app_interface_stub.mm",
]
deps = [ "//ios/testing/earl_grey:eg_test_support+eg2" ]
}
source_set("eg_app_support+eg2") {
configs += [ "//build/config/ios:xctest_config" ]
testonly = true
sources = [
"partial_translate_app_interface.h",
"partial_translate_app_interface.mm",
]
deps = [
":partial_translate",
"//base",
"//ios/chrome/app/strings",
"//ios/chrome/browser/shared/model/browser",
"//ios/chrome/browser/shared/model/browser_state",
"//ios/chrome/browser/shared/model/profile",
"//ios/chrome/browser/shared/model/web_state_list",
"//ios/chrome/browser/ui/fullscreen",
"//ios/chrome/test/app:test_support",
"//ios/testing/earl_grey:eg_app_support+eg2",
"//ios/third_party/earl_grey2:app_framework+link",
]
}