#include "ui/events/ozone/evdev/event_converter_evdev_impl.h"
#include <linux/input.h>
#include <memory>
#include <utility>
#include "base/files/scoped_file.h"
#include "base/functional/bind.h"
#include "base/test/task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/re2/src/re2/re2.h"
#include "ui/events/event.h"
#include "ui/events/keycodes/dom/dom_code.h"
#include "ui/events/keycodes/keyboard_codes.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/evdev/keyboard_evdev.h"
#include "ui/events/ozone/evdev/testing/fake_cursor_delegate_evdev.h"
#include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h"
#include "ui/events/test/scoped_event_test_tick_clock.h"
namespace ui {
const char kTestDevicePath[] = …;
class MockEventConverterEvdevImpl : public EventConverterEvdevImpl { … };
}
constexpr char kDefaultDeviceLogDescription[] = …;
constexpr char kLogitechKeyboardK120LogDescription[] = …;
constexpr char kDrawciaStylusGarageLogDescription[] = …;
constexpr char kRedrixTouchpadLogDescription[] = …;
class EventConverterEvdevImplTest : public testing::Test { … };
class EventConverterEvdevImplLogTest : public EventConverterEvdevImplTest { … };
class DeferDeviceSetUpEventConverterEvdevImplTest
: public EventConverterEvdevImplTest { … };
TEST_F(EventConverterEvdevImplTest, KeyPress) { … }
TEST_F(EventConverterEvdevImplTest, KeyRepeat) { … }
TEST_F(EventConverterEvdevImplTest, NoEvents) { … }
TEST_F(EventConverterEvdevImplTest, KeyWithModifier) { … }
TEST_F(EventConverterEvdevImplTest, KeyWithDuplicateModifier) { … }
TEST_F(EventConverterEvdevImplTest, KeyWithLock) { … }
TEST_F(EventConverterEvdevImplTest, MouseButton) { … }
TEST_F(EventConverterEvdevImplTest, MouseMove) { … }
TEST_F(EventConverterEvdevImplTest, UnmappedKeyPress) { … }
TEST_F(EventConverterEvdevImplTest, ShouldReleaseKeysOnUnplug) { … }
TEST_F(EventConverterEvdevImplTest, ShouldReleaseKeysOnSynDropped) { … }
TEST_F(EventConverterEvdevImplTest, ShouldReleaseKeysOnDisable) { … }
TEST_F(EventConverterEvdevImplTest, SetAllowedKeys) { … }
TEST_F(EventConverterEvdevImplTest, SetAllowedKeysBlockedKeyPressed) { … }
TEST_F(EventConverterEvdevImplTest, SetBlockModifiers) { … }
TEST_F(EventConverterEvdevImplTest, SetBlockModifiersWithModifierHeldDown) { … }
TEST_F(EventConverterEvdevImplTest, ShouldSwapMouseButtonsFromUserPreference) { … }
TEST_F(DeferDeviceSetUpEventConverterEvdevImplTest, KeyboardHasKeys) { … }
TEST_F(EventConverterEvdevImplLogTest, Basic) { … }
TEST_F(EventConverterEvdevImplLogTest, BasicKeyboard) { … }
TEST_F(EventConverterEvdevImplLogTest, BasicStylusGarage) { … }
TEST_F(EventConverterEvdevImplLogTest, BasicTouchpad) { … }
TEST_F(EventConverterEvdevImplLogTest, ChangeVendor) { … }
TEST_F(EventConverterEvdevImplLogTest, ChangeProduct) { … }
TEST_F(EventConverterEvdevImplLogTest, ChangeVersion) { … }
TEST_F(EventConverterEvdevImplLogTest, ChangeName) { … }
TEST_F(EventConverterEvdevImplLogTest, ChangeInputDeviceType) { … }
TEST_F(EventConverterEvdevImplLogTest, ChangeEnabled) { … }
TEST_F(EventConverterEvdevImplLogTest, ChangeKeyboardImposter) { … }
TEST_F(EventConverterEvdevImplLogTest, ChangeMouseImposter) { … }
TEST_F(EventConverterEvdevImplLogTest, ChangeKeyboardType) { … }
TEST_F(EventConverterEvdevImplLogTest, ChangeCapslockLED) { … }