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

Side by Side Diff: content/browser/renderer_host/input/immediate_input_router_unittest.cc

Issue 16213002: Add telemetry to track the time an event spent waiting for the main thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 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 unified diff | Download patch | Annotate | Revision Log
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.
nduca 2013/08/15 01:41:04 no unit test coverage for this new feature? how wo
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/browser/renderer_host/input/gesture_event_filter.h" 8 #include "content/browser/renderer_host/input/gesture_event_filter.h"
9 #include "content/browser/renderer_host/input/immediate_input_router.h" 9 #include "content/browser/renderer_host/input/immediate_input_router.h"
10 #include "content/browser/renderer_host/input/input_router_client.h" 10 #include "content/browser/renderer_host/input/input_router_client.h"
11 #include "content/common/content_constants_internal.h" 11 #include "content/common/content_constants_internal.h"
12 #include "content/common/edit_command.h" 12 #include "content/common/edit_command.h"
13 #include "content/common/input_messages.h" 13 #include "content/common/input_messages.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 VLOG(1) << __FUNCTION__ << " called!"; 219 VLOG(1) << __FUNCTION__ << " called!";
220 acked_wheel_event_ = event; 220 acked_wheel_event_ = event;
221 RecordAckCalled(ack_result); 221 RecordAckCalled(ack_result);
222 } 222 }
223 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event, 223 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event,
224 InputEventAckState ack_result) OVERRIDE { 224 InputEventAckState ack_result) OVERRIDE {
225 VLOG(1) << __FUNCTION__ << " called!"; 225 VLOG(1) << __FUNCTION__ << " called!";
226 acked_touch_event_ = event; 226 acked_touch_event_ = event;
227 RecordAckCalled(ack_result); 227 RecordAckCalled(ack_result);
228 } 228 }
229 virtual void OnGestureEventAck(const WebGestureEvent& event, 229 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event,
230 InputEventAckState ack_result) OVERRIDE { 230 InputEventAckState ack_result) OVERRIDE {
231 VLOG(1) << __FUNCTION__ << " called!"; 231 VLOG(1) << __FUNCTION__ << " called!";
232 RecordAckCalled(ack_result); 232 RecordAckCalled(ack_result);
233 } 233 }
234 virtual void OnUnexpectedEventAck(bool bad_message) OVERRIDE { 234 virtual void OnUnexpectedEventAck(bool bad_message) OVERRIDE {
235 VLOG(1) << __FUNCTION__ << " called!"; 235 VLOG(1) << __FUNCTION__ << " called!";
236 unexpected_event_ack_called_ = true; 236 unexpected_event_ack_called_ = true;
237 } 237 }
238 238
239 void ExpectSendCalled(bool called) { 239 void ExpectSendCalled(bool called) {
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
2159 EXPECT_EQ(1U, process_->sink().message_count()); 2159 EXPECT_EQ(1U, process_->sink().message_count());
2160 EXPECT_TRUE(process_->sink().GetUniqueMessageMatching( 2160 EXPECT_TRUE(process_->sink().GetUniqueMessageMatching(
2161 InputMsg_HandleInputEvent::ID)); 2161 InputMsg_HandleInputEvent::ID));
2162 process_->sink().ClearMessages(); 2162 process_->sink().ClearMessages();
2163 2163
2164 // Check that the correct unhandled wheel event was received. 2164 // Check that the correct unhandled wheel event was received.
2165 EXPECT_EQ(client_->acked_wheel_event().deltaY, -5); 2165 EXPECT_EQ(client_->acked_wheel_event().deltaY, -5);
2166 } 2166 }
2167 2167
2168 } // namespace content 2168 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698