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

Unified Diff: ui/events/event_unittest.cc

Issue 2287403002: Create MouseWheelEvent directly instead of through MouseEvent. (Closed)
Patch Set: test 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.cc ('k') | ui/events/test/event_generator.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 83ad2333138fca94303a887dee6f3d203424fbbb..ae9a5d6bd059250861531a725bcfac2a6c220f9e 100644
--- a/ui/events/event_unittest.cc
+++ b/ui/events/event_unittest.cc
@@ -738,14 +738,17 @@ 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_MOUSEWHEEL, ET_MOUSE_CAPTURE_CHANGED,
+ ET_MOUSE_PRESSED, ET_MOUSE_DRAGGED, ET_MOUSE_MOVED,
+ ET_MOUSE_ENTERED, ET_MOUSE_EXITED, ET_MOUSE_RELEASED,
+ ET_MOUSE_CAPTURE_CHANGED,
};
for (size_t i = 0; i < arraysize(mouse_allowed); i++) {
MouseEvent event(mouse_allowed[i], point, point, time, 0, 0);
EXPECT_TRUE(PointerEvent::CanConvertFrom(event));
}
+ // Mouse wheel events can be converted.
+ MouseWheelEvent event(gfx::Vector2d(), point, point, time, 0, 0);
+ EXPECT_TRUE(PointerEvent::CanConvertFrom(event));
// Common touch events can be converted.
const EventType touch_allowed[] = {
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698