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

Side by Side Diff: ui/views/controls/slider_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
« no previous file with comments | « ui/views/controls/slider.h ('k') | ui/views/controls/styled_label.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/controls/slider.h" 5 #include "ui/views/controls/slider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return last_drag_ended_sender_; 49 return last_drag_ended_sender_;
50 } 50 }
51 51
52 // Resets the state of this as if it were newly created. 52 // Resets the state of this as if it were newly created.
53 virtual void ResetCallHistory(); 53 virtual void ResetCallHistory();
54 54
55 // views::SliderListener: 55 // views::SliderListener:
56 virtual void SliderValueChanged(views::Slider* sender, 56 virtual void SliderValueChanged(views::Slider* sender,
57 float value, 57 float value,
58 float old_value, 58 float old_value,
59 views::SliderChangeReason reason) OVERRIDE; 59 views::SliderChangeReason reason) override;
60 virtual void SliderDragStarted(views::Slider* sender) OVERRIDE; 60 virtual void SliderDragStarted(views::Slider* sender) override;
61 virtual void SliderDragEnded(views::Slider* sender) OVERRIDE; 61 virtual void SliderDragEnded(views::Slider* sender) override;
62 62
63 private: 63 private:
64 // The epoch of the last event. 64 // The epoch of the last event.
65 int last_event_epoch_; 65 int last_event_epoch_;
66 // The epoch of the last time SliderDragStarted was called. 66 // The epoch of the last time SliderDragStarted was called.
67 int last_drag_started_epoch_; 67 int last_drag_started_epoch_;
68 // The epoch of the last time SliderDragEnded was called. 68 // The epoch of the last time SliderDragEnded was called.
69 int last_drag_ended_epoch_; 69 int last_drag_ended_epoch_;
70 // The sender from the last SliderDragStarted call. 70 // The sender from the last SliderDragStarted call.
71 views::Slider* last_drag_started_sender_; 71 views::Slider* last_drag_started_sender_;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 return max_x_; 136 return max_x_;
137 } 137 }
138 138
139 int max_y() { 139 int max_y() {
140 return max_y_; 140 return max_y_;
141 } 141 }
142 142
143 virtual void ClickAt(int x, int y); 143 virtual void ClickAt(int x, int y);
144 144
145 // testing::Test: 145 // testing::Test:
146 virtual void SetUp() OVERRIDE; 146 virtual void SetUp() override;
147 virtual void TearDown() OVERRIDE; 147 virtual void TearDown() override;
148 148
149 ui::test::EventGenerator* event_generator() { 149 ui::test::EventGenerator* event_generator() {
150 return event_generator_.get(); 150 return event_generator_.get();
151 } 151 }
152 152
153 private: 153 private:
154 // The Slider's orientation 154 // The Slider's orientation
155 Slider::Orientation orientation_; 155 Slider::Orientation orientation_;
156 // The Slider to be tested. 156 // The Slider to be tested.
157 Slider* slider_; 157 Slider* slider_;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 2 /* move_x */, 0 /* move_y */); 373 2 /* move_x */, 0 /* move_y */);
374 374
375 EXPECT_EQ(1, slider_listener().last_drag_started_epoch()); 375 EXPECT_EQ(1, slider_listener().last_drag_started_epoch());
376 EXPECT_GT(slider_listener().last_drag_ended_epoch(), 376 EXPECT_GT(slider_listener().last_drag_ended_epoch(),
377 slider_listener().last_drag_started_epoch()); 377 slider_listener().last_drag_started_epoch());
378 EXPECT_EQ(slider(), slider_listener().last_drag_started_sender()); 378 EXPECT_EQ(slider(), slider_listener().last_drag_started_sender());
379 EXPECT_EQ(slider(), slider_listener().last_drag_ended_sender()); 379 EXPECT_EQ(slider(), slider_listener().last_drag_ended_sender());
380 } 380 }
381 381
382 } // namespace views 382 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/slider.h ('k') | ui/views/controls/styled_label.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698