Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc

Issue 657603002: ash: ozone: apply transformation to events outside the root window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove explicit gfx::Rect to gfx::RectF conversion Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc
diff --git a/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc b/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc
index e0f5599d4ba22d2469a201ca5a258e443b9d0a40..da4bdae36eaff22b1959e8ef214adb2d4d776130 100644
--- a/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc
+++ b/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc
@@ -90,7 +90,8 @@ class MockTabletCursorEvdev : public CursorDelegateEvdev {
}
void MoveCursor(const gfx::Vector2dF& delta) override { NOTREACHED(); }
bool IsCursorVisible() override { return 1; }
- gfx::PointF location() override { return cursor_location_; }
+ gfx::PointF GetLocation() override { return cursor_location_; }
+ gfx::PointF GetRootLocation() override { return cursor_location_; }
gfx::Rect GetCursorDisplayBounds() override { return cursor_display_bounds_; }
private:
@@ -216,8 +217,8 @@ TEST_F(TabletEventConverterEvdevTest, MoveTopLeft) {
ui::MouseEvent* event = dev->event(0);
EXPECT_EQ(ui::ET_MOUSE_MOVED, event->type());
- EXPECT_LT(cursor()->location().x(), EPSILON);
- EXPECT_LT(cursor()->location().y(), EPSILON);
+ EXPECT_LT(cursor()->GetLocation().x(), EPSILON);
+ EXPECT_LT(cursor()->GetLocation().y(), EPSILON);
}
TEST_F(TabletEventConverterEvdevTest, MoveTopRight) {
@@ -249,9 +250,9 @@ TEST_F(TabletEventConverterEvdevTest, MoveTopRight) {
ui::MouseEvent* event = dev->event(0);
EXPECT_EQ(ui::ET_MOUSE_MOVED, event->type());
- EXPECT_GT(cursor()->location().x(),
+ EXPECT_GT(cursor()->GetLocation().x(),
cursor()->GetCursorDisplayBounds().width() - EPSILON);
- EXPECT_LT(cursor()->location().y(), EPSILON);
+ EXPECT_LT(cursor()->GetLocation().y(), EPSILON);
}
TEST_F(TabletEventConverterEvdevTest, MoveBottomLeft) {
@@ -282,8 +283,8 @@ TEST_F(TabletEventConverterEvdevTest, MoveBottomLeft) {
ui::MouseEvent* event = dev->event(0);
EXPECT_EQ(ui::ET_MOUSE_MOVED, event->type());
- EXPECT_LT(cursor()->location().x(), EPSILON);
- EXPECT_GT(cursor()->location().y(),
+ EXPECT_LT(cursor()->GetLocation().x(), EPSILON);
+ EXPECT_GT(cursor()->GetLocation().y(),
cursor()->GetCursorDisplayBounds().height() - EPSILON);
}
@@ -317,9 +318,9 @@ TEST_F(TabletEventConverterEvdevTest, MoveBottomRight) {
ui::MouseEvent* event = dev->event(0);
EXPECT_EQ(ui::ET_MOUSE_MOVED, event->type());
- EXPECT_GT(cursor()->location().x(),
+ EXPECT_GT(cursor()->GetLocation().x(),
cursor()->GetCursorDisplayBounds().height() - EPSILON);
- EXPECT_GT(cursor()->location().y(),
+ EXPECT_GT(cursor()->GetLocation().y(),
cursor()->GetCursorDisplayBounds().height() - EPSILON);
}

Powered by Google App Engine
This is Rietveld 408576698