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

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

Issue 290333015: Suggest about:blank autocompletion from BuiltinProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment. Created 6 years, 7 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/autocomplete/builtin_provider_unittest.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 2cde269e8e600e9773e63afd41b3767c0fb99735..88a96a68e420e1c9a761f98e3ead1b980f79c1b5 100644
--- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
@@ -1402,10 +1402,11 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, UndoRedo) {
EXPECT_EQ(old_text.size(), start);
EXPECT_EQ(old_text.size(), end);
- // Delete two characters.
+ // Delete three characters; "about:bl" should not trigger inline autocomplete.
Peter Kasting 2014/05/30 21:06:16 Hmm... I wonder if it would be more future-proof t
msw 2014/05/31 02:43:24 This works for now, and it shouldn't be hard to fi
ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, 0));
ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, 0));
- EXPECT_EQ(old_text.substr(0, old_text.size() - 2), omnibox_view->GetText());
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, 0));
+ EXPECT_EQ(old_text.substr(0, old_text.size() - 3), omnibox_view->GetText());
// Undo delete.
ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_Z, ui::EF_CONTROL_DOWN));
@@ -1414,7 +1415,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, UndoRedo) {
// Redo delete.
ASSERT_NO_FATAL_FAILURE(
SendKey(ui::VKEY_Z, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN));
- EXPECT_EQ(old_text.substr(0, old_text.size() - 2), omnibox_view->GetText());
+ EXPECT_EQ(old_text.substr(0, old_text.size() - 3), omnibox_view->GetText());
// Delete everything.
omnibox_view->SelectAll(true);
@@ -1423,16 +1424,14 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, UndoRedo) {
// Undo delete everything.
ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_Z, ui::EF_CONTROL_DOWN));
- EXPECT_EQ(old_text.substr(0, old_text.size() - 2), omnibox_view->GetText());
+ EXPECT_EQ(old_text.substr(0, old_text.size() - 3), omnibox_view->GetText());
// Undo delete two characters.
ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_Z, ui::EF_CONTROL_DOWN));
EXPECT_EQ(old_text, omnibox_view->GetText());
}
-// See http://crosbug.com/10306
-IN_PROC_BROWSER_TEST_F(OmniboxViewTest,
- BackspaceDeleteHalfWidthKatakana) {
+IN_PROC_BROWSER_TEST_F(OmniboxViewTest, BackspaceDeleteHalfWidthKatakana) {
OmniboxView* omnibox_view = NULL;
ASSERT_NO_FATAL_FAILURE(GetOmniboxView(&omnibox_view));
// Insert text: ダ
@@ -1441,7 +1440,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest,
// Move the cursor to the end.
ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_END, 0));
- // Backspace should delete one character.
+ // Backspace should delete one character; see http://crbug.com/192743
Peter Kasting 2014/05/30 21:06:16 Nit: I'd omit the bug reference.
msw 2014/05/31 02:43:24 Done.
ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, 0));
EXPECT_EQ(base::UTF8ToUTF16("\357\276\200"), omnibox_view->GetText());
}
@@ -1500,10 +1499,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, Paste) {
ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_V, kCtrlOrCmdMask));
ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone());
EXPECT_EQ(ASCIIToUTF16(kSearchText), omnibox_view->GetText());
- // This fails on GTK, see http://crbug.com/131179
-#if !defined(TOOLKIT_GTK)
EXPECT_TRUE(popup_model->IsOpen());
-#endif
omnibox_view->CloseOmniboxPopup();
EXPECT_FALSE(popup_model->IsOpen());
« no previous file with comments | « chrome/browser/autocomplete/builtin_provider_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698