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

Unified Diff: ui/views/controls/textfield/textfield_unittest.cc

Issue 2729133005: Fix: Cursor missing in omnibox after entering a alphabet in NTP 'Search box' (Closed)
Patch Set: address comments Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/textfield/textfield_unittest.cc
diff --git a/ui/views/controls/textfield/textfield_unittest.cc b/ui/views/controls/textfield/textfield_unittest.cc
index 45abeecdbe3bf527902236758f8841cefb57b56f..bb24d1f66157d7ebc6f4043edcb7d8c4ff9282b3 100644
--- a/ui/views/controls/textfield/textfield_unittest.cc
+++ b/ui/views/controls/textfield/textfield_unittest.cc
@@ -252,7 +252,7 @@ void MockInputMethod::ClearComposition() {
result_text_.clear();
}
-// A Textfield wrapper to intercept OnKey[Pressed|Released]() ressults.
+// A Textfield wrapper to intercept OnKey[Pressed|Released]() results.
class TestTextfield : public views::Textfield {
public:
TestTextfield()
@@ -3112,20 +3112,16 @@ TEST_F(TextfieldTest, AccessiblePasswordTest) {
EXPECT_TRUE(node_data_protected.HasStateFlag(ui::AX_STATE_PROTECTED));
}
-// Test if the cursor visibility is controlled by |cursor_enabled_| in
+// Verifies if the cursor visibility is controlled by |cursor_enabled_| in
msw 2017/03/10 21:04:30 nit: "Verify that cursor visibility is controlled
yiyix 2017/03/13 04:02:16 Done.
// RenderText.
TEST_F(TextfieldTest, CursorVisibility) {
InitTextfield();
gfx::RenderText* render_text = test_api_->GetRenderText();
render_text->SetCursorEnabled(false);
- textfield_->OnBlur();
- textfield_->OnFocus();
EXPECT_FALSE(test_api_->IsCursorVisible());
render_text->SetCursorEnabled(true);
- textfield_->OnBlur();
- textfield_->OnFocus();
EXPECT_TRUE(test_api_->IsCursorVisible());
}
« ui/views/controls/textfield/textfield.cc ('K') | « ui/views/controls/textfield/textfield.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698