mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 08:16:09 +03:00
106 lines
2.2 KiB
Plaintext
106 lines
2.2 KiB
Plaintext
|
# Copyright 2014 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("//build/config/features.gni")
|
||
|
import("//testing/libfuzzer/fuzzer_test.gni")
|
||
|
|
||
|
source_set("hid") {
|
||
|
# HID is not implemented on Android and we want to be particularly careful
|
||
|
# about not bloating binary size by accidentially including it.
|
||
|
assert(!is_android)
|
||
|
|
||
|
sources = [
|
||
|
"hid_collection_info.cc",
|
||
|
"hid_collection_info.h",
|
||
|
"hid_connection.cc",
|
||
|
"hid_connection.h",
|
||
|
"hid_connection_impl.cc",
|
||
|
"hid_connection_impl.h",
|
||
|
"hid_connection_linux.cc",
|
||
|
"hid_connection_linux.h",
|
||
|
"hid_connection_mac.cc",
|
||
|
"hid_connection_mac.h",
|
||
|
"hid_connection_win.cc",
|
||
|
"hid_connection_win.h",
|
||
|
"hid_device_filter.cc",
|
||
|
"hid_device_filter.h",
|
||
|
"hid_device_info.cc",
|
||
|
"hid_device_info.h",
|
||
|
"hid_manager_impl.cc",
|
||
|
"hid_manager_impl.h",
|
||
|
"hid_report_descriptor.cc",
|
||
|
"hid_report_descriptor.h",
|
||
|
"hid_report_descriptor_item.cc",
|
||
|
"hid_report_descriptor_item.h",
|
||
|
"hid_service.cc",
|
||
|
"hid_service.h",
|
||
|
"hid_service_mac.cc",
|
||
|
"hid_service_mac.h",
|
||
|
"hid_service_win.cc",
|
||
|
"hid_service_win.h",
|
||
|
"hid_usage_and_page.cc",
|
||
|
"hid_usage_and_page.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//components/device_event_log",
|
||
|
"//device/base",
|
||
|
"//net",
|
||
|
]
|
||
|
|
||
|
public_deps = [
|
||
|
"//device/hid/public/interfaces",
|
||
|
]
|
||
|
|
||
|
if (is_linux && use_udev) {
|
||
|
sources += [
|
||
|
"fake_input_service_linux.cc",
|
||
|
"fake_input_service_linux.h",
|
||
|
"hid_service_linux.cc",
|
||
|
"hid_service_linux.h",
|
||
|
"input_service_linux.cc",
|
||
|
"input_service_linux.h",
|
||
|
]
|
||
|
deps += [ "//device/udev_linux" ]
|
||
|
}
|
||
|
|
||
|
if (is_chromeos) {
|
||
|
deps += [ "//chromeos" ]
|
||
|
}
|
||
|
|
||
|
if (is_win) {
|
||
|
libs = [
|
||
|
"hid.lib",
|
||
|
"setupapi.lib",
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
source_set("mocks") {
|
||
|
testonly = true
|
||
|
|
||
|
sources = [
|
||
|
"mock_hid_connection.cc",
|
||
|
"mock_hid_connection.h",
|
||
|
"mock_hid_service.cc",
|
||
|
"mock_hid_service.h",
|
||
|
]
|
||
|
|
||
|
public_deps = [
|
||
|
":hid",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
fuzzer_test("hid_report_descriptor_fuzzer") {
|
||
|
sources = [
|
||
|
"hid_report_descriptor_fuzzer.cc",
|
||
|
]
|
||
|
deps = [
|
||
|
":hid",
|
||
|
]
|
||
|
seed_corpus = "fuzz_corpus"
|
||
|
libfuzzer_options = [ "max_len=2048" ]
|
||
|
}
|