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

Unified Diff: chrome/browser/chrome_content_browser_client_browsertest.cc

Issue 23455047: InstantExtended: Send search URLs to renderers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More browsertest fixes Created 7 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/search/instant_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client_browsertest.cc
diff --git a/chrome/browser/chrome_content_browser_client_browsertest.cc b/chrome/browser/chrome_content_browser_client_browsertest.cc
index 46e9072b533297d7d9d9287d633eddf5e391de92..3bb56a5209f5c0f5ae9cd1b979fdb1a98327ca77 100644
--- a/chrome/browser/chrome_content_browser_client_browsertest.cc
+++ b/chrome/browser/chrome_content_browser_client_browsertest.cc
@@ -94,7 +94,19 @@ IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest,
EXPECT_EQ(url, entry->GetVirtualURL());
}
-IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest,
+class InstantNTPURLRewriteTest : public ChromeContentBrowserClientBrowserTest {
+ public:
+ virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ // browsertest initially spins up a non-Instant renderer for about:blank.
+ // In a real browser, navigating this renderer to the Instant new tab page
+ // forks a new privileged Instant render process, but that warps
+ // browsertest's fragile little mind; it just never navigates. We aren't
+ // trying to test the process model here, so turn it off.
+ CommandLine::ForCurrentProcess()->AppendSwitch(switches::kSingleProcess);
+ }
+};
+
+IN_PROC_BROWSER_TEST_F(InstantNTPURLRewriteTest,
UberURLHandler_InstantExtendedNewTabPage) {
const GURL url_original("chrome://newtab");
const GURL url_rewritten("http://example.com/newtab");
@@ -113,6 +125,8 @@ IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest,
IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest,
UberURLHandler_InstantExtendedNewTabPageDisabled) {
+ // Don't do the kSingleProcess shenanigans here (see the dual test) because
+ // otherwise RenderViewImpl crashes in a paranoid fit on startup.
const GURL url_original("chrome://newtab");
const GURL url_rewritten("http://example.com/newtab");
InstallTemplateURLWithNewTabPage(url_rewritten);
« no previous file with comments | « no previous file | chrome/browser/search/instant_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698