#include "services/device/hid/hid_connection.h"
#include <stddef.h>
#include <memory>
#include <string>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/ref_counted_memory.h"
#include "base/run_loop.h"
#include "base/scoped_observation.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "base/test/test_io_thread.h"
#include "build/build_config.h"
#include "services/device/hid/hid_connection.h"
#include "services/device/hid/hid_service.h"
#include "services/device/public/cpp/test/test_report_descriptors.h"
#include "services/device/public/mojom/hid.mojom.h"
#include "services/device/test/usb_test_gadget.h"
#include "services/device/usb/usb_device.h"
#include "services/device/usb/usb_service.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
namespace {
TestFuture;
class DeviceCatcher : HidService::Observer { … };
class TestConnectCallback { … };
class TestIoCallback { … };
}
class HidConnectionTest : public testing::Test { … };
TEST_F(HidConnectionTest, ReadWrite) { … }
namespace {
class TestHidConnection : public HidConnection { … };
}
class HidConnectionProtectedReportTest : public testing::Test,
HidConnection::Client { … };
TEST_F(HidConnectionProtectedReportTest, UnprotectedReadWrite) { … }
TEST_F(HidConnectionProtectedReportTest, ProtectedReportsWithClient) { … }
TEST_F(HidConnectionProtectedReportTest, ProtectedInputReportWithoutClient) { … }
}