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

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

Issue 873563002: [Ozone] Constrain the cursor when overscan insets are set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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 8451ad24c6a0441ec214daf04d64b79d9ebca345..17feea10252704aae78de494c15b8f97d9aa6b54 100644
--- a/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc
+++ b/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc
@@ -91,7 +91,9 @@ class MockTabletCursorEvdev : public CursorDelegateEvdev {
void MoveCursor(const gfx::Vector2dF& delta) override { NOTREACHED(); }
bool IsCursorVisible() override { return 1; }
gfx::PointF GetLocation() override { return cursor_location_; }
- gfx::Rect GetCursorDisplayBounds() override { return cursor_display_bounds_; }
+ gfx::Rect GetCursorConfinedBounds() override {
+ return cursor_display_bounds_;
+ }
private:
gfx::PointF cursor_location_;
@@ -251,7 +253,7 @@ TEST_F(TabletEventConverterEvdevTest, MoveTopRight) {
EXPECT_EQ(ui::ET_MOUSE_MOVED, event->type());
EXPECT_GT(cursor()->GetLocation().x(),
- cursor()->GetCursorDisplayBounds().width() - EPSILON);
+ cursor()->GetCursorConfinedBounds().width() - EPSILON);
EXPECT_LT(cursor()->GetLocation().y(), EPSILON);
}
@@ -285,7 +287,7 @@ TEST_F(TabletEventConverterEvdevTest, MoveBottomLeft) {
EXPECT_LT(cursor()->GetLocation().x(), EPSILON);
EXPECT_GT(cursor()->GetLocation().y(),
- cursor()->GetCursorDisplayBounds().height() - EPSILON);
+ cursor()->GetCursorConfinedBounds().height() - EPSILON);
}
TEST_F(TabletEventConverterEvdevTest, MoveBottomRight) {
@@ -319,9 +321,9 @@ TEST_F(TabletEventConverterEvdevTest, MoveBottomRight) {
EXPECT_EQ(ui::ET_MOUSE_MOVED, event->type());
EXPECT_GT(cursor()->GetLocation().x(),
- cursor()->GetCursorDisplayBounds().height() - EPSILON);
+ cursor()->GetCursorConfinedBounds().height() - EPSILON);
EXPECT_GT(cursor()->GetLocation().y(),
- cursor()->GetCursorDisplayBounds().height() - EPSILON);
+ cursor()->GetCursorConfinedBounds().height() - EPSILON);
}
TEST_F(TabletEventConverterEvdevTest, Tap) {

Powered by Google App Engine
This is Rietveld 408576698