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/textfield/native_textfield_views_unittest.cc

Issue 135853002: Fix the build; re-add line missed in revert of deleted file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/views/controls/textfield/native_textfield_views.h" 5 #include "ui/views/controls/textfield/native_textfield_views.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 key_received_ = true; 72 key_received_ = true;
73 key_handled_ = views::Textfield::OnKeyReleased(e); 73 key_handled_ = views::Textfield::OnKeyReleased(e);
74 return key_handled_; 74 return key_handled_;
75 } 75 }
76 76
77 bool key_handled() const { return key_handled_; } 77 bool key_handled() const { return key_handled_; }
78 bool key_received() const { return key_received_; } 78 bool key_received() const { return key_received_; }
79 79
80 void clear() { key_received_ = key_handled_ = false; } 80 void clear() { key_received_ = key_handled_ = false; }
81 81
82 bool focusable() const { return View::focusable(); }
83
82 private: 84 private:
83 bool key_handled_; 85 bool key_handled_;
84 bool key_received_; 86 bool key_received_;
85 87
86 DISALLOW_COPY_AND_ASSIGN(TestTextfield); 88 DISALLOW_COPY_AND_ASSIGN(TestTextfield);
87 }; 89 };
88 90
89 // A helper class for use with ui::TextInputClient::GetTextFromRange(). 91 // A helper class for use with ui::TextInputClient::GetTextFromRange().
90 class GetTextHelper { 92 class GetTextHelper {
91 public: 93 public:
(...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after
1991 // Set text which may fall back to a font which has taller baseline than 1993 // Set text which may fall back to a font which has taller baseline than
1992 // the default font. 1994 // the default font.
1993 textfield_->SetText(UTF8ToUTF16("\xE0\xB9\x91")); 1995 textfield_->SetText(UTF8ToUTF16("\xE0\xB9\x91"));
1994 const int new_baseline = textfield_->GetBaseline(); 1996 const int new_baseline = textfield_->GetBaseline();
1995 1997
1996 // Regardless of the text, the baseline must be the same. 1998 // Regardless of the text, the baseline must be the same.
1997 EXPECT_EQ(new_baseline, old_baseline); 1999 EXPECT_EQ(new_baseline, old_baseline);
1998 } 2000 }
1999 2001
2000 } // namespace views 2002 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698