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

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

Issue 132733002: InstantExtended: remove dead code related to the non-cacheable NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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_test_utils.cc
diff --git a/chrome/browser/ui/search/instant_test_utils.cc b/chrome/browser/ui/search/instant_test_utils.cc
index cf4135b94938c2531183523440138b2811dc5214..a1a3286d7dfb939b53fe3236c8fb68aacaf85e97 100644
--- a/chrome/browser/ui/search/instant_test_utils.cc
+++ b/chrome/browser/ui/search/instant_test_utils.cc
@@ -14,8 +14,6 @@
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/ui/omnibox/omnibox_view.h"
-#include "chrome/browser/ui/search/instant_ntp.h"
-#include "chrome/browser/ui/search/instant_ntp_prerenderer.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/interactive_test_utils.h"
@@ -73,11 +71,6 @@ void InstantTestBase::SetupInstant(Browser* browser) {
TemplateURL* template_url = new TemplateURL(browser_->profile(), data);
service->Add(template_url); // Takes ownership of |template_url|.
service->SetDefaultSearchProvider(template_url);
-
- InstantService* instant_service =
- InstantServiceFactory::GetForProfile(browser_->profile());
- ASSERT_NE(static_cast<InstantService*>(NULL), instant_service);
- instant_service->ntp_prerenderer()->ReloadInstantNTP();
}
void InstantTestBase::SetInstantURL(const std::string& url) {
@@ -110,20 +103,6 @@ void InstantTestBase::FocusOmnibox() {
}
}
-void InstantTestBase::FocusOmniboxAndWaitForInstantNTPSupport() {
- content::WindowedNotificationObserver ntp_observer(
- chrome::NOTIFICATION_INSTANT_NTP_SUPPORT_DETERMINED,
- content::NotificationService::AllSources());
- FocusOmnibox();
-
- InstantService* instant_service =
- InstantServiceFactory::GetForProfile(browser_->profile());
- ASSERT_NE(static_cast<InstantService*>(NULL), instant_service);
- if (!instant_service->ntp_prerenderer()->ntp() ||
- !instant_service->ntp_prerenderer()->ntp()->supports_instant())
- ntp_observer.Wait();
-}
-
void InstantTestBase::SetOmniboxText(const std::string& text) {
FocusOmnibox();
omnibox()->SetUserText(base::UTF8ToUTF16(text));
@@ -158,14 +137,6 @@ bool InstantTestBase::GetStringFromJS(content::WebContents* contents,
contents, WrapScript(script), result);
}
-bool InstantTestBase::ExecuteScript(const std::string& script) {
- InstantService* instant_service =
- InstantServiceFactory::GetForProfile(browser_instant()->profile());
- if (!instant_service)
- return false;
- return content::ExecuteScript(instant_service->GetNTPContents(), script);
-}
-
bool InstantTestBase::CheckVisibilityIs(content::WebContents* contents,
bool expected) {
bool actual = !expected; // Purposely start with a mis-match.

Powered by Google App Engine
This is Rietveld 408576698