chromium/ui/events/ozone/evdev/gamepad_event_converter_evdev_unittest.cc

// Copyright 2017 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 "ui/events/ozone/evdev/gamepad_event_converter_evdev.h"

#include <errno.h>
#include <fcntl.h>
#include <linux/input.h>
#include <unistd.h>

#include <memory>
#include <queue>
#include <utility>
#include <vector>

#include "base/files/file_util.h"
#include "base/files/scoped_file.h"
#include "base/functional/bind.h"
#include "base/posix/eintr_wrapper.h"
#include "base/run_loop.h"
#include "base/time/time.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/base_event_utils.h"
#include "ui/events/devices/device_util_linux.h"
#include "ui/events/event.h"
#include "ui/events/ozone/device/device_manager.h"
#include "ui/events/ozone/evdev/event_converter_test_util.h"
#include "ui/events/ozone/evdev/event_device_test_util.h"
#include "ui/events/ozone/evdev/event_factory_evdev.h"
#include "ui/events/ozone/gamepad/gamepad_event.h"
#include "ui/events/ozone/gamepad/gamepad_observer.h"
#include "ui/events/ozone/gamepad/gamepad_provider_ozone.h"
#include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h"
#include "ui/events/platform/platform_event_dispatcher.h"
#include "ui/events/platform/platform_event_source.h"
#include "ui/events/test/scoped_event_test_tick_clock.h"

namespace {

const char kTestDevicePath[] =;

constexpr char kXboxGamepadLogDescription[] =;

class TestGamepadObserver : public ui::GamepadObserver {};

}  // namespace

namespace ui {

class TestGamepadEventConverterEvdev : public ui::GamepadEventConverterEvdev {};

class GamepadEventConverterEvdevTest : public testing::Test {};

struct ExpectedEvent {};

struct ExpectedVibrationEvent {};

struct ExpectedVibrationEffect {};

TEST_F(GamepadEventConverterEvdevTest, XboxGamepadEvents) {}

TEST_F(GamepadEventConverterEvdevTest, XboxGamepadVibrationEvents) {}

TEST_F(GamepadEventConverterEvdevTest, XboxGamepadHasKeys) {}

TEST_F(GamepadEventConverterEvdevTest, DescribeStateForLog) {}

}  // namespace ui