chromium/ui/ozone/platform/wayland/host/wayland_touch_unittest.cc

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

#include <linux/input.h>
#include <stylus-unstable-v2-server-protocol.h>
#include <wayland-server.h>
#include <cstdint>
#include <memory>

#include "base/memory/raw_ptr.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/devices/device_data_manager.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
#include "ui/ozone/platform/wayland/host/wayland_seat.h"
#include "ui/ozone/platform/wayland/host/wayland_window.h"
#include "ui/ozone/platform/wayland/test/mock_surface.h"
#include "ui/ozone/platform/wayland/test/test_keyboard.h"
#include "ui/ozone/platform/wayland/test/test_touch.h"
#include "ui/ozone/platform/wayland/test/test_wayland_server_thread.h"
#include "ui/ozone/platform/wayland/test/test_zcr_touch_stylus.h"
#include "ui/ozone/platform/wayland/test/wayland_test.h"
#include "ui/ozone/test/mock_platform_window_delegate.h"

#if BUILDFLAG(USE_XKBCOMMON)
#include "base/memory/free_deleter.h"
#include "base/memory/platform_shared_memory_region.h"
#include "base/memory/shared_memory_mapping.h"
#include "base/memory/unsafe_shared_memory_region.h"
#include "ui/events/keycodes/scoped_xkb.h"  // nogncheck
#endif

_;
SaveArg;
Values;

namespace ui {

namespace {

ACTION_P(CloneEvent, ptr) {}

}  // namespace

class WaylandTouchTest : public WaylandTestSimple {};

TEST_F(WaylandTouchTest, TouchPressAndMotion) {}

// Tests that touch events with stylus pen work.
TEST_F(WaylandTouchTest, TouchPressAndMotionWithStylus) {}

// Tests that touch events with stylus pen work. This variant of the test sends
// the tool information after the touch down event, and ensures that
// wl_touch::frame event handles it correctly.
TEST_F(WaylandTouchTest, TouchPressAndMotionWithStylus2) {}

// Tests that touch focus is correctly set and released.
TEST_F(WaylandTouchTest, CheckTouchFocus) {}

// Verifies keyboard modifier flags are set in touch events while modifier keys
// are pressed. Regression test for https://crbug.com/1298604.
TEST_F(WaylandTouchTest, KeyboardFlagsSet) {}

}  // namespace ui