#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <utility>
#include "build/build_config.h"
#include "mojo/public/cpp/base/time_mojom_traits.h"
#include "mojo/public/cpp/test_support/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/event.h"
#include "ui/events/ipc/ui_events_param_traits_macros.h"
#include "ui/events/keycodes/dom/dom_code.h"
#include "ui/events/mojom/event.mojom.h"
#include "ui/events/mojom/event_mojom_traits.h"
#include "ui/events/test/keyboard_layout.h"
#include "ui/gfx/geometry/mojom/geometry_mojom_traits.h"
#include "ui/latency/mojom/latency_info_mojom_traits.h"
#if BUILDFLAG(IS_OZONE)
#include "ui/events/ozone/layout/scoped_keyboard_layout_engine.h"
#include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h"
#endif
namespace ui {
namespace {
void ExpectTouchEventsEqual(const TouchEvent& expected,
const TouchEvent& actual) { … }
void ExpectLocatedEventsEqual(const LocatedEvent& expected,
const LocatedEvent& actual) { … }
void ExpectMouseEventsEqual(const MouseEvent& expected,
const MouseEvent& actual) { … }
void ExpectMouseWheelEventsEqual(const MouseWheelEvent& expected,
const MouseWheelEvent& actual) { … }
void ExpectKeyEventsEqual(const KeyEvent& expected, const KeyEvent& actual) { … }
void ExpectEventsEqual(const Event& expected, const Event& actual) { … }
}
TEST(StructTraitsTest, KeyEvent) { … }
TEST(StructTraitsTest, MouseEvent) { … }
TEST(StructTraitsTest, MouseWheelEvent) { … }
TEST(StructTraitsTest, FloatingPointLocations) { … }
TEST(StructTraitsTest, KeyEventPropertiesSerialized) { … }
TEST(StructTraitsTest, GestureEvent) { … }
TEST(StructTraitsTest, ScrollEvent) { … }
TEST(StructTraitsTest, PointerDetails) { … }
TEST(StructTraitsTest, TouchEvent) { … }
TEST(StructTraitsTest, UnserializedTouchEventFields) { … }
#if BUILDFLAG(IS_OZONE)
class FixedKeyboardLayoutEngine : public StubKeyboardLayoutEngine { … };
TEST(StructTraitsTest, DifferentKeyboardLayout) { … }
#endif
}