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

Unified Diff: chrome/browser/extensions/app_process_apitest.cc

Issue 8669014: Fix a bug where redirect chain gets lost on process swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: conditional disabling Created 9 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 | « no previous file | chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/app_process_apitest.cc
diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc
index 8c897362636f616456be87f2723cb9f2aeb7c605..d6bf4d619e450baed039e692748f8d0765d2b6a7 100644
--- a/chrome/browser/extensions/app_process_apitest.cc
+++ b/chrome/browser/extensions/app_process_apitest.cc
@@ -348,9 +348,26 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_AppProcessRedirectBack) {
browser()->NewTab();
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("path1/empty.html"));
browser()->NewTab();
- // Wait until the second tab finishes its redirect train (2 hops).
+ // Wait until the second tab finishes its redirect train (3 hops).
+ // 1. We navigate to redirect.html
+ // 2. Renderer navigates and finishes, counting as a load stop.
+ // 3. Renderer issues the meta refresh to navigate to server-redirect.
+ // 4. Renderer is now in a "provisional load", waiting for navigation to
+ // complete.
+ // 5. Browser sees a redirect response from server-redirect to empty.html, and
+ // transfers that to a new navigation, using RequestTransferURL.
+ // 6. We navigate to empty.html.
+ // 7. Renderer is still in a provisional load to server-redirect, so that is
+ // 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.
@@ -358,8 +375,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_AppProcessRedirectBack) {
EXPECT_EQ("/files/extensions/api_test/app_process/path1/empty.html",
browser()->GetTabContentsAt(2)->controller().
GetLastCommittedEntry()->url().path());
- RenderViewHost* host = browser()->GetTabContentsAt(1)->render_view_host();
- EXPECT_EQ(host->process(),
+ EXPECT_EQ(browser()->GetTabContentsAt(1)->render_view_host()->process(),
browser()->GetTabContentsAt(2)->render_view_host()->process());
}
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698