| OLD | NEW |
| 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. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "content/browser/renderer_host/input/synthetic_gesture.h" | 8 #include "content/browser/renderer_host/input/synthetic_gesture.h" |
| 9 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h" | 9 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h" |
| 10 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" | 10 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
| 11 #include "content/browser/renderer_host/input/synthetic_pinch_gesture.h" | 11 #include "content/browser/renderer_host/input/synthetic_pinch_gesture.h" |
| 12 #include "content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h" | 12 #include "content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h" |
| 13 #include "content/browser/renderer_host/input/synthetic_tap_gesture.h" | 13 #include "content/browser/renderer_host/input/synthetic_tap_gesture.h" |
| 14 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 14 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 15 #include "content/common/input/synthetic_pinch_gesture_params.h" | 15 #include "content/common/input/synthetic_pinch_gesture_params.h" |
| 16 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" | 16 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" |
| 17 #include "content/common/input/synthetic_tap_gesture_params.h" | 17 #include "content/common/input/synthetic_tap_gesture_params.h" |
| 18 #include "content/public/test/mock_render_process_host.h" | 18 #include "content/public/test/mock_render_process_host.h" |
| 19 #include "content/public/test/test_browser_context.h" | 19 #include "content/public/test/test_browser_context.h" |
| 20 #include "content/test/test_render_view_host.h" | 20 #include "content/test/test_render_view_host.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 #include "third_party/WebKit/public/web/WebInputEvent.h" | 22 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 23 #include "ui/gfx/point.h" | 23 #include "ui/gfx/geometry/point.h" |
| 24 #include "ui/gfx/point_f.h" | 24 #include "ui/gfx/geometry/point_f.h" |
| 25 #include "ui/gfx/vector2d.h" | 25 #include "ui/gfx/geometry/vector2d.h" |
| 26 #include "ui/gfx/vector2d_f.h" | 26 #include "ui/gfx/vector2d_f.h" |
| 27 | 27 |
| 28 using blink::WebInputEvent; | 28 using blink::WebInputEvent; |
| 29 using blink::WebMouseEvent; | 29 using blink::WebMouseEvent; |
| 30 using blink::WebMouseWheelEvent; | 30 using blink::WebMouseWheelEvent; |
| 31 using blink::WebTouchEvent; | 31 using blink::WebTouchEvent; |
| 32 | 32 |
| 33 namespace content { | 33 namespace content { |
| 34 | 34 |
| 35 namespace { | 35 namespace { |
| (...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 EXPECT_TRUE(tap_target->GestureFinished()); | 995 EXPECT_TRUE(tap_target->GestureFinished()); |
| 996 EXPECT_EQ(tap_target->position(), params.position); | 996 EXPECT_EQ(tap_target->position(), params.position); |
| 997 EXPECT_EQ(tap_target->GetDuration().InMilliseconds(), params.duration_ms); | 997 EXPECT_EQ(tap_target->GetDuration().InMilliseconds(), params.duration_ms); |
| 998 EXPECT_GE(GetTotalTime(), | 998 EXPECT_GE(GetTotalTime(), |
| 999 base::TimeDelta::FromMilliseconds(params.duration_ms)); | 999 base::TimeDelta::FromMilliseconds(params.duration_ms)); |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 } // namespace | 1002 } // namespace |
| 1003 | 1003 |
| 1004 } // namespace content | 1004 } // namespace content |
| OLD | NEW |