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

Unified Diff: chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc

Issue 1194383003: Add a flag showing whether the current request was ignored by a handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix trybot failures (DidFailProvisionalLoad calls in unit tests) Created 5 years, 6 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: chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc
diff --git a/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc b/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc
index 0a9e3fd8c7a7f763a0fc2baae4d87361e0216a24..88e511f63ed42a2034f3b1df2a173d8067704a45 100644
--- a/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc
+++ b/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc
@@ -119,7 +119,8 @@ class CaptivePortalTabHelperTest : public ChromeRenderViewHostTestHarness {
tab_helper().DidFailProvisionalLoad(render_view_host->GetMainFrame(),
url,
net::ERR_TIMED_OUT,
- base::string16());
+ base::string16(),
+ false);
// Provisional load starts for the error page.
tab_helper().DidStartProvisionalLoadForFrame(
@@ -146,7 +147,8 @@ class CaptivePortalTabHelperTest : public ChromeRenderViewHostTestHarness {
tab_helper().DidFailProvisionalLoad(render_view_host->GetMainFrame(),
url,
net::ERR_ABORTED,
- base::string16());
+ base::string16(),
+ false);
} else {
// For interrupted provisional cross-process navigations, the
// RenderViewHost is destroyed without sending a DidFailProvisionalLoad
@@ -171,7 +173,8 @@ class CaptivePortalTabHelperTest : public ChromeRenderViewHostTestHarness {
tab_helper().DidFailProvisionalLoad(render_view_host->GetMainFrame(),
url,
net::ERR_TIMED_OUT,
- base::string16());
+ base::string16(),
+ false);
// Start event for the error page.
tab_helper().DidStartProvisionalLoadForFrame(
@@ -182,7 +185,8 @@ class CaptivePortalTabHelperTest : public ChromeRenderViewHostTestHarness {
tab_helper().DidFailProvisionalLoad(render_view_host->GetMainFrame(),
url,
net::ERR_ABORTED,
- base::string16());
+ base::string16(),
+ false);
} else {
// For interrupted provisional cross-process navigations, the
// RenderViewHost is destroyed without sending a DidFailProvisionalLoad
@@ -364,13 +368,15 @@ TEST_F(CaptivePortalTabHelperTest, UnexpectedProvisionalLoad) {
tab_helper().DidFailProvisionalLoad(main_render_frame2(),
cross_process_url,
net::ERR_FAILED,
- base::string16());
+ base::string16(),
+ false);
// The same-site navigation finally is aborted.
tab_helper().DidFailProvisionalLoad(main_render_frame1(),
same_site_url,
net::ERR_ABORTED,
- base::string16());
+ base::string16(),
+ false);
// The provisional load starts for the error page for the cross-process
// navigation.
@@ -408,7 +414,8 @@ TEST_F(CaptivePortalTabHelperTest, UnexpectedCommit) {
tab_helper().DidFailProvisionalLoad(main_render_frame2(),
cross_process_url,
net::ERR_FAILED,
- base::string16());
+ base::string16(),
+ false);
// The same-site navigation succeeds.
EXPECT_CALL(mock_reloader(), OnAbort()).Times(1);
@@ -439,17 +446,17 @@ TEST_F(CaptivePortalTabHelperTest, HttpsSubframe) {
render_frame_host_tester->AppendChild("subframe2");
tab_helper().DidStartProvisionalLoadForFrame(subframe2, url, false, false);
tab_helper().DidFailProvisionalLoad(
- subframe2, url, net::ERR_TIMED_OUT, base::string16());
+ subframe2, url, net::ERR_TIMED_OUT, base::string16(), false);
tab_helper().DidStartProvisionalLoadForFrame(subframe2, url, true, false);
tab_helper().DidFailProvisionalLoad(
- subframe2, url, net::ERR_ABORTED, base::string16());
+ subframe2, url, net::ERR_ABORTED, base::string16(), false);
// Abort.
content::RenderFrameHost* subframe3 =
render_frame_host_tester->AppendChild("subframe3");
tab_helper().DidStartProvisionalLoadForFrame(subframe3, url, false, false);
tab_helper().DidFailProvisionalLoad(
- subframe3, url, net::ERR_ABORTED, base::string16());
+ subframe3, url, net::ERR_ABORTED, base::string16(), false);
}
// Simulates a subframe erroring out at the same time as a provisional load,
@@ -471,9 +478,9 @@ TEST_F(CaptivePortalTabHelperTest, HttpsSubframeParallelError) {
// Loads return errors.
tab_helper().DidFailProvisionalLoad(
- main_render_frame1(), url, net::ERR_UNEXPECTED, base::string16());
+ main_render_frame1(), url, net::ERR_UNEXPECTED, base::string16(), false);
tab_helper().DidFailProvisionalLoad(
- subframe, url, net::ERR_TIMED_OUT, base::string16());
+ subframe, url, net::ERR_TIMED_OUT, base::string16(), false);
// Provisional load starts for the error pages.
tab_helper().DidStartProvisionalLoadForFrame(
@@ -504,7 +511,8 @@ TEST_F(CaptivePortalTabHelperTest, HttpToHttpsRedirectTimeout) {
tab_helper().DidFailProvisionalLoad(main_render_frame1(),
https_url,
net::ERR_TIMED_OUT,
- base::string16());
+ base::string16(),
+ false);
// Provisional load starts for the error page.
tab_helper().DidStartProvisionalLoadForFrame(
@@ -588,7 +596,8 @@ TEST_F(CaptivePortalTabHelperTest, OtherRenderViewHostRedirect) {
tab_helper().DidFailProvisionalLoad(main_render_frame1(),
https_url,
net::ERR_TIMED_OUT,
- base::string16());
+ base::string16(),
+ false);
// Provisional load starts for the error page.
tab_helper().DidStartProvisionalLoadForFrame(

Powered by Google App Engine
This is Rietveld 408576698