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

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

Issue 2901833002: Create NavigationHandle after beforeunload with PlzNavigate. (Closed)
Patch Set: small fix from jam Created 3 years, 7 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
« no previous file with comments | « content/browser/frame_host/frame_tree_node.cc ('k') | content/browser/frame_host/navigation_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_handle_impl_browsertest.cc
diff --git a/content/browser/frame_host/navigation_handle_impl_browsertest.cc b/content/browser/frame_host/navigation_handle_impl_browsertest.cc
index 69bd99de790f1f2999037f02b9e23077723e5520..f6fd86d5dde5d1911dfe14dabebf559d5874f7b7 100644
--- a/content/browser/frame_host/navigation_handle_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_handle_impl_browsertest.cc
@@ -1068,32 +1068,6 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ErrorCodeOnRedirect) {
EXPECT_EQ(net::ERR_ABORTED, observer.net_error_code());
}
-// Tests that when a navigation is aborted (i.e. because of beforeunload), the
-// right error code is set on the NavigationHandle.
-IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
- ErrorCodeOnAbortedNavigation) {
- // Without PlzNavigate, NavigationHandles aren't created until after the
- // beforeunload handler runs.
- if (!IsBrowserSideNavigationEnabled())
- return;
- GURL url(
- embedded_test_server()->GetURL("/render_frame_host/beforeunload.html"));
- EXPECT_TRUE(NavigateToURL(shell(), url));
-
- GURL new_url("/title1.html");
- NavigationHandleObserver observer(shell()->web_contents(), new_url);
- TestNavigationManager navigation_waiter(shell()->web_contents(), new_url);
- PrepContentsForBeforeUnloadTest(shell()->web_contents());
- SetShouldProceedOnBeforeUnload(shell(), false);
-
- shell()->LoadURL(new_url);
- WaitForAppModalDialog(shell());
- static_cast<WebContentsImpl*>(shell()->web_contents())
- ->CancelModalDialogsForRenderManager();
- navigation_waiter.WaitForNavigationFinished();
- EXPECT_EQ(net::ERR_ABORTED, observer.net_error_code());
-}
-
// This class allows running tests with PlzNavigate enabled, regardless of
// default test configuration.
class PlzNavigateNavigationHandleImplBrowserTest : public ContentBrowserTest {
« no previous file with comments | « content/browser/frame_host/frame_tree_node.cc ('k') | content/browser/frame_host/navigation_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698