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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 2889703002: Ensure that all code paths which call FrameTreeNode::ResetNavigationRequest set NavigationHandle::G… (Closed)
Patch Set: review comments 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
Index: content/browser/site_per_process_browsertest.cc
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index 0d39621d3aead8df4861319b482f02245fde8f8c..64c1cac325d88ebcb6f998444d710353acd8ce37 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -65,6 +65,7 @@
#include "content/public/common/url_constants.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test_utils.h"
+#include "content/public/test/navigation_handle_observer.h"
#include "content/public/test/test_frame_navigation_observer.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
@@ -8697,6 +8698,7 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
// Navigate main tab to a b.com URL that will not commit.
GURL stall_url(embedded_test_server()->GetURL("b.com", "/title2.html"));
+ NavigationHandleObserver handle_observer(shell()->web_contents(), stall_url);
TestNavigationManager delayer(shell()->web_contents(), stall_url);
shell()->LoadURL(stall_url);
EXPECT_TRUE(delayer.WaitForRequestStart());
@@ -8713,6 +8715,7 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
// Since the navigation above didn't commit, the b.com RenderViewHost in the
// main tab should still not be active.
EXPECT_FALSE(rvh->is_active());
+ EXPECT_EQ(net::ERR_ABORTED, handle_observer.net_error_code());
// Navigate popup to b.com to recreate the b.com process. When creating
// opener proxies, |rvh| should be reused as a swapped out RVH. In
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/public/test/navigation_handle_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698