blob: f248cb80161c5809094df03113c8442750a495c6 [file] [log] [blame]
# Copyright 2020 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("policy") {
sources = [
"browser_policy_connector_ios.h",
"browser_policy_connector_ios.mm",
"browser_state_policy_connector.h",
"browser_state_policy_connector.mm",
"browser_state_policy_connector_factory.h",
"browser_state_policy_connector_factory.mm",
"configuration_policy_handler_list_factory.h",
"configuration_policy_handler_list_factory.mm",
"policy_conversions_client_ios.h",
"policy_conversions_client_ios.mm",
"schema_registry_factory.h",
"schema_registry_factory.mm",
]
deps = [
"//base",
"//components/bookmarks/managed",
"//components/password_manager/core/common",
"//components/policy:generated",
"//components/policy/core/common",
"//ios/chrome/browser",
"//ios/chrome/browser:pref_names",
"//ios/chrome/browser/browser_state",
"//services/network/public/cpp",
]
public_deps = [
":feature_flags",
"//components/policy/core/browser",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("feature_flags") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"policy_features.cc",
"policy_features.h",
]
deps = [
"//base",
"//components/version_info",
"//ios/chrome/browser:utils",
"//ios/chrome/common",
]
}
source_set("test_support") {
testonly = true
sources = [
"test_platform_policy_provider.cc",
"test_platform_policy_provider.h",
]
deps = [ "//base" ]
public_deps = [
"//components/policy/core/common:test_support",
"//testing/gmock",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("unit_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [ "policy_unittest.mm" ]
deps = [
":policy",
":test_support",
"//base",
"//base/test:test_support",
"//components/password_manager/core/common",
"//components/pref_registry",
"//components/prefs",
"//components/sync_preferences",
"//ios/chrome/browser:pref_names",
"//ios/chrome/browser:utils",
"//ios/chrome/browser/prefs",
"//ios/chrome/browser/prefs:browser_prefs",
"//testing/gtest",
]
}
source_set("eg2_tests") {
defines = [ "CHROME_EARL_GREY_2" ]
configs += [
"//build/config/compiler:enable_arc",
"//build/config/ios:xctest_config",
]
testonly = true
sources = [
"policy_egtest.mm",
"policy_platform_provider_egtest.mm",
]
deps = [
":eg_test_support+eg2",
"//base",
"//components/password_manager/core/common",
"//components/policy:generated",
"//components/policy/core/common:common_constants",
"//components/strings",
"//ios/chrome/browser:pref_names",
"//ios/chrome/browser:utils",
"//ios/chrome/test/earl_grey:eg_test_support+eg2",
"//ios/testing/earl_grey:eg_test_support+eg2",
"//ios/third_party/earl_grey2:test_lib",
"//ui/base",
]
libs = [ "UIKit.framework" ]
}
source_set("eg_app_support+eg2") {
defines = [ "CHROME_EARL_GREY_2" ]
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"policy_app_interface.h",
"policy_app_interface.mm",
]
deps = [
":policy",
":test_support",
"//base",
"//components/policy:generated",
"//components/policy/core/browser",
"//components/policy/core/common",
"//ios/chrome/browser",
]
libs = [ "Foundation.framework" ]
}
source_set("eg_test_support+eg2") {
defines = [ "CHROME_EARL_GREY_2" ]
configs += [
"//build/config/compiler:enable_arc",
"//build/config/ios:xctest_config",
]
testonly = true
sources = [
"policy_app_interface.h",
"policy_app_interface_stub.mm",
]
deps = [
"//ios/testing/earl_grey:eg_test_support+eg2",
"//ios/third_party/earl_grey2:test_lib",
]
}