#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "services/device/hid/hid_service_linux.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "device/udev_linux/fake_udev_loader.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
namespace {
constexpr char kSubsystemBluetooth[] = …;
constexpr char kSubsystemHid[] = …;
constexpr char kSubsystemHidraw[] = …;
constexpr char kSubsystemMisc[] = …;
constexpr char kSubsystemUsb[] = …;
constexpr char kDevnodeHidraw0[] = …;
constexpr char kDevtypeUsbDevice[] = …;
constexpr char kDevtypeUsbInterface[] = …;
constexpr char kDevtypeLink[] = …;
constexpr char kPropertyValueHidName[] = …;
class HidServiceLinuxTest : public testing::Test { … };
}
TEST_F(HidServiceLinuxTest, EnumerateUsbHidDevice) { … }
TEST_F(HidServiceLinuxTest, EnumerateBluetoothClassicHidDevice) { … }
TEST_F(HidServiceLinuxTest, EnumerateBleHidDevice) { … }
}