Index: content/browser/cross_site_transfer_browsertest.cc |
diff --git a/content/browser/cross_site_transfer_browsertest.cc b/content/browser/cross_site_transfer_browsertest.cc |
index 97cd504309da4332e960679322ff9fdc1d88cf5d..601909e0dc2ac1c70cd7a71f8744f5a47eee6428 100644 |
--- a/content/browser/cross_site_transfer_browsertest.cc |
+++ b/content/browser/cross_site_transfer_browsertest.cc |
@@ -14,6 +14,7 @@ |
#include "content/browser/child_process_security_policy_impl.h" |
#include "content/browser/loader/resource_dispatcher_host_impl.h" |
#include "content/public/browser/navigation_entry.h" |
+#include "content/public/browser/navigation_handle.h" |
#include "content/public/browser/render_process_host.h" |
#include "content/public/browser/resource_dispatcher_host_delegate.h" |
#include "content/public/browser/resource_throttle.h" |
@@ -22,6 +23,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_content_browser_client.h" |
@@ -428,6 +430,7 @@ IN_PROC_BROWSER_TEST_P(CrossSiteTransferTest, NoLeakOnCrossSiteCancel) { |
// request for url2. |
tracking_delegate().SetTrackedURL(url2); |
+ NavigationHandleObserver handle_observer(shell()->web_contents(), url2); |
// Don't wait for the navigation to complete, since that never happens in |
// this case. |
NavigateToURLContentInitiated(shell(), url2, false, false); |
@@ -440,6 +443,7 @@ IN_PROC_BROWSER_TEST_P(CrossSiteTransferTest, NoLeakOnCrossSiteCancel) { |
// Make sure the request for url2 did not complete. |
EXPECT_FALSE(tracking_delegate().WaitForTrackedURLAndGetCompleted()); |
+ EXPECT_EQ(net::ERR_ABORTED, handle_observer.net_error_code()); |
shell()->web_contents()->SetDelegate(old_delegate); |
} |