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

Unified Diff: ui/events/event_unittest.cc

Issue 2256343003: Update ui::PointerEvent to support mouse wheel and capture change events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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/event_constants.h ('k') | ui/views/mus/pointer_watcher_event_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_unittest.cc
diff --git a/ui/events/event_unittest.cc b/ui/events/event_unittest.cc
index cd9480b8c5433f4ca382ba0f06d455376bc3984e..83ad2333138fca94303a887dee6f3d203424fbbb 100644
--- a/ui/events/event_unittest.cc
+++ b/ui/events/event_unittest.cc
@@ -738,12 +738,9 @@ TEST(EventTest, PointerEventCanConvertFrom) {
// Common mouse events can be converted.
const EventType mouse_allowed[] = {
- ET_MOUSE_PRESSED,
- ET_MOUSE_DRAGGED,
- ET_MOUSE_MOVED,
- ET_MOUSE_ENTERED,
- ET_MOUSE_EXITED,
- ET_MOUSE_RELEASED
+ ET_MOUSE_PRESSED, ET_MOUSE_DRAGGED, ET_MOUSE_MOVED,
+ ET_MOUSE_ENTERED, ET_MOUSE_EXITED, ET_MOUSE_RELEASED,
+ ET_MOUSEWHEEL, ET_MOUSE_CAPTURE_CHANGED,
};
for (size_t i = 0; i < arraysize(mouse_allowed); i++) {
MouseEvent event(mouse_allowed[i], point, point, time, 0, 0);
@@ -762,16 +759,6 @@ TEST(EventTest, PointerEventCanConvertFrom) {
EXPECT_TRUE(PointerEvent::CanConvertFrom(event));
}
- // Capture changes cannot be converted.
- EXPECT_FALSE(
- PointerEvent::CanConvertFrom(
- MouseEvent(ET_MOUSE_CAPTURE_CHANGED, point, point, time, 0, 0)));
-
- // Wheel events cannot be converted.
- EXPECT_FALSE(
- PointerEvent::CanConvertFrom(
- MouseWheelEvent(gfx::Vector2d(), point, point, time, 0, 0)));
-
// Non-mouse non-touch events cannot be converted.
EXPECT_FALSE(
PointerEvent::CanConvertFrom(
« no previous file with comments | « ui/events/event_constants.h ('k') | ui/views/mus/pointer_watcher_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698