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

Unified Diff: content/browser/renderer_host/input/touch_emulator.cc

Issue 249613002: [DevTools] Interactive test for DevTools touch emulation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Close devtools Created 6 years, 8 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 | « chrome/test/data/devtools/touch_emulation.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/touch_emulator.cc
diff --git a/content/browser/renderer_host/input/touch_emulator.cc b/content/browser/renderer_host/input/touch_emulator.cc
index f32a9ef4432906966bf69d56a2f3f7a15285f980..66f1a50d7b145800531c00c9db562c2253c51131 100644
--- a/content/browser/renderer_host/input/touch_emulator.cc
+++ b/content/browser/renderer_host/input/touch_emulator.cc
@@ -331,6 +331,11 @@ bool TouchEmulator::FillTouchEventAndPoint(const WebMouseEvent& mouse_event) {
touch_event_.touchesLength = 1;
touch_event_.timeStampSeconds = mouse_event.timeStampSeconds;
+ if (!touch_event_.timeStampSeconds) {
jdduke (slow) 2014/04/23 16:35:53 Why not have the tests fill the timeStampSeconds?
dgozman 2014/04/23 17:27:20 I would like that too, but interactive test issues
+ // Gesture detector does not tolerate null timestamps generated in tests.
+ touch_event_.timeStampSeconds =
+ (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF();
+ }
touch_event_.modifiers = mouse_event.modifiers;
WebTouchPoint& point = touch_event_.touches[0];
« no previous file with comments | « chrome/test/data/devtools/touch_emulation.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698