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

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
« no previous file with comments | « ui/events/ozone/evdev/tablet_event_converter_evdev.cc ('k') | ui/ozone/platform/caca/caca_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..77651d425c0a1ccd4be849b2d7a0a1e6579e7c39 100644
--- a/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc
+++ b/ui/events/ozone/evdev/tablet_event_converter_evdev_unittest.cc
@@ -77,7 +77,7 @@ class MockTabletEventConverterEvdev : public TabletEventConverterEvdev {
class MockTabletCursorEvdev : public CursorDelegateEvdev {
public:
- MockTabletCursorEvdev() { cursor_display_bounds_ = gfx::Rect(1024, 768); }
+ MockTabletCursorEvdev() { cursor_confined_bounds_ = gfx::Rect(1024, 768); }
~MockTabletCursorEvdev() override {}
// CursorDelegateEvdev:
@@ -91,11 +91,13 @@ 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_confined_bounds_;
+ }
private:
gfx::PointF cursor_location_;
- gfx::Rect cursor_display_bounds_;
+ gfx::Rect cursor_confined_bounds_;
DISALLOW_COPY_AND_ASSIGN(MockTabletCursorEvdev);
};
@@ -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) {
« no previous file with comments | « ui/events/ozone/evdev/tablet_event_converter_evdev.cc ('k') | ui/ozone/platform/caca/caca_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698