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

Side by Side Diff: ash/touch/touch_observer_hud_unittest.cc

Issue 1975533002: Change ui::Event::time_stamp from TimeDelta to TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 | « ash/touch/touch_hud_debug.cc ('k') | ash/touch/touch_uma.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ash/touch/touch_observer_hud.h" 5 #include "ash/touch/touch_observer_hud.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/screen_util.h" 10 #include "ash/screen_util.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 const gfx::Point& location, 286 const gfx::Point& location,
287 int touch_id) { 287 int touch_id) {
288 ui::TouchEvent event(type, location, touch_id, event_time); 288 ui::TouchEvent event(type, location, touch_id, event_time);
289 GetInternalTouchHudProjection()->OnTouchEvent(&event); 289 GetInternalTouchHudProjection()->OnTouchEvent(&event);
290 290
291 // Advance time for next event. 291 // Advance time for next event.
292 event_time += base::TimeDelta::FromMilliseconds(100); 292 event_time += base::TimeDelta::FromMilliseconds(100);
293 } 293 }
294 294
295 private: 295 private:
296 base::TimeDelta event_time; 296 base::TimeTicks event_time;
297 297
298 DISALLOW_COPY_AND_ASSIGN(TouchHudProjectionTest); 298 DISALLOW_COPY_AND_ASSIGN(TouchHudProjectionTest);
299 }; 299 };
300 300
301 // Checks if debug touch HUD is correctly initialized for a single display. 301 // Checks if debug touch HUD is correctly initialized for a single display.
302 #if defined(OS_WIN) && !defined(USE_ASH) 302 #if defined(OS_WIN) && !defined(USE_ASH)
303 // TODO(msw): Broken on Windows. http://crbug.com/584038 303 // TODO(msw): Broken on Windows. http://crbug.com/584038
304 #define MAYBE_SingleDisplay DISABLED_SingleDisplay 304 #define MAYBE_SingleDisplay DISABLED_SingleDisplay
305 #else 305 #else
306 #define MAYBE_SingleDisplay SingleDisplay 306 #define MAYBE_SingleDisplay SingleDisplay
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 608
609 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); 609 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1);
610 EXPECT_EQ(1, GetInternalTouchPointsCount()); 610 EXPECT_EQ(1, GetInternalTouchPointsCount());
611 611
612 // Disabling projection touch HUD shoud remove it without crashing. 612 // Disabling projection touch HUD shoud remove it without crashing.
613 DisableTouchHudProjection(); 613 DisableTouchHudProjection();
614 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); 614 EXPECT_EQ(NULL, GetInternalTouchHudProjection());
615 } 615 }
616 616
617 } // namespace ash 617 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_hud_debug.cc ('k') | ash/touch/touch_uma.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698