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

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

Issue 679243002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/browser/renderer_host/input/timeout_monitor.h" 9 #include "content/browser/renderer_host/input/timeout_monitor.h"
10 #include "content/browser/renderer_host/input/touch_event_queue.h" 10 #include "content/browser/renderer_host/input/touch_event_queue.h"
(...skipping 19 matching lines...) Expand all
30 class TouchEventQueueTest : public testing::Test, 30 class TouchEventQueueTest : public testing::Test,
31 public TouchEventQueueClient { 31 public TouchEventQueueClient {
32 public: 32 public:
33 TouchEventQueueTest() 33 TouchEventQueueTest()
34 : sent_event_count_(0), 34 : sent_event_count_(0),
35 acked_event_count_(0), 35 acked_event_count_(0),
36 last_acked_event_state_(INPUT_EVENT_ACK_STATE_UNKNOWN), 36 last_acked_event_state_(INPUT_EVENT_ACK_STATE_UNKNOWN),
37 slop_length_dips_(0), 37 slop_length_dips_(0),
38 touch_scrolling_mode_(TouchEventQueue::TOUCH_SCROLLING_MODE_DEFAULT) {} 38 touch_scrolling_mode_(TouchEventQueue::TOUCH_SCROLLING_MODE_DEFAULT) {}
39 39
40 virtual ~TouchEventQueueTest() {} 40 ~TouchEventQueueTest() override {}
41 41
42 // testing::Test 42 // testing::Test
43 virtual void SetUp() override { ResetQueueWithConfig(CreateConfig()); } 43 void SetUp() override { ResetQueueWithConfig(CreateConfig()); }
44 44
45 virtual void TearDown() override { 45 void TearDown() override { queue_.reset(); }
46 queue_.reset();
47 }
48 46
49 // TouchEventQueueClient 47 // TouchEventQueueClient
50 void SendTouchEventImmediately( 48 void SendTouchEventImmediately(
51 const TouchEventWithLatencyInfo& event) override { 49 const TouchEventWithLatencyInfo& event) override {
52 ++sent_event_count_; 50 ++sent_event_count_;
53 last_sent_event_ = event.event; 51 last_sent_event_ = event.event;
54 if (sync_ack_result_) { 52 if (sync_ack_result_) {
55 auto sync_ack_result = sync_ack_result_.Pass(); 53 auto sync_ack_result = sync_ack_result_.Pass();
56 SendTouchEventAck(*sync_ack_result); 54 SendTouchEventAck(*sync_ack_result);
57 } 55 }
(...skipping 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after
2221 2219
2222 // Give the touchmove a valid id; it should be sent. 2220 // Give the touchmove a valid id; it should be sent.
2223 event.touches[0].id = press_id; 2221 event.touches[0].id = press_id;
2224 SendTouchEvent(event); 2222 SendTouchEvent(event);
2225 EXPECT_EQ(1U, GetAndResetSentEventCount()); 2223 EXPECT_EQ(1U, GetAndResetSentEventCount());
2226 SendTouchEventAck(INPUT_EVENT_ACK_STATE_CONSUMED); 2224 SendTouchEventAck(INPUT_EVENT_ACK_STATE_CONSUMED);
2227 EXPECT_EQ(1U, GetAndResetAckedEventCount()); 2225 EXPECT_EQ(1U, GetAndResetAckedEventCount());
2228 } 2226 }
2229 2227
2230 } // namespace content 2228 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698