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

Side by Side Diff: ui/events/event_unittest.cc

Issue 1993383002: Adding Event.Latency.Browser.WheelUI, Passing latency_info to ProcessMouse/MouseWheelEvent functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/event.h" 5 #include "ui/events/event.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 ui::PointerEvent* clone_as_ptr = clone->AsPointerEvent(); 879 ui::PointerEvent* clone_as_ptr = clone->AsPointerEvent();
880 880
881 EXPECT_EQ(ptr_event.type(), clone_as_ptr->type()); 881 EXPECT_EQ(ptr_event.type(), clone_as_ptr->type());
882 EXPECT_EQ(ptr_event.pointer_id(), clone_as_ptr->pointer_id()); 882 EXPECT_EQ(ptr_event.pointer_id(), clone_as_ptr->pointer_id());
883 EXPECT_EQ(ptr_event.pointer_details(), clone_as_ptr->pointer_details()); 883 EXPECT_EQ(ptr_event.pointer_details(), clone_as_ptr->pointer_details());
884 EXPECT_EQ(ptr_event.location(), clone_as_ptr->location()); 884 EXPECT_EQ(ptr_event.location(), clone_as_ptr->location());
885 EXPECT_EQ(ptr_event.root_location(), clone_as_ptr->root_location()); 885 EXPECT_EQ(ptr_event.root_location(), clone_as_ptr->root_location());
886 } 886 }
887 } 887 }
888 888
889 TEST(EventTest, MouseEventLatencyUIComponentExists) {
890 const gfx::Point origin(0, 0);
891 MouseEvent mouseev(ET_MOUSE_PRESSED, origin, origin, EventTimeForNow(), 0, 0);
892 EXPECT_TRUE(mouseev.latency()->FindLatency(
893 ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, nullptr));
894 }
895
896 TEST(EventTest, MouseWheelEventLatencyUIComponentExists) {
897 const gfx::Point origin(0, 0);
898 MouseWheelEvent mouseWheelev(gfx::Vector2d(), origin, origin,
899 EventTimeForNow(), 0, 0);
900 EXPECT_TRUE(mouseWheelev.latency()->FindLatency(
901 ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, nullptr));
902 }
903
889 } // namespace ui 904 } // namespace ui
OLDNEW
« content/browser/renderer_host/render_widget_host_input_event_router.cc ('K') | « ui/events/event.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698