chromium/device/gamepad/gamepad_provider_unittest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "device/gamepad/gamepad_provider.h"

#include <memory>

#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
#include "device/gamepad/gamepad_data_fetcher.h"
#include "device/gamepad/gamepad_test_helpers.h"
#include "device/gamepad/public/cpp/gamepad_switches.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace device {

namespace {

// Helper class to generate and record user gesture callbacks.
class UserGestureListener {};

class TestChangeClient : public GamepadChangeClient {};

// Main test fixture
class GamepadProviderTest : public testing::Test, public GamepadTestHelper {};

TEST_F(GamepadProviderTest, PollingAccess) {}

TEST_F(GamepadProviderTest, ConnectDisconnectMultiple) {}

// Tests that waiting for a user gesture works properly.
TEST_F(GamepadProviderTest, UserGesture) {}

// Tests that waiting for a user gesture works properly.
TEST_F(GamepadProviderTest, Sanitization) {}

TEST_F(GamepadProviderTest, SendEvents) {}

TEST_F(GamepadProviderTest, DontSendEventsBeforeUserGesture) {}

TEST_F(GamepadProviderTest, DontSendEventsWhenDisconnected) {}

TEST_F(GamepadProviderTest, DontSendEventsOnConnection) {}

}  // namespace

}  // namespace device