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

Unified Diff: chrome/browser/instant/instant_controller.h

Issue 11592004: InstantExtended: tests! (Closed) Base URL: http://git.chromium.org/chromium/src.git@fixmyterms
Patch Set: Tests actually work. Created 8 years 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
« no previous file with comments | « chrome/browser/instant/instant_browsertest.cc ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_controller.h
diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h
index 250c31a6c0d10fb64a05141f033f20517b98aff2..a80a098c08145fe2266a151f4bd9dac739cab0b7 100644
--- a/chrome/browser/instant/instant_controller.h
+++ b/chrome/browser/instant/instant_controller.h
@@ -172,10 +172,18 @@ class InstantController {
// the speicfied URL.
void NavigateToURL(const GURL& url, content::PageTransition transition);
+ // Call to force InstantController to enter testing mode. In particular, this
+ // doesn't force the instant page to be served over HTTPS.
+ //
+ // Only call from tests.
+ void SetTestingMode();
sreeram 2013/01/02 18:12:10 I'd prefer instead to have the tests set --instant
samarth 2013/01/02 23:35:15 Ah yes, forget about that. I agree: that's much be
+
private:
FRIEND_TEST_ALL_PREFIXES(InstantTest, OmniboxFocusLoadsInstant);
FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider);
FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh);
+ FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, ExtendedModeIsOn);
+ FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, OmniboxFocusLoadsInstant);
// Helper for OmniboxFocusChanged. Commit or discard the preview.
void OmniboxLostFocus(gfx::NativeView view_gaining_focus);
@@ -242,6 +250,9 @@ class InstantController {
// If true, the instant URL is set to kLocalOmniboxPopupURL.
const bool use_local_preview_only_;
+ // If true, we are being used in a test.
+ bool in_testing_mode_;
+
// The state of the preview page, i.e., the page owned by |loader_|. Ignored
// if |instant_tab_| is in use.
InstantModel model_;
« no previous file with comments | « chrome/browser/instant/instant_browsertest.cc ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698