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

Unified Diff: chrome/browser/ui/omnibox/omnibox_view_browsertest.cc

Issue 11034019: Cursor jumps to end of omnibox when activating keyword mode via inserted space (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Patch Rebased Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
index 8070a67cbdde73c2179af06e2f3c410fbf3f5f17..40d35d56e568677982d12ceb98879472da4aee86 100644
--- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
@@ -815,6 +815,10 @@ class OmniboxViewTest : public InProcessBrowserTest,
ASSERT_FALSE(omnibox_view->model()->is_keyword_hint());
ASSERT_EQ(search_keyword, omnibox_view->model()->keyword());
ASSERT_EQ(ASCIIToUTF16("a "), omnibox_view->GetText());
+ size_t start, end;
+ omnibox_view->GetSelectionBounds(&start, &end);
+ EXPECT_EQ(0U, start);
+ EXPECT_EQ(0U, end);
// Keyword shouldn't be accepted by pasting "foo bar".
omnibox_view->SetUserText(string16());
@@ -848,7 +852,6 @@ class OmniboxViewTest : public InProcessBrowserTest,
ASSERT_EQ(search_keyword, omnibox_view->model()->keyword());
ASSERT_EQ(search_keyword + ASCIIToUTF16(" "), omnibox_view->GetText());
- size_t start, end;
omnibox_view->GetSelectionBounds(&start, &end);
ASSERT_NE(start, end);
ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_SPACE, 0));
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698