#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "device/gamepad/gamepad_service.h"
#include <string.h>
#include <memory>
#include "base/barrier_closure.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/task_environment.h"
#include "device/gamepad/gamepad_consumer.h"
#include "device/gamepad/gamepad_test_helpers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
namespace {
RunClosure;
constexpr int kNumberOfGamepads = …;
}
class MockGamepadConsumer : public GamepadConsumer { … };
class GamepadServiceTest : public testing::Test { … };
TEST_F(GamepadServiceTest, ConnectionsTest) { … }
TEST_F(GamepadServiceTest, ConnectionThenGestureTest) { … }
TEST_F(GamepadServiceTest, ReloadTest) { … }
TEST_F(GamepadServiceTest, SecondConsumerGestureTest) { … }
TEST_F(GamepadServiceTest, ConnectWhileInactiveTest) { … }
TEST_F(GamepadServiceTest, DISABLED_ConnectAndDisconnectWhileInactiveTest) { … }
TEST_F(GamepadServiceTest, DISABLED_DisconnectWhileInactiveTest) { … }
TEST_F(GamepadServiceTest, DisconnectAndConnectWhileInactiveTest) { … }
TEST_F(GamepadServiceTest, ActiveConsumerBecameActive) { … }
TEST_F(GamepadServiceTest, InactiveConsumerBecameInactive) { … }
TEST_F(GamepadServiceTest, UnregisteredConsumerBecameInactive) { … }
TEST_F(GamepadServiceTest, RemoveUnregisteredConsumer) { … }
}