# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. source_set("translate") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ "after_translate_infobar_controller.h", "after_translate_infobar_controller.mm", "before_translate_infobar_controller.h", "before_translate_infobar_controller.mm", "chrome_ios_translate_client.h", "chrome_ios_translate_client.mm", "language_selection_context.h", "language_selection_context.mm", "language_selection_delegate.h", "language_selection_handler.h", "never_translate_infobar_controller.h", "never_translate_infobar_controller.mm", "translate_accept_languages_factory.cc", "translate_accept_languages_factory.h", "translate_infobar_tags.h", "translate_message_infobar_controller.h", "translate_message_infobar_controller.mm", "translate_ranker_factory.cc", "translate_ranker_factory.h", "translate_ranker_metrics_provider.cc", "translate_ranker_metrics_provider.h", "translate_service_ios.cc", "translate_service_ios.h", ] deps = [ "//base", "//components/infobars/core", "//components/keyed_service/core", "//components/keyed_service/ios", "//components/language/core/browser", "//components/metrics", "//components/prefs", "//components/strings", "//components/sync", "//components/translate/core/browser", "//components/translate/core/common", "//components/translate/ios/browser", "//components/web_resource", "//ios/chrome/app/strings", "//ios/chrome/app/theme", "//ios/chrome/browser", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/infobars", "//ios/chrome/browser/language", "//ios/chrome/browser/sync", "//ios/chrome/browser/ui/infobars", "//ios/chrome/browser/ui/util", "//ios/web", "//third_party/metrics_proto", "//ui/base", "//ui/gfx", "//url", ] allow_circular_includes_from = [ "//ios/chrome/browser/infobars" ] } source_set("unit_tests") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "js_language_detection_manager_unittest.mm", "translate_service_ios_unittest.cc", ] deps = [ ":translate", "//base", "//base/test:test_support", "//components/translate/ios/browser", "//ios/chrome/browser", "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/web:test_support", "//ios/chrome/common", "//ios/public/provider/chrome/browser:test_support", "//ios/web", "//ios/web/public/test", "//testing/gmock:gmock", "//testing/gtest", "//url", ] } # Those tests do not use external URLs but fail if the network is unavailable # as they explicitly check whether the network is up or not; it is not possible # to safely instantiate a net::NetworkChangeNotifier::DisableForTest to disable # those checks as this in not thread-safe. See http://crbug.com/709131 for more # details. source_set("external_url_eg_tests") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "translate_egtest.mm", ] deps = [ ":translate", "//base", "//base/test:test_support", "//components/language/ios/browser", "//components/strings", "//components/translate/core/browser", "//components/translate/core/common", "//components/translate/ios/browser", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/ui/translate:translate_ui", "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/third_party/earl_grey:earl_grey+link", "//ios/web/public/test", "//ios/web/public/test/http_server", "//net", "//ui/base", ] libs = [ "XCTest.framework" ] }