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

Unified Diff: chrome/browser/instant/instant_browsertest.cc

Issue 11262015: Remove unused / unnecessary stuff from Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove SuggestedTextView entirely 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
Index: chrome/browser/instant/instant_browsertest.cc
diff --git a/chrome/browser/instant/instant_browsertest.cc b/chrome/browser/instant/instant_browsertest.cc
index 5948c7893f570948ba10d29436e1a031f416c2bd..0005ed0705079ef609cc202a1f58e53852225036 100644
--- a/chrome/browser/instant/instant_browsertest.cc
+++ b/chrome/browser/instant/instant_browsertest.cc
@@ -54,7 +54,7 @@ class InstantTestModelObserver : public InstantModelObserver {
const InstantModel* const model_;
base::RunLoop run_loop_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(InstantTestModelObserver);
+ DISALLOW_COPY_AND_ASSIGN(InstantTestModelObserver);
};
class InstantTest : public InProcessBrowserTest {
@@ -438,51 +438,6 @@ IN_PROC_BROWSER_TEST_F(InstantTest, SuggestionIsCompletedNow) {
EXPECT_EQ(ASCIIToUTF16(""), omnibox()->GetInstantSuggestion());
}
-#if defined(OS_MACOSX)
-// The "delayed" completion behavior is not implemented on the Mac. Strange.
-#define MAYBE_SuggestionIsCompletedDelayed DISABLED_SuggestionIsCompletedDelayed
-#else
-#define MAYBE_SuggestionIsCompletedDelayed SuggestionIsCompletedDelayed
-#endif
-// Test that the INSTANT_COMPLETE_DELAYED behavior works as expected.
-IN_PROC_BROWSER_TEST_F(InstantTest, MAYBE_SuggestionIsCompletedDelayed) {
- ASSERT_NO_FATAL_FAILURE(SetupInstant("instant.html"));
- FocusOmniboxAndWaitForInstantSupport();
-
- // Tell the JS to request the given behavior.
- EXPECT_TRUE(ExecuteScript("behavior = 'delayed'"));
-
- // Type a query, causing the hardcoded "query suggestion" to be returned.
- SetOmniboxTextAndWaitForInstantToShow("query");
-
- content::WindowedNotificationObserver instant_updated_observer(
- chrome::NOTIFICATION_INSTANT_CONTROLLER_UPDATED,
- content::NotificationService::AllSources());
-
- // Get what's showing in the omnibox, and what's highlighted.
- string16 text = omnibox()->GetText();
- size_t start = 0, end = 0;
- omnibox()->GetSelectionBounds(&start, &end);
- if (start > end)
- std::swap(start, end);
-
- EXPECT_EQ(ASCIIToUTF16("query"), text);
- EXPECT_EQ(ASCIIToUTF16(""), text.substr(start, end - start));
- EXPECT_EQ(ASCIIToUTF16(" suggestion"), omnibox()->GetInstantSuggestion());
-
- // Wait for the animation to complete, which causes the omnibox to update.
- instant_updated_observer.Wait();
-
- text = omnibox()->GetText();
- omnibox()->GetSelectionBounds(&start, &end);
- if (start > end)
- std::swap(start, end);
-
- EXPECT_EQ(ASCIIToUTF16("query suggestion"), text);
- EXPECT_EQ(ASCIIToUTF16(" suggestion"), text.substr(start, end - start));
- EXPECT_EQ(ASCIIToUTF16(""), omnibox()->GetInstantSuggestion());
-}
-
// Test that the INSTANT_COMPLETE_NEVER behavior works as expected.
IN_PROC_BROWSER_TEST_F(InstantTest, SuggestionIsCompletedNever) {
ASSERT_NO_FATAL_FAILURE(SetupInstant("instant.html"));
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | chrome/browser/instant/instant_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698