diff options
author | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-09 12:30:46 +0000 |
---|---|---|
committer | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-09 12:30:46 +0000 |
commit | 83eff5b89efcffd43855e7cec3681f18cd261704 (patch) | |
tree | 5ef7f0456834e1b8ecefd8aa62f0a6128e850d89 | |
parent | 5aba58b90a60fcd9162abb0c783c968bde020700 (diff) | |
download | chromium_src-83eff5b89efcffd43855e7cec3681f18cd261704.zip chromium_src-83eff5b89efcffd43855e7cec3681f18cd261704.tar.gz chromium_src-83eff5b89efcffd43855e7cec3681f18cd261704.tar.bz2 |
Revert 113785 - Enable TransferNavigationResourceHandler
Revert for potential cause of ExtensionApiTest.ProcessesVsTaskManager failure.
This enables a fix for bug 79520 that was previously committed but not enabled http://src.chromium.org/viewvc/chrome?view=rev&revision=112847.
BUG=79520
TEST=no
TBR=jam@chromium.org
Review URL: http://codereview.chromium.org/8889007
TBR=battre@chromium.org
Review URL: http://codereview.chromium.org/8879051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113794 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed, 21 insertions, 7 deletions
diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc index 18fadc7..d6bf4d6 100644 --- a/chrome/browser/extensions/app_process_apitest.cc +++ b/chrome/browser/extensions/app_process_apitest.cc @@ -361,8 +361,13 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_AppProcessRedirectBack) { // cancelled, and counts as a load stop // 8. Renderer navigates to empty.html, and finishes loading, counting as the // third load stop +#if defined(TRANSFER_REDIRECTS_BUG79520) ui_test_utils::NavigateToURLBlockUntilNavigationsComplete( browser(), base_url.Resolve("path1/redirect.html"), 3); +#else + ui_test_utils::NavigateToURLBlockUntilNavigationsComplete( + browser(), base_url.Resolve("path1/redirect.html"), 2); +#endif // 3 tabs, including the initial about:blank. The last 2 should be the same // process. diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc index ab72c1b..58f8e1a 100644 --- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc +++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc @@ -183,8 +183,12 @@ ResourceHandler* ChromeResourceDispatcherHostDelegate::RequestBeginning( resource_context.appcache_service()); #endif + // TODO(mpcomplete): Leaving disabled for now, since I'm checking this in + // close to the branch point. +#if defined(TRANSFER_REDIRECTS_BUG79520) handler = new TransferNavigationResourceHandler( handler, resource_dispatcher_host_, request); +#endif return handler; } diff --git a/chrome/test/data/extensions/api_test/webrequest/test_blocking.js b/chrome/test/data/extensions/api_test/webrequest/test_blocking.js index 9c5925d..903978e 100644 --- a/chrome/test/data/extensions/api_test/webrequest/test_blocking.js +++ b/chrome/test/data/extensions/api_test/webrequest/test_blocking.js @@ -126,6 +126,9 @@ runTests([ // Navigates to a page with a blocking handler that redirects to a different // page. + // TODO(mpcomplete): We should see an onBeforeRedirect as well, but our + // process switching logic cancels the original redirect request and + // starts a new one instead. See http://crbug.com/79520. function complexLoadRedirected() { expect( [ // events @@ -137,14 +140,13 @@ runTests([ }, retval: {redirectUrl: getURL("simpleLoad/a.html")} }, - { label: "onBeforeRedirect", - event: "onBeforeRedirect", + { label: "onErrorOccurred-1", + event: "onErrorOccurred", details: { url: getURL("complexLoad/a.html"), - redirectUrl: getURL("simpleLoad/a.html"), - statusLine: "", - statusCode: -1, fromCache: false, + error: "net::ERR_ABORTED" + // Request to chrome-extension:// url has no IP. } }, { label: "onBeforeRequest-2", @@ -176,7 +178,7 @@ runTests([ }, ], [ // event order - ["onBeforeRequest-1", "onBeforeRedirect", "onBeforeRequest-2", + ["onBeforeRequest-1", "onErrorOccurred-1", "onBeforeRequest-2", "onResponseStarted", "onCompleted"], ], {urls: ["<all_urls>"]}, // filter @@ -457,6 +459,7 @@ runTests([ responseHeadersExist: true, }, retval_function: function(name, details) { + console.log(JSON.stringify(details)); responseHeaders = details.responseHeaders; var found = false; var expectedValue = [ diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 0f5be68..cb1a684 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -2074,7 +2074,9 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( // issue a special POST navigation in WebKit (via // FrameLoader::loadFrameRequest). See ResourceDispatcher and WebURLLoaderImpl // for examples of how to send the httpBody data. - if (!frame->parent() && is_content_initiated && + // TODO(mpcomplete): remove is_redirect clause when http://crbug.com/79520 is + // fixed. + if (!frame->parent() && (is_content_initiated || is_redirect) && default_policy == WebKit::WebNavigationPolicyCurrentTab && request.httpMethod() == "GET" && !url.SchemeIs(chrome::kAboutScheme)) { bool send_referrer = false; |