# 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. import("//ios/web/js_compile.gni") js_compile_unchecked("injected_js") { sources = [ "resources/contextualsearch.js", ] } bundle_data("resources_unit_tests") { testonly = true sources = [ "resources/contextualsearch_unittest.js", ] outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}", ] } source_set("contextual_search") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ "contextual_search_context.cc", "contextual_search_context.h", "contextual_search_controller.h", "contextual_search_controller.mm", "contextual_search_delegate.cc", "contextual_search_delegate.h", "contextual_search_highlighter_view.h", "contextual_search_highlighter_view.mm", "contextual_search_metrics.h", "contextual_search_metrics.mm", "contextual_search_panel_state.h", "js_contextual_search_manager.h", "js_contextual_search_manager.mm", "touch_to_search_permissions_mediator.h", "touch_to_search_permissions_mediator.mm", "window_gesture_observer.h", "window_gesture_observer.mm", ] deps = [ ":injected_js", "//base", "//components/google/core/browser", "//components/prefs", "//components/search_engines", "//components/variations", "//components/variations/net", "//ios/chrome/app:tests_hook", "//ios/chrome/app/strings", "//ios/chrome/browser", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/prefs", "//ios/chrome/browser/search_engines", "//ios/chrome/browser/sync", "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/colors", "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/contextual_search/protos", "//ios/chrome/browser/ui/util", "//ios/chrome/browser/web", "//ios/chrome/browser/web_state_list", "//ios/chrome/common", "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/images", "//ios/third_party/material_components_ios", "//ios/third_party/material_roboto_font_loader_ios", "//ios/web", "//net", "//ui/base", "//url", ] libs = [ "UIKit.framework" ] } source_set("test_support") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "touch_to_search_permissions_mediator+testing.h", "touch_to_search_permissions_mediator+testing.mm", ] deps = [ ":contextual_search", ] } source_set("unit_tests") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "contextual_search_js_unittest.mm", "touch_to_search_permissions_mediator_unittest.mm", ] deps = [ ":contextual_search", ":resources_unit_tests", ":test_support", "//base", "//base/test:test_support", "//components/pref_registry", "//components/prefs", "//components/search_engines", "//ios/chrome/browser", "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/search_engines", "//ios/chrome/browser/sync", "//ios/chrome/browser/sync:test_support", "//ios/chrome/browser/web:test_support", "//ios/web", "//ios/web/public/test", "//net", "//testing/gtest", "//third_party/ocmock", ] }