| # Copyright 2018 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") | 
 |  | 
 | component("ios") { | 
 |   configs += [ "//build/config/compiler:enable_arc" ] | 
 |  | 
 |   deps = [ | 
 |     "//base", | 
 |     "//components/autofill/core/common", | 
 |     "//components/autofill/ios/browser", | 
 |     "//components/autofill/ios/form_util", | 
 |     "//components/password_manager/core/browser", | 
 |     "//components/password_manager/core/browser/form_parsing", | 
 |     "//components/password_manager/core/common", | 
 |     "//components/security_state/ios", | 
 |     "//ios/web/common", | 
 |     "//ios/web/public", | 
 |     "//ios/web/public/deprecated", | 
 |     "//ios/web/public/js_messaging", | 
 |     "//url", | 
 |   ] | 
 |  | 
 |   sources = [ | 
 |     "account_select_fill_data.cc", | 
 |     "account_select_fill_data.h", | 
 |     "credential_manager_util.h", | 
 |     "credential_manager_util.mm", | 
 |     "js_password_manager.h", | 
 |     "js_password_manager.mm", | 
 |     "password_form_helper.h", | 
 |     "password_form_helper.mm", | 
 |     "password_suggestion_helper.h", | 
 |     "password_suggestion_helper.mm", | 
 |   ] | 
 | } | 
 |  | 
 | static_library("test_support") { | 
 |   testonly = true | 
 |   sources = [ | 
 |     "test_helpers.cc", | 
 |     "test_helpers.h", | 
 |   ] | 
 |  | 
 |   deps = [ | 
 |     ":ios", | 
 |     "//base", | 
 |     "//components/autofill/core/common", | 
 |     "//url", | 
 |   ] | 
 | } | 
 |  | 
 | source_set("unit_tests") { | 
 |   configs += [ "//build/config/compiler:enable_arc" ] | 
 |   testonly = true | 
 |   sources = [ | 
 |     "account_select_fill_data_unittest.cc", | 
 |     "credential_manager_util_unittest.cc", | 
 |     "password_form_helper_unittest.mm", | 
 |   ] | 
 |   deps = [ | 
 |     ":ios", | 
 |     ":test_bundle", | 
 |     ":test_support", | 
 |     "//base", | 
 |     "//base/test:test_support", | 
 |     "//components/autofill/core/common", | 
 |     "//components/password_manager/core/browser", | 
 |     "//components/password_manager/core/browser:test_support", | 
 |     "//ios/web/public/test", | 
 |     "//ios/web/public/test/fakes", | 
 |     "//testing/gtest", | 
 |   ] | 
 | } | 
 |  | 
 | js_compile_bundle("test_bundle") { | 
 |   closure_entry_point = "__crWeb.testBundle" | 
 |   testonly = true | 
 |   sources = [ | 
 |     "//components/autofill/ios/form_util/resources/fill.js", | 
 |     "//components/autofill/ios/form_util/resources/form.js", | 
 |     "resources/password_controller.js", | 
 |     "resources/test_bundle.js", | 
 |   ] | 
 | } |