summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-28 23:55:54 +0000
committerdavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-28 23:55:54 +0000
commitbe097c91953ee0f030c3c8da45141ed5bd55b00f (patch)
treec713a781dcf6d608c62ada76b3be8955b7785786
parent2510684f91789fc7432925dd3065e9a482edf4b5 (diff)
downloadchromium_src-be097c91953ee0f030c3c8da45141ed5bd55b00f.zip
chromium_src-be097c91953ee0f030c3c8da45141ed5bd55b00f.tar.gz
chromium_src-be097c91953ee0f030c3c8da45141ed5bd55b00f.tar.bz2
Add a prerender test for ShouldFork firing in the control group.
This is so we have test coverage for renderer-initiated navigations since we'd apparently regressed this in the past. BUG=none TEST=PrerenderBrowserTest.ControlGroupRendererInitiated Review URL: https://codereview.chromium.org/136113009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247530 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/prerender/prerender_browsertest.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index 5fd4d1b..73fc868 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -3082,6 +3082,19 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, ControlGroup) {
NavigateToDestURL();
}
+// Checks that the control group correctly hits WOULD_HAVE_BEEN_USED
+// renderer-initiated navigations. (This verifies that the ShouldFork logic
+// behaves correctly.)
+IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, ControlGroupRendererInitiated) {
+ RestorePrerenderMode restore_prerender_mode;
+ PrerenderManager::SetMode(
+ PrerenderManager::PRERENDER_MODE_EXPERIMENT_CONTROL_GROUP);
+ DisableJavascriptCalls();
+ PrerenderTestURL("files/prerender/prerender_xhr_put.html",
+ FINAL_STATUS_WOULD_HAVE_BEEN_USED, 0);
+ OpenDestURLViaClick();
+}
+
// Make sure that the MatchComplete dummy works in the normal case. Once
// a prerender is cancelled because of a script, a dummy must be created to
// account for the MatchComplete case, and it must have a final status of