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

Side by Side Diff: content/browser/renderer_host/input/touch_event_queue_unittest.cc

Issue 2497033002: Break apart WebGestureEvent from WebInputEvent. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
OLDNEW
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 "content/browser/renderer_host/input/touch_event_queue.h" 5 #include "content/browser/renderer_host/input/touch_event_queue.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/run_loop.h" 15 #include "base/run_loop.h"
16 #include "base/single_thread_task_runner.h" 16 #include "base/single_thread_task_runner.h"
17 #include "base/threading/thread_task_runner_handle.h" 17 #include "base/threading/thread_task_runner_handle.h"
18 #include "content/browser/renderer_host/input/timeout_monitor.h" 18 #include "content/browser/renderer_host/input/timeout_monitor.h"
19 #include "content/common/input/synthetic_web_input_event_builders.h" 19 #include "content/common/input/synthetic_web_input_event_builders.h"
20 #include "content/common/input/web_touch_event_traits.h" 20 #include "content/common/input/web_touch_event_traits.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/platform/WebInputEvent.h"
23 23
24 using blink::WebGestureEvent; 24 using blink::WebGestureEvent;
25 using blink::WebInputEvent; 25 using blink::WebInputEvent;
26 using blink::WebTouchEvent; 26 using blink::WebTouchEvent;
27 using blink::WebTouchPoint; 27 using blink::WebTouchPoint;
28 28
29 namespace content { 29 namespace content {
30 namespace { 30 namespace {
31 31
32 const double kMinSecondsBetweenThrottledTouchmoves = 0.2; 32 const double kMinSecondsBetweenThrottledTouchmoves = 0.2;
(...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after
2732 EXPECT_EQ(WebInputEvent::TouchMove, sent_event().type); 2732 EXPECT_EQ(WebInputEvent::TouchMove, sent_event().type);
2733 EXPECT_FALSE(sent_event().touchStartOrFirstTouchMove); 2733 EXPECT_FALSE(sent_event().touchStartOrFirstTouchMove);
2734 2734
2735 ReleaseTouchPoint(0); 2735 ReleaseTouchPoint(0);
2736 SendTouchEventAck(INPUT_EVENT_ACK_STATE_CONSUMED); 2736 SendTouchEventAck(INPUT_EVENT_ACK_STATE_CONSUMED);
2737 EXPECT_EQ(WebInputEvent::TouchEnd, sent_event().type); 2737 EXPECT_EQ(WebInputEvent::TouchEnd, sent_event().type);
2738 EXPECT_FALSE(sent_event().touchStartOrFirstTouchMove); 2738 EXPECT_FALSE(sent_event().touchStartOrFirstTouchMove);
2739 } 2739 }
2740 2740
2741 } // namespace content 2741 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698