#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/events/blink/web_input_event.h"
#include <cstddef>
#include <cstdint>
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/ui_base_features.h"
#include "ui/events/base_event_utils.h"
#include "ui/events/blink/blink_event_util.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/events/keycodes/dom/dom_code.h"
#include "ui/events/keycodes/dom/dom_key.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
#include "ui/events/test/keyboard_layout.h"
namespace ui {
TEST(WebInputEventTest, TestMakeWebKeyboardEvent) { … }
TEST(WebInputEventTest, TestMakeWebKeyboardEventWindowsKeyCode) { … }
TEST(WebInputEventTest, TestMakeWebKeyboardEventKeyPadKeyCode) { … }
TEST(WebInputEventTest, TestMakeWebMouseEvent) { … }
TEST(WebInputEventTest, TestMakeWebMouseWheelEvent) { … }
#if !BUILDFLAG(IS_MAC)
TEST(WebInputEventTest, TestPercentMouseWheelScroll) { … }
#endif
TEST(WebInputEventTest, KeyEvent) { … }
TEST(WebInputEventTest, WheelEvent) { … }
TEST(WebInputEventTest, MousePointerEvent) { … }
#if BUILDFLAG(IS_WIN)
TEST(WebInputEventTest, MouseLeaveScreenCoordinate) {
CHROME_MSG msg_event = {nullptr, WM_MOUSELEAVE, 0, MAKELPARAM(300, 200)};
::SetCursorPos(250, 350);
ui::MouseEvent ui_event(msg_event);
blink::WebMouseEvent web_event = MakeWebMouseEvent(ui_event);
ASSERT_EQ(blink::WebInputEvent::Type::kMouseLeave, web_event.GetType());
ASSERT_EQ(250, web_event.PositionInWidget().x());
ASSERT_EQ(350, web_event.PositionInWidget().y());
ASSERT_EQ(250, web_event.PositionInScreen().x());
ASSERT_EQ(350, web_event.PositionInScreen().y());
}
#endif
TEST(WebInputEventTest, MouseMoveUnadjustedMovement) { … }
}