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

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

Issue 18223002: InstantExtended: Remove overlay control code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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 c841b9618bad3d4cd709f35b60aea2bfff2931ef..34796c7c5b5253e8b4c565f4d5fead082fe6b430 100644
--- a/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc
+++ b/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/ui/host_desktop.h"
#include "chrome/browser/ui/omnibox/omnibox_view.h"
#include "chrome/browser/ui/search/instant_ntp.h"
-#include "chrome/browser/ui/search/instant_overlay.h"
#include "chrome/browser/ui/search/instant_test_utils.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_notification_types.h"
@@ -59,7 +58,7 @@ class InstantExtendedManualTest : public InProcessBrowserTest,
testing::UnitTest::GetInstance()->current_test_info();
ASSERT_TRUE(StartsWithASCII(test_info->name(), "MANUAL_", true) ||
StartsWithASCII(test_info->name(), "DISABLED_", true));
- // Make IsOffline() return false so we don't try to use the local overlay.
+ // Make IsOffline() return false so we don't try to use the local NTP.
disable_network_change_notifier_.reset(
new net::NetworkChangeNotifier::DisableForTest());
}
@@ -77,47 +76,6 @@ class InstantExtendedManualTest : public InProcessBrowserTest,
return browser()->tab_strip_model()->GetActiveWebContents();
}
- bool PressBackspace() {
- return ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_BACK,
- false, false, false, false);
- }
-
- bool PressBackspaceAndWaitForSuggestions() {
- content::WindowedNotificationObserver observer(
- chrome::NOTIFICATION_INSTANT_SET_SUGGESTION,
- content::NotificationService::AllSources());
- bool result = PressBackspace();
- observer.Wait();
- return result;
- }
-
- bool PressBackspaceAndWaitForOverlayToShow() {
- InstantTestModelObserver observer(
- instant()->model(), SearchMode::MODE_SEARCH_SUGGESTIONS);
- return PressBackspace() && observer.WaitForExpectedOverlayState() ==
- SearchMode::MODE_SEARCH_SUGGESTIONS;
- }
-
- bool PressEnterAndWaitForNavigationWithTitle(content::WebContents* contents,
- const string16& title) {
- content::TitleWatcher title_watcher(contents, title);
- content::WindowedNotificationObserver nav_observer(
- content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::NotificationService::AllSources());
- browser()->window()->GetLocationBar()->AcceptInput();
- nav_observer.Wait();
- return title_watcher.WaitAndGetTitle() == title;
- }
-
- GURL GetActiveTabURL() {
- return active_tab()->GetController().GetActiveEntry()->GetURL();
- }
-
- bool GetSelectionState(bool* selected) {
- return GetBoolFromJS(instant()->GetOverlayContents(),
- "google.ac.gs().api.i()", selected);
- }
-
bool IsGooglePage(content::WebContents* contents) {
bool is_google = false;
if (!GetBoolFromJS(contents, "!!window.google", &is_google))
@@ -134,8 +92,7 @@ class InstantExtendedManualTest : public InProcessBrowserTest,
IN_PROC_BROWSER_TEST_F(InstantExtendedManualTest, MANUAL_ShowsGoogleNTP) {
set_browser(browser());
- instant()->SetInstantEnabled(false, true);
- instant()->SetInstantEnabled(true, false);
+ instant()->ReloadStaleNTP();
FocusOmniboxAndWaitForInstantNTPSupport();
ui_test_utils::NavigateToURLWithDisposition(
@@ -143,7 +100,5 @@ IN_PROC_BROWSER_TEST_F(InstantExtendedManualTest, MANUAL_ShowsGoogleNTP) {
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));
+ EXPECT_TRUE(IsGooglePage(active_tab()));
}

Powered by Google App Engine
This is Rietveld 408576698