Index: chrome/browser/instant/instant_controller.cc |
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc |
index fece178d33b422580d091bb8f394d22a32705798..5809acd0b6e69607d885a760d057355a2ab76b8b 100644 |
--- a/chrome/browser/instant/instant_controller.cc |
+++ b/chrome/browser/instant/instant_controller.cc |
@@ -158,6 +158,7 @@ InstantController::InstantController(chrome::BrowserInstantController* browser, |
extended_enabled_(extended_enabled), |
instant_enabled_(false), |
use_local_preview_only_(use_local_preview_only), |
+ in_testing_mode_(false), |
model_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
last_omnibox_text_has_inline_autocompletion_(false), |
last_verbatim_(false), |
@@ -921,6 +922,10 @@ void InstantController::NavigateToURL(const GURL& url, |
browser_->OpenURLInCurrentTab(url, transition); |
} |
+void InstantController::SetTestingMode() { |
+ in_testing_mode_ = true; |
+} |
+ |
bool InstantController::ResetLoader(const TemplateURL* template_url, |
const content::WebContents* active_tab, |
bool fallback_to_local) { |
@@ -1172,7 +1177,7 @@ bool InstantController::GetInstantURL(const TemplateURL* template_url, |
// Extended mode should always use HTTPS. TODO(sreeram): This section can be |
// removed if TemplateURLs supported "https://{google:host}/..." instead of |
// only supporting "{google:baseURL}...". |
- if (extended_enabled_) { |
+ if (extended_enabled_ && !in_testing_mode_) { |
GURL url_obj(*instant_url); |
if (!url_obj.is_valid()) |
return false; |