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]; |