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

Side by Side Diff: content/common/input/input_param_traits_unittest.cc

Issue 25022003: Report LatencyInfo through trace buffer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix compile error Created 7 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 unified diff | Download patch
« no previous file with comments | « content/common/gpu/image_transport_surface.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/common/input/input_param_traits.h" 5 #include "content/common/input/input_param_traits.h"
6 6
7 #include "content/common/input/input_event.h" 7 #include "content/common/input/input_event.h"
8 #include "content/common/input_messages.h" 8 #include "content/common/input_messages.h"
9 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 ui::LatencyInfo latency; 75 ui::LatencyInfo latency;
76 76
77 WebKit::WebKeyboardEvent key_event; 77 WebKit::WebKeyboardEvent key_event;
78 key_event.type = WebKit::WebInputEvent::RawKeyDown; 78 key_event.type = WebKit::WebInputEvent::RawKeyDown;
79 key_event.nativeKeyCode = 5; 79 key_event.nativeKeyCode = 5;
80 events.push_back(new InputEvent(key_event, latency, false)); 80 events.push_back(new InputEvent(key_event, latency, false));
81 81
82 WebKit::WebMouseWheelEvent wheel_event; 82 WebKit::WebMouseWheelEvent wheel_event;
83 wheel_event.type = WebKit::WebInputEvent::MouseWheel; 83 wheel_event.type = WebKit::WebInputEvent::MouseWheel;
84 wheel_event.deltaX = 10; 84 wheel_event.deltaX = 10;
85 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_RWH_COMPONENT, 1, 1); 85 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 1, 1);
86 events.push_back(new InputEvent(wheel_event, latency, false)); 86 events.push_back(new InputEvent(wheel_event, latency, false));
87 87
88 WebKit::WebMouseEvent mouse_event; 88 WebKit::WebMouseEvent mouse_event;
89 mouse_event.type = WebKit::WebInputEvent::MouseDown; 89 mouse_event.type = WebKit::WebInputEvent::MouseDown;
90 mouse_event.x = 10; 90 mouse_event.x = 10;
91 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 2, 2); 91 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 2, 2);
92 events.push_back(new InputEvent(mouse_event, latency, false)); 92 events.push_back(new InputEvent(mouse_event, latency, false));
93 93
94 WebKit::WebGestureEvent gesture_event; 94 WebKit::WebGestureEvent gesture_event;
95 gesture_event.type = WebKit::WebInputEvent::GestureScrollBegin; 95 gesture_event.type = WebKit::WebInputEvent::GestureScrollBegin;
96 gesture_event.x = -1; 96 gesture_event.x = -1;
97 events.push_back(new InputEvent(gesture_event, latency, false)); 97 events.push_back(new InputEvent(gesture_event, latency, false));
98 98
99 WebKit::WebTouchEvent touch_event; 99 WebKit::WebTouchEvent touch_event;
100 touch_event.type = WebKit::WebInputEvent::TouchStart; 100 touch_event.type = WebKit::WebInputEvent::TouchStart;
101 touch_event.touchesLength = 1; 101 touch_event.touchesLength = 1;
102 touch_event.touches[0].radiusX = 1; 102 touch_event.touches[0].radiusX = 1;
103 events.push_back(new InputEvent(touch_event, latency, false)); 103 events.push_back(new InputEvent(touch_event, latency, false));
104 104
105 Verify(events); 105 Verify(events);
106 } 106 }
107 107
108 } // namespace 108 } // namespace
109 } // namespace content 109 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698