diff options
Diffstat (limited to 'content')
| -rw-r--r-- | content/browser/frame_host/navigator_impl_unittest.cc | 2 | ||||
| -rw-r--r-- | content/browser/web_contents/web_contents_impl_unittest.cc | 4 | ||||
| -rw-r--r-- | content/test/test_web_contents.cc | 5 |
3 files changed, 2 insertions, 9 deletions
diff --git a/content/browser/frame_host/navigator_impl_unittest.cc b/content/browser/frame_host/navigator_impl_unittest.cc index fbe1106..6c93e1f 100644 --- a/content/browser/frame_host/navigator_impl_unittest.cc +++ b/content/browser/frame_host/navigator_impl_unittest.cc @@ -456,7 +456,6 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, CrossSiteNavigation) { // Receive the beforeUnload ACK. main_test_rfh()->SendBeforeUnloadACK(true); EXPECT_EQ(speculative_rfh, GetSpeculativeRenderFrameHost(node)); - EXPECT_FALSE(contents()->CrossProcessNavigationPending()); scoped_refptr<ResourceResponse> response(new ResourceResponse); GetLoaderForNavigationRequest(main_request)->CallOnResponseStarted( @@ -464,7 +463,6 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, CrossSiteNavigation) { EXPECT_EQ(speculative_rfh, GetSpeculativeRenderFrameHost(node)); EXPECT_TRUE(DidRenderFrameHostRequestCommit(speculative_rfh)); EXPECT_FALSE(DidRenderFrameHostRequestCommit(main_test_rfh())); - EXPECT_TRUE(contents()->CrossProcessNavigationPending()); speculative_rfh->SendNavigate(0, entry_id, true, kUrl2); diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc index 780f7f3..49c8c65 100644 --- a/content/browser/web_contents/web_contents_impl_unittest.cc +++ b/content/browser/web_contents/web_contents_impl_unittest.cc @@ -361,7 +361,6 @@ TEST_F(WebContentsImplTest, UpdateTitle) { InitNavigateParams(¶ms, 0, 0, true, GURL(url::kAboutBlankURL), ui::PAGE_TRANSITION_TYPED); - contents()->GetMainFrame()->PrepareForCommit(); contents()->GetMainFrame()->SendNavigateWithParams(¶ms); contents()->UpdateTitle(contents()->GetMainFrame(), 0, @@ -1395,6 +1394,7 @@ TEST_F(WebContentsImplTest, CrossSiteNotPreemptedDuringBeforeUnload) { url, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); int entry1_id = controller().GetPendingEntry()->GetUniqueID(); TestRenderFrameHost* orig_rfh = contents()->GetMainFrame(); + orig_rfh->PrepareForCommit(); EXPECT_FALSE(contents()->CrossProcessNavigationPending()); // Navigate to new site, with the beforeunload request in flight. @@ -3040,7 +3040,6 @@ TEST_F(WebContentsImplTestWithSiteIsolation, StartStopEventsBalance) { controller().LoadURL( main_url, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); int entry_id = controller().GetPendingEntry()->GetUniqueID(); - orig_rfh->PrepareForCommit(); orig_rfh->OnMessageReceived( FrameHostMsg_DidStartLoading(orig_rfh->GetRoutingID(), false)); contents()->TestDidNavigate(orig_rfh, 1, entry_id, true, main_url, @@ -3056,7 +3055,6 @@ TEST_F(WebContentsImplTestWithSiteIsolation, StartStopEventsBalance) { // Navigate the child frame to about:blank, which will send both // DidStartLoading and DidStopLoading messages. { - subframe->SendRendererInitiatedNavigationRequest(initial_url, false); subframe->OnMessageReceived( FrameHostMsg_DidStartLoading(subframe->GetRoutingID(), true)); subframe->SendNavigateWithTransition(1, 0, false, initial_url, diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc index c424f93..9dd81f6 100644 --- a/content/test/test_web_contents.cc +++ b/content/test/test_web_contents.cc @@ -148,10 +148,7 @@ const std::string& TestWebContents::GetSaveFrameHeaders() { bool TestWebContents::CrossProcessNavigationPending() { if (IsBrowserSideNavigationEnabled()) { - return GetRenderManager()->speculative_render_frame_host_ && - static_cast<TestRenderFrameHost*>( - GetRenderManager()->speculative_render_frame_host_.get()) - ->pending_commit(); + return GetRenderManager()->speculative_render_frame_host_ != nullptr; } return GetRenderManager()->pending_frame_host() != nullptr; } |
