#include "device/gamepad/nintendo_data_fetcher.h"
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted_memory.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
#include "device/gamepad/gamepad_service.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_service.h"
#include "services/device/public/mojom/hid.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
namespace {
#if BUILDFLAG(IS_MAC)
const uint64_t kTestDeviceId = 123;
#elif BUILDFLAG(IS_WIN)
const wchar_t kTestDeviceId[] = L"123";
#else
const char kTestDeviceId[] = …;
#endif
const char kPhysicalDeviceId[] = …;
void BindHidManager(mojom::DeviceService* service,
scoped_refptr<base::SequencedTaskRunner> task_runner,
mojo::PendingReceiver<mojom::HidManager> receiver) { … }
}
class NintendoDataFetcherTest : public DeviceServiceTestBase { … };
TEST_F(NintendoDataFetcherTest, UnsupportedDeviceIsIgnored) { … }
TEST_F(NintendoDataFetcherTest, IgnoreInvalidNintendoDevice) { … }
TEST_F(NintendoDataFetcherTest, AddAndRemoveSwitchPro) { … }
}