#include <string_view>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "build/build_config.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/device/device_service_test_base.h"
#include "services/device/hid/hid_manager_impl.h"
#include "services/device/public/cpp/test/mock_hid_connection.h"
#include "services/device/public/cpp/test/mock_hid_service.h"
#include "services/device/public/mojom/hid.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
namespace {
ElementsAreArray;
#if BUILDFLAG(IS_MAC)
const uint64_t kTestDeviceIds[] = {0, 1, 2, 3};
#elif BUILDFLAG(IS_WIN)
const wchar_t* const kTestDeviceIds[] = {L"0", L"1", L"2", L"3"};
#else
const char* const kTestDeviceIds[] = …;
#endif
class MockHidManagerClient : public mojom::HidManagerClient { … };
class HidManagerTest : public DeviceServiceTestBase { … };
TEST_F(HidManagerTest, GetDevicesOnly) { … }
TEST_F(HidManagerTest, GetDevicesAndSetClient) { … }
TEST_F(HidManagerTest, DeviceChangedBeforeFirstEnumeration) { … }
TEST_F(HidManagerTest, DeviceChangedAfterFirstEnumeration) { … }
TEST_F(HidManagerTest, DeviceAddedAndChangedAfterFirstEnumeration) { … }
TEST_F(HidManagerTest, TestHidConnectionInterface) { … }
}
}