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

// Copyright 2020 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/stylus_button_event_converter_evdev.h"

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

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

#include "base/files/file_util.h"
#include "base/files/scoped_file.h"
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/posix/eintr_wrapper.h"
#include "base/run_loop.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.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/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 kDellActivePenButtonLogDescription[] =;

}  // namespace

namespace ui {

class MockStylusButtonEventConverterEvdev
    : public StylusButtonEventConverterEvdev {};

MockStylusButtonEventConverterEvdev::MockStylusButtonEventConverterEvdev(
    base::ScopedFD fd,
    base::FilePath path,
    const EventDeviceInfo& devinfo,
    DeviceEventDispatcherEvdev* dispatcher)
    :{}

void MockStylusButtonEventConverterEvdev::ConfigureReadMock(
    struct input_event* queue,
    long read_this_many,
    long queue_index) {}

}  // namespace ui

// Test fixture.
class StylusButtonEventConverterEvdevTest : public testing::Test {};

TEST_F(StylusButtonEventConverterEvdevTest, DellActivePenSingleClick) {}

TEST_F(StylusButtonEventConverterEvdevTest, DellActivePenDoubleClick) {}

TEST_F(StylusButtonEventConverterEvdevTest, DellActivePenLongPress) {}

TEST_F(StylusButtonEventConverterEvdevTest, DescribeStateForLog) {}