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

Unified Diff: ui/ozone/platform/wayland/wayland_window_unittest.cc

Issue 2374213003: Refactored static_cast'ing of events to use the AsXXXEvent() methods. (Closed)
Patch Set: Added IsCancelModeEvent() & AsCancelModeEvent() methods to Event Created 4 years, 2 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/ozone/platform/wayland/wayland_window_unittest.cc
diff --git a/ui/ozone/platform/wayland/wayland_window_unittest.cc b/ui/ozone/platform/wayland/wayland_window_unittest.cc
index 48903680cd23f27a3f595ec8adf401411d2e7542..0493c8f0f391b4b144ec9aecdc71554938d07752 100644
--- a/ui/ozone/platform/wayland/wayland_window_unittest.cc
+++ b/ui/ozone/platform/wayland/wayland_window_unittest.cc
@@ -94,7 +94,7 @@ TEST_F(WaylandWindowTest, DispatchEvent) {
window.DispatchEvent(&test_mouse_event);
ASSERT_TRUE(event);
ASSERT_TRUE(event->IsMouseEvent());
- auto mouse_event = static_cast<MouseEvent*>(event.get());
+ auto mouse_event = event->AsMouseEvent();
EXPECT_EQ(mouse_event->location_f(), test_mouse_event.location_f());
EXPECT_EQ(mouse_event->root_location_f(), test_mouse_event.root_location_f());
EXPECT_EQ(mouse_event->time_stamp(), test_mouse_event.time_stamp());
« ui/events/event.cc ('K') | « ui/ozone/platform/wayland/wayland_pointer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698