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

Unified Diff: chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc

Issue 2845053002: Avoid showing the supervised user block interstitial more than once (Closed)
Patch Set: comment Created 3 years, 8 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 | « chrome/browser/supervised_user/supervised_user_navigation_observer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc
diff --git a/chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc b/chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc
index 7a39687a71ed7ccf78c9a179fdcda989eed7c9f4..179b75a6f5e3323afa64d54d91966bd069496c2f 100644
--- a/chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc
+++ b/chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc
@@ -73,8 +73,8 @@ void SupervisedUserNavigationThrottleTest::SetUpCommandLine(
command_line->AppendSwitchASCII(switches::kSupervisedUserId, "asdf");
}
-// Tests that showing the blocking interstitial for a WebContents without a
-// SupervisedUserNavigationObserver doesn't crash.
+// Tests that navigating to a blocked page simply fails if there is no
+// SupervisedUserNavigationObserver.
IN_PROC_BROWSER_TEST_F(SupervisedUserNavigationThrottleTest,
NoNavigationObserverBlock) {
Profile* profile = browser()->profile();
@@ -94,7 +94,8 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserNavigationThrottleTest,
observer.Wait();
content::NavigationEntry* entry = controller.GetActiveEntry();
ASSERT_TRUE(entry);
- EXPECT_EQ(content::PAGE_TYPE_INTERSTITIAL, entry->GetPageType());
+ EXPECT_EQ(content::PAGE_TYPE_NORMAL, entry->GetPageType());
+ EXPECT_FALSE(observer.last_navigation_succeeded());
}
IN_PROC_BROWSER_TEST_F(SupervisedUserNavigationThrottleTest,
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_navigation_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698