chromium/components/autofill/content/renderer/BUILD.gn

# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

static_library("renderer") {
  sources = [
    "a11y_utils.cc",
    "a11y_utils.h",
    "autofill_agent.cc",
    "autofill_agent.h",
    "form_autofill_issues.cc",
    "form_autofill_issues.h",
    "form_autofill_util.cc",
    "form_autofill_util.h",
    "form_cache.cc",
    "form_cache.h",
    "form_tracker.cc",
    "form_tracker.h",
    "html_based_username_detector.cc",
    "html_based_username_detector.h",
    "html_based_username_detector_vocabulary.h",
    "page_form_analyser_logger.cc",
    "page_form_analyser_logger.h",
    "page_passwords_analyser.cc",
    "page_passwords_analyser.h",
    "password_autofill_agent.cc",
    "password_autofill_agent.h",
    "password_form_conversion_utils.cc",
    "password_form_conversion_utils.h",
    "password_generation_agent.cc",
    "password_generation_agent.h",
    "prefilled_values_detector.cc",
    "prefilled_values_detector.h",
    "renderer_save_password_progress_logger.cc",
    "renderer_save_password_progress_logger.h",
    "suggestion_properties.cc",
    "suggestion_properties.h",
    "timing.cc",
    "timing.h",
  ]

  deps = [
    "//base",
    "//base:i18n",
    "//components/autofill/content/common/mojom",
    "//components/autofill/core/common:autofill_regex",
    "//components/password_manager/core/common:common",
    "//components/safe_browsing:buildflags",
    "//components/strings",
    "//content/public/common",
    "//content/public/renderer",
    "//google_apis",
    "//mojo/public/cpp/system",
    "//net",
    "//services/service_manager/public/cpp",
    "//skia",
    "//third_party/blink/public:blink",
    "//third_party/blink/public/common",
    "//third_party/re2",
    "//ui/base",
  ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]
}

static_library("test_support") {
  testonly = true
  sources = [
    "autofill_agent_test_api.h",
    "autofill_renderer_test.cc",
    "autofill_renderer_test.h",
    "focus_test_utils.cc",
    "focus_test_utils.h",
    "form_cache_test_api.h",
    "form_tracker_test_api.h",
    "test_password_autofill_agent.cc",
    "test_password_autofill_agent.h",
    "test_utils.cc",
    "test_utils.h",
  ]

  public_deps = [
    ":renderer",
    "//base",
    "//components/autofill/content/common/mojom",
    "//content/test:test_support",
  ]
  deps = [
    "//components/autofill/content/renderer",
    "//components/autofill/core/common",
    "//content/public/renderer",
    "//services/service_manager/public/cpp",
    "//skia",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/blink/public:blink",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "prefilled_values_detector_unittest.cc",
    "renderer_save_password_progress_logger_unittest.cc",
  ]

  deps = [
    ":test_support",
    "//base/test:test_support",
    "//components/autofill/content/common/mojom",
    "//components/autofill/core/common",
    "//testing/gtest",
  ]
}

source_set("browser_tests") {
  testonly = true
  sources = [
    "a11y_utils_browsertest.cc",
    "autofill_agent_browsertest.cc",
    "autofill_agent_form_interaction_browsertest.cc",
    "form_autofill_issues_browsertest.cc",
    "form_autofill_util_browsertest.cc",
    "form_cache_browsertest.cc",
    "form_tracker_browsertest.cc",
    "html_based_username_detector_browsertest.cc",
    "password_form_conversion_utils_browsertest.cc",
  ]

  deps = [
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//components/autofill/content/common/mojom",
    "//components/autofill/core/common",
    "//components/autofill/core/common:test_support",
    "//content/public/renderer",
    "//google_apis:google_apis",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/blink/public:blink",
  ]
}