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

Unified Diff: chrome/browser/ui/search/instant_extended_browsertest.cc

Issue 12792013: Instant extended: Remove suggest commit on lost focus (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 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: chrome/browser/ui/search/instant_extended_browsertest.cc
diff --git a/chrome/browser/ui/search/instant_extended_browsertest.cc b/chrome/browser/ui/search/instant_extended_browsertest.cc
index 3bfeb77f672bc69d825a0f9a724e7d26d86aef8e..fb1497cbdeb4a6938785eddf4e3c69f21891de95 100644
--- a/chrome/browser/ui/search/instant_extended_browsertest.cc
+++ b/chrome/browser/ui/search/instant_extended_browsertest.cc
@@ -334,24 +334,14 @@ IN_PROC_BROWSER_TEST_F(InstantExtendedTest, OmniboxTextUponFocusLostCommit) {
// Commit the overlay by lost focus (e.g. clicking on the page).
instant()->CommitIfPossible(INSTANT_COMMIT_FOCUS_LOST);
- // Search term extraction should kick in with the autocompleted text.
- EXPECT_EQ(ASCIIToUTF16("johnny depp"), omnibox()->GetText());
-
- // Suggestion should be cleared at this point.
- EXPECT_EQ(ASCIIToUTF16(""), omnibox()->GetInstantSuggestion());
+ // Omnibox text and suggestion should not be changed.
+ EXPECT_EQ(ASCIIToUTF16("johnny"), omnibox()->GetText());
+ EXPECT_EQ(ASCIIToUTF16(" depp"), omnibox()->GetInstantSuggestion());
}
// Test that omnibox text is correctly set when clicking on committed SERP.
-// Disabled on Mac because omnibox focus loss is not working correctly.
-#if defined(OS_MACOSX)
-#define MAYBE_OmniboxTextUponFocusedCommittedSERP \
- DISABLED_OmniboxTextUponFocusedCommittedSERP
-#else
-#define MAYBE_OmniboxTextUponFocusedCommittedSERP \
- OmniboxTextUponFocusedCommittedSERP
-#endif
IN_PROC_BROWSER_TEST_F(InstantExtendedTest,
- MAYBE_OmniboxTextUponFocusedCommittedSERP) {
+ OmniboxTextUponFocusedCommittedSERP) {
// Setup Instant.
ASSERT_NO_FATAL_FAILURE(SetupInstant(browser()));
FocusOmniboxAndWaitForInstantExtendedSupport();
@@ -377,11 +367,9 @@ IN_PROC_BROWSER_TEST_F(InstantExtendedTest,
"handleOnChange();"));
instant()->instant_tab()->contents()->GetView()->Focus();
- // Search term extraction should kick in with the autocompleted text.
- EXPECT_EQ(ASCIIToUTF16("hello kitty"), omnibox()->GetText());
-
- // Suggestion should be cleared at this point.
- EXPECT_EQ(ASCIIToUTF16(""), omnibox()->GetInstantSuggestion());
+ // Omnibox text and suggestion should not be changed.
+ EXPECT_EQ(ASCIIToUTF16("hello"), omnibox()->GetText());
+ EXPECT_EQ(ASCIIToUTF16(" kitty"), omnibox()->GetInstantSuggestion());
}
// Checks that a previous Navigation suggestion is not re-used when a search

Powered by Google App Engine
This is Rietveld 408576698