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

Unified Diff: content/browser/frame_host/navigation_controller_impl_unittest.cc

Issue 464593003: Don't swap out the old RenderFrameHost until the new one commits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase past PlzNavigate CL Created 6 years, 4 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
Index: content/browser/frame_host/navigation_controller_impl_unittest.cc
diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc
index 65759bd8ed4e2ab4ed25a779a35262633ea72154..4303cc30854d95fe08f2aee368021e1e3a7f8c32 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -1096,14 +1096,10 @@ TEST_F(NavigationControllerTest, LoadURL_WithBindings) {
increment_active_view_count();
// Navigate to a second URL, simulate the beforeunload ack for the cross-site
- // transition, run the unload handler, and set bindings on the pending
- // RenderViewHost to simulate a privileged url.
+ // transition, and set bindings on the pending RenderViewHost to simulate a
+ // privileged url.
controller.LoadURL(url2, Referrer(), PAGE_TRANSITION_TYPED, std::string());
orig_rfh->GetRenderViewHost()->SendBeforeUnloadACK(true);
- contents()->GetRenderManagerForTesting()->OnCrossSiteResponse(
- contents()->GetPendingMainFrame(),
- GlobalRequestID(0, 0), scoped_ptr<CrossSiteTransferringRequest>(),
- url_chain, Referrer(), PAGE_TRANSITION_TYPED, false);
TestRenderFrameHost* new_rfh = contents()->GetPendingMainFrame();
new_rfh->GetRenderViewHost()->AllowBindings(1);
new_rfh->SendNavigate(1, url2);
@@ -1118,10 +1114,6 @@ TEST_F(NavigationControllerTest, LoadURL_WithBindings) {
// Going back, the first entry should still appear unprivileged.
controller.GoBack();
new_rfh->GetRenderViewHost()->SendBeforeUnloadACK(true);
- contents()->GetRenderManagerForTesting()->OnCrossSiteResponse(
- contents()->GetPendingMainFrame(),
- GlobalRequestID(0, 0), scoped_ptr<CrossSiteTransferringRequest>(),
- url_chain, Referrer(), PAGE_TRANSITION_TYPED, false);
orig_rfh->SendNavigate(0, url1);
EXPECT_EQ(0, controller.GetLastCommittedEntryIndex());
EXPECT_EQ(0, NavigationEntryImpl::FromNavigationEntry(
« no previous file with comments | « content/browser/frame_host/cross_site_transferring_request.h ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698