Commit d6a4ef36 authored by carlosk's avatar carlosk Committed by Commit bot

PlzNavigate: test updates post beforeUnload IPC refactor.

This CL adapts several test classes with changes due now that
the IPCS for beforeUnload ack and renderer navigation requests are not
one and the same anymore.

BUG=440266

Review URL: https://codereview.chromium.org/953503002

Cr-Commit-Position: refs/heads/master@{#319049}
parent 10f7c9d7
......@@ -163,7 +163,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// Start a renderer-initiated non-user-initiated navigation.
process()->sink().ClearMessages();
main_test_rfh()->SendBeginNavigationWithURL(kUrl2, false);
main_test_rfh()->SendRendererInitiatedNavigationRequest(kUrl2, false);
FrameTreeNode* node = main_test_rfh()->frame_tree_node();
NavigationRequest* request = GetNavigationRequestForFrameTreeNode(node);
ASSERT_TRUE(request);
......@@ -421,21 +421,14 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, RedirectCrossSite) {
EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));
// It then redirects to another site.
net::RedirectInfo redirect_info;
redirect_info.status_code = 302;
redirect_info.new_method = "GET";
redirect_info.new_url = kUrl2;
redirect_info.new_first_party_for_cookies = kUrl2;
scoped_refptr<ResourceResponse> response(new ResourceResponse);
GetLoaderForNavigationRequest(main_request)->CallOnRequestRedirected(
redirect_info, response);
GetLoaderForNavigationRequest(main_request)->SimulateServerRedirect(kUrl2);
// The redirect should have been followed.
EXPECT_EQ(1, GetLoaderForNavigationRequest(main_request)->redirect_count());
EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));
// Have the RenderFrameHost commit the navigation.
response = new ResourceResponse;
scoped_refptr<ResourceResponse> response(new ResourceResponse);
GetLoaderForNavigationRequest(main_request)->CallOnResponseStarted(
response, MakeEmptyStream());
TestRenderFrameHost* final_speculative_rfh =
......@@ -556,7 +549,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// Now receive a renderer-initiated user-initiated request. It should replace
// the current NavigationRequest.
main_test_rfh()->SendBeginNavigationWithURL(kUrl2, true);
main_test_rfh()->SendRendererInitiatedNavigationRequest(kUrl2, true);
NavigationRequest* request2 = GetNavigationRequestForFrameTreeNode(node);
ASSERT_TRUE(request2);
EXPECT_EQ(kUrl2, request2->common_params().url);
......@@ -605,7 +598,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// Start a renderer-initiated user-initiated navigation to the 1st URL.
process()->sink().ClearMessages();
main_test_rfh()->SendBeginNavigationWithURL(kUrl1, true);
main_test_rfh()->SendRendererInitiatedNavigationRequest(kUrl1, true);
NavigationRequest* request1 = GetNavigationRequestForFrameTreeNode(node);
ASSERT_TRUE(request1);
EXPECT_EQ(kUrl1, request1->common_params().url);
......@@ -615,7 +608,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// Now receive a renderer-initiated non-user-initiated request. Nothing should
// change.
main_test_rfh()->SendBeginNavigationWithURL(kUrl2, false);
main_test_rfh()->SendRendererInitiatedNavigationRequest(kUrl2, false);
NavigationRequest* request2 = GetNavigationRequestForFrameTreeNode(node);
ASSERT_TRUE(request2);
EXPECT_EQ(request1, request2);
......@@ -660,7 +653,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// Now receive a renderer-initiated non-user-initiated request. Nothing should
// change.
main_test_rfh()->SendBeginNavigationWithURL(kUrl2, false);
main_test_rfh()->SendRendererInitiatedNavigationRequest(kUrl2, false);
NavigationRequest* request2 = GetNavigationRequestForFrameTreeNode(node);
ASSERT_TRUE(request2);
EXPECT_EQ(request1, request2);
......@@ -699,7 +692,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// Start a renderer-initiated non-user-initiated navigation to the 1st URL.
process()->sink().ClearMessages();
main_test_rfh()->SendBeginNavigationWithURL(kUrl1, false);
main_test_rfh()->SendRendererInitiatedNavigationRequest(kUrl1, false);
NavigationRequest* request1 = GetNavigationRequestForFrameTreeNode(node);
ASSERT_TRUE(request1);
EXPECT_EQ(kUrl1, request1->common_params().url);
......@@ -711,7 +704,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
EXPECT_TRUE(loader1);
// Now receive a 2nd similar request that should replace the current one.
main_test_rfh()->SendBeginNavigationWithURL(kUrl2, false);
main_test_rfh()->SendRendererInitiatedNavigationRequest(kUrl2, false);
NavigationRequest* request2 = GetNavigationRequestForFrameTreeNode(node);
EXPECT_EQ(kUrl2, request2->common_params().url);
EXPECT_FALSE(request2->browser_initiated());
......@@ -750,7 +743,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, Reload) {
ASSERT_TRUE(main_request != NULL);
EXPECT_EQ(FrameMsg_Navigate_Type::RELOAD,
main_request->common_params().navigation_type);
main_test_rfh()->PrepareForCommit(kUrl);
main_test_rfh()->PrepareForCommit();
EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));
main_test_rfh()->SendNavigate(0, kUrl);
......@@ -765,7 +758,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, Reload) {
ASSERT_TRUE(main_request != NULL);
EXPECT_EQ(FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE,
main_request->common_params().navigation_type);
main_test_rfh()->PrepareForCommit(kUrl);
main_test_rfh()->PrepareForCommit();
EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));
}
......@@ -843,14 +836,8 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
NavigationRequest* main_request = GetNavigationRequestForFrameTreeNode(node);
ASSERT_TRUE(main_request);
const GURL kUrlRedirect("https://www.google.com/");
net::RedirectInfo redirect_info;
redirect_info.status_code = 302;
redirect_info.new_method = "GET";
redirect_info.new_url = kUrlRedirect;
redirect_info.new_first_party_for_cookies = kUrlRedirect;
scoped_refptr<ResourceResponse> response(new ResourceResponse);
GetLoaderForNavigationRequest(main_request)
->CallOnRequestRedirected(redirect_info, response);
->SimulateServerRedirect(kUrlRedirect);
EXPECT_EQ(init_site_instance_id, main_test_rfh()->GetSiteInstance()->GetId());
speculative_rfh = GetSpeculativeRenderFrameHost(node);
ASSERT_TRUE(speculative_rfh);
......@@ -863,7 +850,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// Commit the navigation with Navigator by simulating the call to
// OnResponseStarted.
response = new ResourceResponse;
scoped_refptr<ResourceResponse> response(new ResourceResponse);
GetLoaderForNavigationRequest(main_request)
->CallOnResponseStarted(response, MakeEmptyStream());
speculative_rfh = GetSpeculativeRenderFrameHost(node);
......@@ -975,7 +962,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, DataUrls) {
// Do a renderer-initiated navigation to a data url. The request should not be
// sent to the IO thread, nor committed.
TestRenderFrameHost* main_rfh = main_test_rfh();
main_rfh->SendBeginNavigationWithURL(kUrl2, true);
main_rfh->SendRendererInitiatedNavigationRequest(kUrl2, true);
navigation_request = GetNavigationRequestForFrameTreeNode(node);
ASSERT_TRUE(navigation_request);
EXPECT_EQ(NavigationRequest::RESPONSE_STARTED,
......
......@@ -272,7 +272,7 @@ class RenderFrameHostManagerTest : public RenderViewHostImplTestHarness {
// is replaced without a pending frame being created, and we don't get the
// right values for the RFH to navigate: we try to use the old one that has
// been deleted in the meantime.
contents()->GetMainFrame()->PrepareForCommit(url);
contents()->GetMainFrame()->PrepareForCommit();
TestRenderFrameHost* old_rfh = contents()->GetMainFrame();
TestRenderFrameHost* active_rfh = contents()->GetPendingMainFrame()
......@@ -351,7 +351,7 @@ class RenderFrameHostManagerTest : public RenderViewHostImplTestHarness {
// Navigate to a cross-site URL.
contents()->GetController().LoadURL(
kDestUrl, Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
contents()->GetMainFrame()->PrepareForCommit(kDestUrl);
contents()->GetMainFrame()->PrepareForCommit();
EXPECT_TRUE(contents()->cross_navigation_pending());
// Manually increase the number of active frames in the
......@@ -430,7 +430,7 @@ TEST_F(RenderFrameHostManagerTest, NewTabPageProcesses) {
// we use the committed one.
contents2->GetController().LoadURL(
kChromeUrl, Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
contents2->GetMainFrame()->PrepareForCommit(kChromeUrl);
contents2->GetMainFrame()->PrepareForCommit();
TestRenderFrameHost* ntp_rfh2 = contents2->GetMainFrame();
EXPECT_FALSE(contents2->cross_navigation_pending());
ntp_rfh2->SendNavigate(100, kChromeUrl);
......@@ -439,7 +439,7 @@ TEST_F(RenderFrameHostManagerTest, NewTabPageProcesses) {
// requiring a beforeunload ack.
contents2->GetController().LoadURL(
kDestUrl, Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
contents2->GetMainFrame()->PrepareForCommit(kDestUrl);
contents2->GetMainFrame()->PrepareForCommit();
EXPECT_TRUE(contents2->cross_navigation_pending());
TestRenderFrameHost* dest_rfh2 = contents2->GetPendingMainFrame();
ASSERT_TRUE(dest_rfh2);
......@@ -460,7 +460,7 @@ TEST_F(RenderFrameHostManagerTest, NewTabPageProcesses) {
contents2->GetController().LoadURL(
kChromeUrl, Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
contents2->GetMainFrame()->PrepareForCommit(kChromeUrl);
contents2->GetMainFrame()->PrepareForCommit();
contents2->GetPendingMainFrame()->SendNavigate(102, kChromeUrl);
EXPECT_NE(contents()->GetMainFrame()->GetSiteInstance(),
......@@ -795,7 +795,7 @@ TEST_F(RenderFrameHostManagerTest, AlwaysSendEnableViewSourceMode) {
controller().LoadURL(
kUrl, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string());
// Simulate response from RenderFrame for DispatchBeforeUnload.
contents()->GetMainFrame()->PrepareForCommit(kUrl);
contents()->GetMainFrame()->PrepareForCommit();
ASSERT_TRUE(contents()->GetPendingMainFrame())
<< "Expected new pending RenderFrameHost to be created.";
RenderFrameHost* last_rfh = contents()->GetPendingMainFrame();
......@@ -815,7 +815,7 @@ TEST_F(RenderFrameHostManagerTest, AlwaysSendEnableViewSourceMode) {
// Navigate, again.
controller().LoadURL(
kUrl, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string());
contents()->GetMainFrame()->PrepareForCommit(kUrl);
contents()->GetMainFrame()->PrepareForCommit();
// The same RenderViewHost should be reused.
EXPECT_FALSE(contents()->GetPendingMainFrame());
EXPECT_TRUE(last_rfh == contents()->GetMainFrame());
......@@ -1075,7 +1075,7 @@ TEST_F(RenderFrameHostManagerTest, PageDoesBackAndReload) {
// Now let's simulate the evil page calling history.back().
contents()->OnGoToEntryAtOffset(-1);
contents()->GetMainFrame()->PrepareForCommit(kUrl1);
contents()->GetMainFrame()->PrepareForCommit();
// We should have a new pending RFH.
// Note that in this case, the navigation has not committed, so evil_rfh will
// not be deleted yet.
......@@ -1160,7 +1160,7 @@ TEST_F(RenderFrameHostManagerTest, NavigateAfterMissingSwapOutACK) {
// (http://crbug.com/93427).
contents()->GetController().GoBack();
EXPECT_TRUE(rfh2->IsWaitingForBeforeUnloadACK());
contents()->GetMainFrame()->PrepareForCommit(kUrl1);
contents()->GetMainFrame()->PrepareForCommit();
EXPECT_FALSE(rfh2->IsWaitingForBeforeUnloadACK());
// The back navigation commits.
......@@ -1171,7 +1171,7 @@ TEST_F(RenderFrameHostManagerTest, NavigateAfterMissingSwapOutACK) {
// We should be able to navigate forward.
contents()->GetController().GoForward();
contents()->GetMainFrame()->PrepareForCommit(kUrl2);
contents()->GetMainFrame()->PrepareForCommit();
const NavigationEntry* entry2 = contents()->GetController().GetPendingEntry();
rfh2->SendNavigate(entry2->GetPageID(), entry2->GetURL());
EXPECT_EQ(rfh2, main_test_rfh());
......@@ -1342,7 +1342,7 @@ TEST_F(RenderFrameHostManagerTest, DisownOpenerDuringNavigation) {
// Start a back navigation so that rfh1 becomes the pending RFH.
contents()->GetController().GoBack();
contents()->GetMainFrame()->PrepareForCommit(kUrl1);
contents()->GetMainFrame()->PrepareForCommit();
// Disown the opener from rfh2.
rfh2->DidDisownOpener();
......@@ -1383,7 +1383,7 @@ TEST_F(RenderFrameHostManagerTest, DisownOpenerAfterNavigation) {
// Commit a back navigation before the DidDisownOpener message arrives.
// rfh1 will be kept alive because of the opener tab.
contents()->GetController().GoBack();
contents()->GetMainFrame()->PrepareForCommit(kUrl1);
contents()->GetMainFrame()->PrepareForCommit();
const NavigationEntry* entry1 = contents()->GetController().GetPendingEntry();
rfh1->SendNavigate(entry1->GetPageID(), entry1->GetURL());
......@@ -1449,7 +1449,7 @@ TEST_F(RenderFrameHostManagerTest, CleanUpSwappedOutRVHOnProcessCrash) {
// Reload the initial tab. This should recreate the opener's swapped out RVH
// in the original SiteInstance.
contents()->GetController().Reload(true);
contents()->GetMainFrame()->PrepareForCommit(kUrl1);
contents()->GetMainFrame()->PrepareForCommit();
EXPECT_EQ(opener1_manager->GetSwappedOutRenderViewHost(
rvh1->GetSiteInstance())->GetRoutingID(),
test_rvh()->opener_route_id());
......@@ -1644,7 +1644,7 @@ TEST_F(RenderFrameHostManagerTest, CloseWithPendingWhileUnresponsive) {
kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserSideNavigation)) {
rfh1->PrepareForCommit(kUrl2);
rfh1->PrepareForCommit();
}
EXPECT_TRUE(contents()->cross_navigation_pending());
......@@ -1669,7 +1669,7 @@ TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) {
// Navigate to new site, simulating onbeforeunload approval.
controller().LoadURL(
kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
contents()->GetMainFrame()->PrepareForCommit(kUrl2);
contents()->GetMainFrame()->PrepareForCommit();
EXPECT_TRUE(contents()->cross_navigation_pending());
EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh1->rfh_state());
TestRenderFrameHost* rfh2 = contents()->GetPendingMainFrame();
......@@ -1717,7 +1717,7 @@ TEST_F(RenderFrameHostManagerTest, SwapOutFrameAfterSwapOutACK) {
// Navigate to new site, simulating onbeforeunload approval.
controller().LoadURL(
kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
contents()->GetMainFrame()->PrepareForCommit(kUrl2);
contents()->GetMainFrame()->PrepareForCommit();
EXPECT_TRUE(contents()->cross_navigation_pending());
EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh1->rfh_state());
TestRenderFrameHost* rfh2 = contents()->GetPendingMainFrame();
......@@ -1760,7 +1760,7 @@ TEST_F(RenderFrameHostManagerTest,
// Navigate to new site, simulating onbeforeunload approval.
controller().LoadURL(
kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
rfh1->PrepareForCommit(kUrl2);
rfh1->PrepareForCommit();
EXPECT_TRUE(contents()->cross_navigation_pending());
TestRenderFrameHost* rfh2 = contents()->GetPendingMainFrame();
......
......@@ -6,6 +6,8 @@
#include "content/browser/loader/navigation_url_loader_delegate.h"
#include "content/public/browser/stream_handle.h"
#include "content/public/common/resource_response.h"
#include "net/url_request/redirect_info.h"
namespace content {
......@@ -21,6 +23,16 @@ void TestNavigationURLLoader::FollowRedirect() {
redirect_count_++;
}
void TestNavigationURLLoader::SimulateServerRedirect(const GURL& redirect_url) {
net::RedirectInfo redirect_info;
redirect_info.status_code = 302;
redirect_info.new_method = "GET";
redirect_info.new_url = redirect_url;
redirect_info.new_first_party_for_cookies = redirect_url;
scoped_refptr<ResourceResponse> response(new ResourceResponse);
CallOnRequestRedirected(redirect_info, response);
}
void TestNavigationURLLoader::CallOnRequestRedirected(
const net::RedirectInfo& redirect_info,
const scoped_refptr<ResourceResponse>& response) {
......
......@@ -36,6 +36,8 @@ class TestNavigationURLLoader
NavigationRequestInfo* request_info() const { return request_info_.get(); }
void SimulateServerRedirect(const GURL& redirect_url);
void CallOnRequestRedirected(const net::RedirectInfo& redirect_info,
const scoped_refptr<ResourceResponse>& response);
void CallOnResponseStarted(const scoped_refptr<ResourceResponse>& response,
......
......@@ -200,58 +200,71 @@ void TestRenderFrameHost::SendNavigateWithParameters(
OnDidCommitProvisionalLoad(msg);
}
void TestRenderFrameHost::SendBeginNavigationWithURL(const GURL& url,
bool has_user_gesture) {
BeginNavigationParams begin_params("GET", std::string(), net::LOAD_NORMAL,
has_user_gesture);
CommonNavigationParams common_params;
common_params.url = url;
common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault);
common_params.transition = ui::PAGE_TRANSITION_LINK;
OnBeginNavigation(common_params, begin_params,
scoped_refptr<ResourceRequestBody>());
void TestRenderFrameHost::SendRendererInitiatedNavigationRequest(
const GURL& url,
bool has_user_gesture) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserSideNavigation)) {
BeginNavigationParams begin_params("GET", std::string(), net::LOAD_NORMAL,
has_user_gesture);
CommonNavigationParams common_params;
common_params.url = url;
common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault);
common_params.transition = ui::PAGE_TRANSITION_LINK;
OnBeginNavigation(common_params, begin_params,
scoped_refptr<ResourceRequestBody>());
}
}
void TestRenderFrameHost::DidDisownOpener() {
OnDidDisownOpener();
}
void TestRenderFrameHost::PrepareForCommit(const GURL& url) {
void TestRenderFrameHost::PrepareForCommit() {
PrepareForCommitWithServerRedirect(GURL());
}
void TestRenderFrameHost::PrepareForCommitWithServerRedirect(
const GURL& redirect_url) {
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserSideNavigation)) {
// Non PlzNavigate
SendBeforeUnloadACK(true);
return;
}
// PlzNavigate
// Simulate the network stack commit without any redirects.
NavigationRequest* request =
static_cast<NavigatorImpl*>(frame_tree_node_->navigator())
->GetNavigationRequestForNodeForTesting(frame_tree_node_);
CHECK(request);
// We are simulating a renderer-initiated user-initiated navigation.
if (!request) {
SendBeginNavigationWithURL(url, true);
request = static_cast<NavigatorImpl*>(frame_tree_node_->navigator())
->GetNavigationRequestForNodeForTesting(frame_tree_node_);
}
ASSERT_TRUE(request);
// We may not have simulated the renderer response to the navigation request.
// Do that now.
// Simulate a beforeUnload ACK from the renderer if the browser is waiting for
// it. If it runs it will update the request state.
if (request->state() == NavigationRequest::WAITING_FOR_RENDERER_RESPONSE)
SendBeforeUnloadACK(true);
// We have already simulated the IO thread commit. Only the
// DidCommitProvisionalLoad from the renderer is missing.
if (request->state() == NavigationRequest::RESPONSE_STARTED)
// If a network request is not needed for this URL, just check the request is
// in the correct state and return.
if (!request->ShouldMakeNetworkRequest(request->common_params().url)) {
CHECK(request->state() == NavigationRequest::RESPONSE_STARTED);
return;
}
CHECK(request->state() == NavigationRequest::STARTED);
ASSERT_TRUE(request->state() == NavigationRequest::STARTED);
TestNavigationURLLoader* url_loader =
static_cast<TestNavigationURLLoader*>(request->loader_for_testing());
ASSERT_TRUE(url_loader);
CHECK(url_loader);
// If a non-empty |redirect_url| was provided, simulate a server redirect.
if (!redirect_url.is_empty())
url_loader->SimulateServerRedirect(redirect_url);
// Simulate the network stack commit.
scoped_refptr<ResourceResponse> response(new ResourceResponse);
// TODO(carlosk): ideally with PlzNavigate it should be possible someday to
// fully commit the navigation at this call to CallOnResponseStarted.
url_loader->CallOnResponseStarted(response, MakeEmptyStream());
}
......
......@@ -85,7 +85,11 @@ class TestRenderFrameHost : public RenderFrameHostImpl,
int response_code,
const base::FilePath* file_path_for_history_item,
const std::vector<GURL>& redirects);
void SendBeginNavigationWithURL(const GURL& url, bool has_user_gesture);
// With the current navigation logic this method is a no-op.
// PlzNavigate: this method simulates receiving a BeginNavigation IPC.
void SendRendererInitiatedNavigationRequest(const GURL& url,
bool has_user_gesture);
void DidDisownOpener();
......@@ -102,7 +106,13 @@ class TestRenderFrameHost : public RenderFrameHostImpl,
// this simulates a BeforeUnload ACK from the renderer.
// PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the
// interaction with the IO thread up until the response is ready to commit.
void PrepareForCommit(const GURL& url);
void PrepareForCommit();
// This method does the same as PrepareForCommit.
// PlzNavigate: Beyond doing the same as PrepareForCommit, this method will
// also simulate a server redirect to |redirect_url|. If the URL is empty the
// redirect step is ignored.
void PrepareForCommitWithServerRedirect(const GURL& redirect_url);
// Simulate receiving a FrameHostMsg_BeforeUnloadHandlersPresent.
void SendBeforeUnloadHandlersPresent(bool present);
......
......@@ -158,7 +158,7 @@ void TestWebContents::CommitPendingNavigation() {
// replaced without a pending frame being created, and we don't get the right
// values for the RFH to navigate: we try to use the old one that has been
// deleted in the meantime.
GetMainFrame()->PrepareForCommit(entry->GetURL());
GetMainFrame()->PrepareForCommit();
TestRenderFrameHost* old_rfh = GetMainFrame();
TestRenderFrameHost* rfh = GetPendingMainFrame();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment