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

Side by Side Diff: ui/views/controls/prefix_selector_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/prefix_selector.h ('k') | ui/views/controls/progress_bar.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 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 "ui/views/controls/prefix_selector.h" 5 #include "ui/views/controls/prefix_selector.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "ui/views/controls/prefix_delegate.h" 11 #include "ui/views/controls/prefix_delegate.h"
12 #include "ui/views/test/views_test_base.h" 12 #include "ui/views/test/views_test_base.h"
13 13
14 using base::ASCIIToUTF16; 14 using base::ASCIIToUTF16;
15 15
16 namespace views { 16 namespace views {
17 17
18 class TestPrefixDelegate : public PrefixDelegate { 18 class TestPrefixDelegate : public PrefixDelegate {
19 public: 19 public:
20 TestPrefixDelegate() : selected_row_(0) { 20 TestPrefixDelegate() : selected_row_(0) {
21 rows_.push_back(ASCIIToUTF16("aardvark")); 21 rows_.push_back(ASCIIToUTF16("aardvark"));
22 rows_.push_back(ASCIIToUTF16("antelope")); 22 rows_.push_back(ASCIIToUTF16("antelope"));
23 rows_.push_back(ASCIIToUTF16("badger")); 23 rows_.push_back(ASCIIToUTF16("badger"));
24 rows_.push_back(ASCIIToUTF16("gnu")); 24 rows_.push_back(ASCIIToUTF16("gnu"));
25 } 25 }
26 26
27 virtual ~TestPrefixDelegate() {} 27 virtual ~TestPrefixDelegate() {}
28 28
29 virtual int GetRowCount() OVERRIDE { 29 virtual int GetRowCount() override {
30 return static_cast<int>(rows_.size()); 30 return static_cast<int>(rows_.size());
31 } 31 }
32 32
33 virtual int GetSelectedRow() OVERRIDE { 33 virtual int GetSelectedRow() override {
34 return selected_row_; 34 return selected_row_;
35 } 35 }
36 36
37 virtual void SetSelectedRow(int row) OVERRIDE { 37 virtual void SetSelectedRow(int row) override {
38 selected_row_ = row; 38 selected_row_ = row;
39 } 39 }
40 40
41 virtual base::string16 GetTextForRow(int row) OVERRIDE { 41 virtual base::string16 GetTextForRow(int row) override {
42 return rows_[row]; 42 return rows_[row];
43 } 43 }
44 44
45 private: 45 private:
46 std::vector<base::string16> rows_; 46 std::vector<base::string16> rows_;
47 int selected_row_; 47 int selected_row_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(TestPrefixDelegate); 49 DISALLOW_COPY_AND_ASSIGN(TestPrefixDelegate);
50 }; 50 };
51 51
(...skipping 30 matching lines...) Expand all
82 EXPECT_EQ(2, delegate_.GetSelectedRow()); 82 EXPECT_EQ(2, delegate_.GetSelectedRow());
83 83
84 selector_->OnViewBlur(); 84 selector_->OnViewBlur();
85 selector_->InsertText(ASCIIToUTF16("\t")); 85 selector_->InsertText(ASCIIToUTF16("\t"));
86 selector_->InsertText(ASCIIToUTF16("b")); 86 selector_->InsertText(ASCIIToUTF16("b"));
87 selector_->InsertText(ASCIIToUTF16("a")); 87 selector_->InsertText(ASCIIToUTF16("a"));
88 EXPECT_EQ(2, delegate_.GetSelectedRow()); 88 EXPECT_EQ(2, delegate_.GetSelectedRow());
89 } 89 }
90 90
91 } // namespace views 91 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/prefix_selector.h ('k') | ui/views/controls/progress_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698