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

Unified Diff: chrome/browser/chromeos/net/network_portal_detector_unittest.cc

Issue 12263006: Fixed portal detector behaviour for proxied network. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/chromeos/net/network_portal_detector.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/net/network_portal_detector_unittest.cc
diff --git a/chrome/browser/chromeos/net/network_portal_detector_unittest.cc b/chrome/browser/chromeos/net/network_portal_detector_unittest.cc
index 25af6dfd67d327a587351cc4aa35be6edbccdc41..846a5dca79b4a1d77f88722bf100357b65e54989 100644
--- a/chrome/browser/chromeos/net/network_portal_detector_unittest.cc
+++ b/chrome/browser/chromeos/net/network_portal_detector_unittest.cc
@@ -412,10 +412,29 @@ TEST_F(NetworkPortalDetectorTest, AllAttemptsFailed) {
TEST_F(NetworkPortalDetectorTest, ProxyAuthRequired) {
ASSERT_TRUE(is_state_idle());
+ set_min_time_between_attempts(base::TimeDelta());
SetConnected(wifi1_network());
CompleteURLFetch(net::OK, 407, NULL);
+ ASSERT_EQ(1, attempt_count());
+ ASSERT_TRUE(is_state_portal_detection_pending());
+ CheckPortalState(NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_UNKNOWN, -1,
+ wifi1_network());
+ // To run CaptivePortalDetector::DetectCaptivePortal().
+ MessageLoop::current()->RunUntilIdle();
+
+ CompleteURLFetch(net::OK, 407, NULL);
+ ASSERT_EQ(2, attempt_count());
+ ASSERT_TRUE(is_state_portal_detection_pending());
+ CheckPortalState(NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_UNKNOWN, -1,
+ wifi1_network());
+
+ // To run CaptivePortalDetector::DetectCaptivePortal().
+ MessageLoop::current()->RunUntilIdle();
+
+ CompleteURLFetch(net::OK, 407, NULL);
+ ASSERT_EQ(3, attempt_count());
ASSERT_TRUE(is_state_idle());
CheckPortalState(
NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PROXY_AUTH_REQUIRED, 407,
« no previous file with comments | « chrome/browser/chromeos/net/network_portal_detector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698