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

Unified Diff: ash/wm/custom_frame_view_ash_unittest.cc

Issue 11591006: Track input latency with UMA stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added per event type histograms Created 7 years, 11 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 | « ash/drag_drop/drag_drop_controller_unittest.cc ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/custom_frame_view_ash_unittest.cc
diff --git a/ash/wm/custom_frame_view_ash_unittest.cc b/ash/wm/custom_frame_view_ash_unittest.cc
index 5900ae593cba342707e504784386b29b74171eec..f81d2995967182849a743fe3ee7e3949da9e243f 100644
--- a/ash/wm/custom_frame_view_ash_unittest.cc
+++ b/ash/wm/custom_frame_view_ash_unittest.cc
@@ -18,6 +18,7 @@
#include "ui/aura/test/event_generator.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
+#include "ui/base/events/event_utils.h"
#include "ui/base/gestures/gesture_configuration.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/test/test_views_delegate.h"
@@ -474,13 +475,17 @@ TEST_F(CustomFrameViewAshTest, MaximizeTap) {
ui::GestureConfiguration::set_default_radius(0);
const int kTouchId = 2;
- ui::TouchEvent press(ui::ET_TOUCH_PRESSED, button_pos, kTouchId,
- base::Time::NowFromSystemTime() - base::Time());
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED,
+ button_pos,
+ kTouchId,
+ ui::EventTimeForNow());
root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
button_pos.Offset(9, 8);
ui::TouchEvent release(
- ui::ET_TOUCH_RELEASED, button_pos, kTouchId,
+ ui::ET_TOUCH_RELEASED,
+ button_pos,
+ kTouchId,
press.time_stamp() + base::TimeDelta::FromMilliseconds(50));
root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
« no previous file with comments | « ash/drag_drop/drag_drop_controller_unittest.cc ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698