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

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

Issue 17413017: InstantExtended: Don't create overlay. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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_manual_interactive_uitest.cc
diff --git a/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc b/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc
index ff818704ba10edf9e3798bda24e2ffde86f08f99..c841b9618bad3d4cd709f35b60aea2bfff2931ef 100644
--- a/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc
+++ b/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc
@@ -68,16 +68,6 @@ class InstantExtendedManualTest : public InProcessBrowserTest,
disable_network_change_notifier_.reset();
}
- void ResetInstant() {
- set_browser(browser());
- instant()->SetInstantEnabled(false, true);
- instant()->SetInstantEnabled(true, false);
-
- FocusOmniboxAndWaitForInstantOverlayAndNTPSupport();
- ASSERT_TRUE(IsGoogleOverlay());
- ASSERT_TRUE(IsGoogleNTP());
- }
-
protected:
virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
chrome::EnableInstantExtendedAPIForTesting();
@@ -135,14 +125,6 @@ class InstantExtendedManualTest : public InProcessBrowserTest,
return is_google;
}
- bool IsGoogleOverlay() {
- return IsGooglePage(instant()->overlay()->contents());
- }
-
- bool IsGoogleNTP() {
- return IsGooglePage(instant()->ntp()->contents());
- }
-
private:
scoped_refptr<net::RuleBasedHostResolverProc> host_resolver_proc_;
scoped_ptr<net::ScopedDefaultHostResolverProc> scoped_host_resolver_proc_;
@@ -150,31 +132,18 @@ class InstantExtendedManualTest : public InProcessBrowserTest,
disable_network_change_notifier_;
};
-IN_PROC_BROWSER_TEST_F(InstantExtendedManualTest,
- MANUAL_OmniboxFocusLoadsInstant) {
+IN_PROC_BROWSER_TEST_F(InstantExtendedManualTest, MANUAL_ShowsGoogleNTP) {
set_browser(browser());
-
- // Explicitly unfocus the omnibox.
- EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
- ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER);
-
- EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_TAB_CONTAINER));
- EXPECT_FALSE(omnibox()->model()->has_focus());
-
- // Delete any existing overlay.
- instant()->overlay_.reset();
- EXPECT_FALSE(instant()->GetOverlayContents());
-
- // Refocus the omnibox. The InstantController should've preloaded Instant.
- FocusOmniboxAndWaitForInstantOverlayAndNTPSupport();
- ASSERT_TRUE(IsGoogleOverlay());
-
- EXPECT_FALSE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_TAB_CONTAINER));
- EXPECT_TRUE(omnibox()->model()->has_focus());
-
- // Check that the page supports Instant, but it isn't showing.
- ASSERT_TRUE(instant()->overlay());
- EXPECT_TRUE(instant()->overlay()->supports_instant());
- EXPECT_FALSE(instant()->IsOverlayingSearchResults());
- EXPECT_TRUE(instant()->model()->mode().is_default());
+ instant()->SetInstantEnabled(false, true);
+ instant()->SetInstantEnabled(true, false);
+ FocusOmniboxAndWaitForInstantNTPSupport();
+
+ ui_test_utils::NavigateToURLWithDisposition(
+ browser(),
+ GURL(chrome::kChromeUINewTabURL),
+ NEW_FOREGROUND_TAB,
+ ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB);
+ content::WebContents* active_tab =
+ browser()->tab_strip_model()->GetActiveWebContents();
+ EXPECT_TRUE(IsGooglePage(active_tab));
}
« no previous file with comments | « chrome/browser/ui/search/instant_extended_interactive_uitest.cc ('k') | chrome/browser/ui/search/instant_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698