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

Unified Diff: content/browser/browser_side_navigation_browsertest.cc

Issue 2889703002: Ensure that all code paths which call FrameTreeNode::ResetNavigationRequest set NavigationHandle::G… (Closed)
Patch Set: remove NavigatorImpl::OnBeginNavigation since I'll remove that code in a separate cl 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/browser_side_navigation_browsertest.cc
diff --git a/content/browser/browser_side_navigation_browsertest.cc b/content/browser/browser_side_navigation_browsertest.cc
index a551d54b53d6e7384f6bd4a3e41cc113bdfab0b0..dbe2ca69b8b20d05cb6203e9696a7703f0ea9f96 100644
--- a/content/browser/browser_side_navigation_browsertest.cc
+++ b/content/browser/browser_side_navigation_browsertest.cc
@@ -18,6 +18,7 @@
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
+#include "content/public/test/navigation_handle_observer.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/shell/browser/shell.h"
#include "content/shell/browser/shell_network_delegate.h"
@@ -282,9 +283,12 @@ IN_PROC_BROWSER_TEST_F(BrowserSideNavigationBrowserTest,
content::WindowedNotificationObserver close_observer(
content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
content::Source<content::WebContents>(shell()->web_contents()));
- shell()->LoadURL(GURL("chrome://resources/css/tabs.css"));
+ GURL url("chrome://resources/css/tabs.css");
+ NavigationHandleObserver handle_observer(shell()->web_contents(), url);
+ shell()->LoadURL(url);
shell()->web_contents()->DispatchBeforeUnload();
close_observer.Wait();
+ EXPECT_EQ(net::ERR_ABORTED, handle_observer.net_error_code());
}
// Ensure that the referrer of a navigation is properly sanitized.

Powered by Google App Engine
This is Rietveld 408576698