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

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

Issue 242483003: Move CaptivePortalDetector to src/components/captive_portal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move CaptivePortalDetector to a component Created 6 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
Index: chrome/browser/captive_portal/captive_portal_service_unittest.cc
diff --git a/chrome/browser/captive_portal/captive_portal_service_unittest.cc b/chrome/browser/captive_portal/captive_portal_service_unittest.cc
index f03e15552c88a9ef1725e978d486c1e1a063d7e6..6cf235b66806759638009f3bd800ea2bf30019dd 100644
--- a/chrome/browser/captive_portal/captive_portal_service_unittest.cc
+++ b/chrome/browser/captive_portal/captive_portal_service_unittest.cc
@@ -10,12 +10,12 @@
#include "base/prefs/pref_service.h"
#include "base/run_loop.h"
#include "base/test/test_timeouts.h"
-#include "chrome/browser/captive_portal/testing_utils.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "components/captive_portal/captive_portal_testing_utils.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -44,7 +44,9 @@ class CaptivePortalObserver : public content::NotificationObserver {
content::Source<Profile>(profile_));
}
- Result captive_portal_result() const { return captive_portal_result_; }
+ CaptivePortalResult captive_portal_result() const {
+ return captive_portal_result_;
+ }
int num_results_received() const { return num_results_received_; }
@@ -66,7 +68,7 @@ class CaptivePortalObserver : public content::NotificationObserver {
++num_results_received_;
}
- Result captive_portal_result_;
+ CaptivePortalResult captive_portal_result_;
int num_results_received_;
Profile* profile_;
@@ -144,7 +146,7 @@ class CaptivePortalServiceTest : public testing::Test,
//
// If |response_headers| is non-NULL, the response will use it as headers
// for the simulate URL request. It must use single linefeeds as line breaks.
- void RunTest(Result expected_result,
+ void RunTest(CaptivePortalResult expected_result,
int net_error,
int status_code,
int expected_delay_secs,
@@ -207,7 +209,9 @@ class CaptivePortalServiceTest : public testing::Test,
// Tests exponential backoff. Prior to calling, the relevant recheck settings
// must be set to have a minimum time of 100 seconds, with 2 checks before
// starting exponential backoff.
- void RunBackoffTest(Result expected_result, int net_error, int status_code) {
+ void RunBackoffTest(CaptivePortalResult expected_result,
+ int net_error,
+ int status_code) {
RunTest(expected_result, net_error, status_code, 0, NULL);
RunTest(expected_result, net_error, status_code, 0, NULL);
RunTest(expected_result, net_error, status_code, 100, NULL);

Powered by Google App Engine
This is Rietveld 408576698