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

Unified Diff: chrome/browser/ui/login/login_handler_browsertest.cc

Issue 2377043002: Fix TestCancelAuth_OnNavigation for PlzNavigation (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/login/login_handler_browsertest.cc
diff --git a/chrome/browser/ui/login/login_handler_browsertest.cc b/chrome/browser/ui/login/login_handler_browsertest.cc
index 532374de43df374c944a8b01a0e451b66f0a06c4..d3e1ca5cc07fd9f8607d69f32eae961158b99615 100644
--- a/chrome/browser/ui/login/login_handler_browsertest.cc
+++ b/chrome/browser/ui/login/login_handler_browsertest.cc
@@ -361,8 +361,9 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth_OnNavigation) {
observer.Register(content::Source<NavigationController>(controller));
// One LOAD_STOP event for LoginInterstitial, second for kAuthURL and third
- // for kNoAuthURL.
- const int kLoadStopEvents = 3;
+ // for kNoAuthURL, unless PlzNavigate is active, in which case the
+ // interrupted ongoing navigation does not receive LOAD_STOP.
+ const int kLoadStopEvents = content::IsBrowserSideNavigationEnabled() ? 2 : 3;
WindowedLoadStopObserver load_stop_waiter(controller, kLoadStopEvents);
WindowedAuthNeededObserver auth_needed_waiter(controller);
browser()->OpenURL(OpenURLParams(kAuthURL, Referrer(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698