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

Side by Side Diff: ui/views/controls/prefix_selector_unittest.cc

Issue 117983002: Prefix string16 with base:: in ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/prefix_selector.cc ('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"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 virtual int GetSelectedRow() OVERRIDE { 31 virtual int GetSelectedRow() OVERRIDE {
32 return selected_row_; 32 return selected_row_;
33 } 33 }
34 34
35 virtual void SetSelectedRow(int row) OVERRIDE { 35 virtual void SetSelectedRow(int row) OVERRIDE {
36 selected_row_ = row; 36 selected_row_ = row;
37 } 37 }
38 38
39 virtual string16 GetTextForRow(int row) OVERRIDE { 39 virtual base::string16 GetTextForRow(int row) OVERRIDE {
40 return rows_[row]; 40 return rows_[row];
41 } 41 }
42 42
43 private: 43 private:
44 std::vector<string16> rows_; 44 std::vector<base::string16> rows_;
45 int selected_row_; 45 int selected_row_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(TestPrefixDelegate); 47 DISALLOW_COPY_AND_ASSIGN(TestPrefixDelegate);
48 }; 48 };
49 49
50 class PrefixSelectorTest : public ViewsTestBase { 50 class PrefixSelectorTest : public ViewsTestBase {
51 public: 51 public:
52 PrefixSelectorTest() { 52 PrefixSelectorTest() {
53 selector_.reset(new PrefixSelector(&delegate_)); 53 selector_.reset(new PrefixSelector(&delegate_));
54 } 54 }
(...skipping 25 matching lines...) Expand all
80 EXPECT_EQ(2, delegate_.GetSelectedRow()); 80 EXPECT_EQ(2, delegate_.GetSelectedRow());
81 81
82 selector_->OnViewBlur(); 82 selector_->OnViewBlur();
83 selector_->InsertText(ASCIIToUTF16("\t")); 83 selector_->InsertText(ASCIIToUTF16("\t"));
84 selector_->InsertText(ASCIIToUTF16("b")); 84 selector_->InsertText(ASCIIToUTF16("b"));
85 selector_->InsertText(ASCIIToUTF16("a")); 85 selector_->InsertText(ASCIIToUTF16("a"));
86 EXPECT_EQ(2, delegate_.GetSelectedRow()); 86 EXPECT_EQ(2, delegate_.GetSelectedRow());
87 } 87 }
88 88
89 } // namespace views 89 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/prefix_selector.cc ('k') | ui/views/controls/progress_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698