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

Side by Side Diff: ui/events/gesture_detection/motion_event_buffer_unittest.cc

Issue 623293004: replace OVERRIDE and FINAL with override and final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/time/time.h" 7 #include "base/time/time.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/events/gesture_detection/motion_event_buffer.h" 9 #include "ui/events/gesture_detection/motion_event_buffer.h"
10 #include "ui/events/test/mock_motion_event.h" 10 #include "ui/events/test/mock_motion_event.h"
(...skipping 26 matching lines...) Expand all
37 ExpectEqualsHistoryIndex((A), (I), (B)); \ 37 ExpectEqualsHistoryIndex((A), (I), (B)); \
38 } 38 }
39 39
40 class MotionEventBufferTest : public testing::Test, 40 class MotionEventBufferTest : public testing::Test,
41 public MotionEventBufferClient { 41 public MotionEventBufferClient {
42 public: 42 public:
43 MotionEventBufferTest() : needs_flush_(false) {} 43 MotionEventBufferTest() : needs_flush_(false) {}
44 virtual ~MotionEventBufferTest() {} 44 virtual ~MotionEventBufferTest() {}
45 45
46 // MotionEventBufferClient implementation. 46 // MotionEventBufferClient implementation.
47 virtual void ForwardMotionEvent(const MotionEvent& event) OVERRIDE { 47 virtual void ForwardMotionEvent(const MotionEvent& event) override {
48 forwarded_events_.push_back(event.Clone().release()); 48 forwarded_events_.push_back(event.Clone().release());
49 } 49 }
50 50
51 virtual void SetNeedsFlush() OVERRIDE { needs_flush_ = true; } 51 virtual void SetNeedsFlush() override { needs_flush_ = true; }
52 52
53 bool GetAndResetNeedsFlush() { 53 bool GetAndResetNeedsFlush() {
54 bool needs_flush = needs_flush_; 54 bool needs_flush = needs_flush_;
55 needs_flush_ = false; 55 needs_flush_ = false;
56 return needs_flush; 56 return needs_flush;
57 } 57 }
58 58
59 ScopedVector<MotionEvent> GetAndResetForwardedEvents() { 59 ScopedVector<MotionEvent> GetAndResetForwardedEvents() {
60 ScopedVector<MotionEvent> forwarded_events; 60 ScopedVector<MotionEvent> forwarded_events;
61 forwarded_events.swap(forwarded_events_); 61 forwarded_events.swap(forwarded_events_);
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 TEST_F(MotionEventBufferTest, Resampling150to60) { 862 TEST_F(MotionEventBufferTest, Resampling150to60) {
863 base::TimeDelta flush_time_delta = 863 base::TimeDelta flush_time_delta =
864 base::TimeDelta::FromMillisecondsD(1000. / 60.); 864 base::TimeDelta::FromMillisecondsD(1000. / 60.);
865 base::TimeDelta event_time_delta = 865 base::TimeDelta event_time_delta =
866 base::TimeDelta::FromMillisecondsD(1000. / 150.); 866 base::TimeDelta::FromMillisecondsD(1000. / 150.);
867 867
868 RunResample(flush_time_delta, event_time_delta); 868 RunResample(flush_time_delta, event_time_delta);
869 } 869 }
870 870
871 } // namespace ui 871 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/motion_event_buffer.cc ('k') | ui/events/gesture_detection/motion_event_generic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698