blob: 99fb26afe281e63ed9d78d88059675f49cbe6a2c [file] [log] [blame]
# 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("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
import("//third_party/protobuf/proto_library.gni")
assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos")
component("network") {
defines = [ "IS_CHROMEOS_NETWORK_IMPL" ]
deps = [
"//base",
"//base:i18n",
"//chromeos/constants",
"//chromeos/dbus:common",
"//chromeos/dbus/permission_broker",
"//chromeos/dbus/shill",
"//chromeos/login/login_state",
"//components/account_id",
"//components/certificate_matching",
"//components/device_event_log",
"//components/onc",
"//components/pref_registry",
"//components/prefs",
"//components/proxy_config",
"//components/url_formatter",
"//components/user_manager",
"//crypto",
"//dbus",
"//net",
"//skia",
"//url",
]
sources = [
"auto_connect_handler.cc",
"auto_connect_handler.h",
"certificate_helper.cc",
"certificate_helper.h",
"client_cert_resolver.cc",
"client_cert_resolver.h",
"client_cert_util.cc",
"client_cert_util.h",
"device_state.cc",
"device_state.h",
"dhcp_pac_file_fetcher_chromeos.cc",
"dhcp_pac_file_fetcher_chromeos.h",
"dhcp_pac_file_fetcher_factory_chromeos.cc",
"dhcp_pac_file_fetcher_factory_chromeos.h",
"fast_transition_observer.cc",
"fast_transition_observer.h",
"firewall_hole.cc",
"firewall_hole.h",
"geolocation_handler.cc",
"geolocation_handler.h",
"managed_network_configuration_handler.cc",
"managed_network_configuration_handler.h",
"managed_network_configuration_handler_impl.cc",
"managed_network_configuration_handler_impl.h",
"managed_state.cc",
"managed_state.h",
"network_activation_handler.cc",
"network_activation_handler.h",
"network_cert_loader.cc",
"network_cert_loader.h",
"network_cert_migrator.cc",
"network_cert_migrator.h",
"network_certificate_handler.cc",
"network_certificate_handler.h",
"network_configuration_handler.cc",
"network_configuration_handler.h",
"network_configuration_observer.h",
"network_connect.cc",
"network_connect.h",
"network_connection_handler.cc",
"network_connection_handler.h",
"network_connection_handler_impl.cc",
"network_connection_handler_impl.h",
"network_connection_observer.cc",
"network_connection_observer.h",
"network_device_handler.cc",
"network_device_handler.h",
"network_device_handler_impl.cc",
"network_device_handler_impl.h",
"network_event_log.h",
"network_handler.cc",
"network_handler.h",
"network_handler_callbacks.cc",
"network_handler_callbacks.h",
"network_ip_config.cc",
"network_ip_config.h",
"network_profile.cc",
"network_profile.h",
"network_profile_handler.cc",
"network_profile_handler.h",
"network_profile_observer.h",
"network_sms_handler.cc",
"network_sms_handler.h",
"network_state.cc",
"network_state.h",
"network_state_handler.cc",
"network_state_handler.h",
"network_state_handler_observer.cc",
"network_state_handler_observer.h",
"network_type_pattern.cc",
"network_type_pattern.h",
"network_ui_data.cc",
"network_ui_data.h",
"network_util.cc",
"network_util.h",
"onc/onc_certificate_importer.h",
"onc/onc_certificate_importer_impl.cc",
"onc/onc_certificate_importer_impl.h",
"onc/onc_certificate_pattern.cc",
"onc/onc_certificate_pattern.h",
"onc/onc_mapper.cc",
"onc/onc_mapper.h",
"onc/onc_merger.cc",
"onc/onc_merger.h",
"onc/onc_normalizer.cc",
"onc/onc_normalizer.h",
"onc/onc_parsed_certificates.cc",
"onc/onc_parsed_certificates.h",
"onc/onc_signature.cc",
"onc/onc_signature.h",
"onc/onc_translation_tables.cc",
"onc/onc_translation_tables.h",
"onc/onc_translator.h",
"onc/onc_translator_onc_to_shill.cc",
"onc/onc_translator_shill_to_onc.cc",
"onc/onc_utils.cc",
"onc/onc_utils.h",
"onc/onc_validator.cc",
"onc/onc_validator.h",
"onc/variable_expander.cc",
"onc/variable_expander.h",
"policy_applicator.cc",
"policy_applicator.h",
"policy_certificate_provider.h",
"policy_util.cc",
"policy_util.h",
"portal_detector/network_portal_detector.cc",
"portal_detector/network_portal_detector.h",
"portal_detector/network_portal_detector_strategy.cc",
"portal_detector/network_portal_detector_strategy.h",
"portal_detector/network_portal_detector_stub.cc",
"portal_detector/network_portal_detector_stub.h",
"prohibited_technologies_handler.cc",
"prohibited_technologies_handler.h",
"proxy/proxy_config_handler.cc",
"proxy/proxy_config_handler.h",
"proxy/proxy_config_service_impl.cc",
"proxy/proxy_config_service_impl.h",
"proxy/ui_proxy_config_service.cc",
"proxy/ui_proxy_config_service.h",
"shill_property_handler.cc",
"shill_property_handler.h",
"shill_property_util.cc",
"shill_property_util.h",
"tether_constants.cc",
"tether_constants.h",
]
}
source_set("test_support") {
testonly = true
public_deps = [
":network",
]
deps = [
"//base",
"//chromeos:test_utils",
"//chromeos/dbus:test_support",
"//dbus",
"//net:test_support",
"//testing/gmock",
"//testing/gtest",
]
sources = [
"fake_network_device_handler.cc",
"fake_network_device_handler.h",
"mock_managed_network_configuration_handler.cc",
"mock_managed_network_configuration_handler.h",
"mock_network_device_handler.cc",
"mock_network_device_handler.h",
"mock_network_state_handler.cc",
"mock_network_state_handler.h",
"network_state_test_helper.cc",
"network_state_test_helper.h",
"onc/onc_test_utils.cc",
"onc/onc_test_utils.h",
"portal_detector/mock_network_portal_detector.cc",
"portal_detector/mock_network_portal_detector.h",
]
}
source_set("unit_tests") {
testonly = true
deps = [
":network",
":test_support",
"//base",
"//base:i18n",
"//base/test:test_support",
"//chromeos:test_utils",
"//chromeos/constants",
"//chromeos/dbus:test_support",
"//chromeos/dbus/permission_broker",
"//chromeos/login/login_state",
"//components/onc",
"//components/prefs",
"//components/prefs:test_support",
"//components/proxy_config",
"//components/sync_preferences:test_support",
"//crypto",
"//crypto:test_support",
"//dbus",
"//net",
"//net:test_support",
"//testing/gmock",
"//testing/gtest",
]
sources = [
"auto_connect_handler_unittest.cc",
"certificate_helper_unittest.cc",
"client_cert_resolver_unittest.cc",
"fast_transition_observer_unittest.cc",
"firewall_hole_unittest.cc",
"geolocation_handler_unittest.cc",
"managed_network_configuration_handler_unittest.cc",
"network_cert_loader_unittest.cc",
"network_cert_migrator_unittest.cc",
"network_configuration_handler_unittest.cc",
"network_connect_unittest.cc",
"network_connection_handler_impl_unittest.cc",
"network_device_handler_unittest.cc",
"network_sms_handler_unittest.cc",
"network_state_handler_unittest.cc",
"network_state_unittest.cc",
"network_type_pattern_unittest.cc",
"network_ui_data_unittest.cc",
"network_util_unittest.cc",
"onc/onc_certificate_importer_impl_unittest.cc",
"onc/onc_certificate_pattern_unittest.cc",
"onc/onc_merger_unittest.cc",
"onc/onc_normalizer_unittest.cc",
"onc/onc_parsed_certificates_unittest.cc",
"onc/onc_translator_unittest.cc",
"onc/onc_utils_unittest.cc",
"onc/onc_validator_unittest.cc",
"onc/variable_expander_unittest.cc",
"prohibited_technologies_handler_unittest.cc",
"proxy/proxy_config_service_impl_unittest.cc",
"proxy/ui_proxy_config_service_unittest.cc",
"shill_property_handler_unittest.cc",
]
}
fuzzer_test("variable_expander_fuzzer") {
sources = [
"onc/variable_expander_fuzzer.cc",
]
seed_corpus = "//chromeos/test/data/variable_expander/fuzzer_corpus"
dict = "//chromeos/test/data/variable_expander/fuzzer.dict"
deps = [
":network",
"//base/test:test_support",
]
}