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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 7 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/captive_portal/captive_portal_tab_reloader.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/captive_portal/captive_portal_tab_reloader_unittest.cc
diff --git a/chrome/browser/captive_portal/captive_portal_tab_reloader_unittest.cc b/chrome/browser/captive_portal/captive_portal_tab_reloader_unittest.cc
index 28568269937df7530d90829cde920580af64a18c..e09242d1f551bb328cc014ac85be994197904fa2 100644
--- a/chrome/browser/captive_portal/captive_portal_tab_reloader_unittest.cc
+++ b/chrome/browser/captive_portal/captive_portal_tab_reloader_unittest.cc
@@ -135,7 +135,7 @@ TEST_F(CaptivePortalTabReloaderTest, InternetConnected) {
EXPECT_TRUE(tab_reloader().TimerRunning());
EXPECT_CALL(tab_reloader(), CheckForCaptivePortal()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(tab_reloader().TimerRunning());
EXPECT_EQ(CaptivePortalTabReloader::STATE_MAYBE_BROKEN_BY_PORTAL,
tab_reloader().state());
@@ -183,7 +183,7 @@ TEST_F(CaptivePortalTabReloaderTest, NoResponse) {
EXPECT_TRUE(tab_reloader().TimerRunning());
EXPECT_CALL(tab_reloader(), CheckForCaptivePortal()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(tab_reloader().TimerRunning());
EXPECT_EQ(CaptivePortalTabReloader::STATE_MAYBE_BROKEN_BY_PORTAL,
tab_reloader().state());
@@ -224,7 +224,7 @@ TEST_F(CaptivePortalTabReloaderTest, Login) {
tab_reloader().OnLoadStart(true);
EXPECT_CALL(tab_reloader(), CheckForCaptivePortal()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(tab_reloader().TimerRunning());
EXPECT_EQ(CaptivePortalTabReloader::STATE_MAYBE_BROKEN_BY_PORTAL,
tab_reloader().state());
@@ -250,7 +250,7 @@ TEST_F(CaptivePortalTabReloaderTest, Login) {
tab_reloader().state());
EXPECT_CALL(tab_reloader(), ReloadTab()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, tab_reloader().state());
}
@@ -260,7 +260,7 @@ TEST_F(CaptivePortalTabReloaderTest, LoginLate) {
tab_reloader().OnLoadStart(true);
EXPECT_CALL(tab_reloader(), CheckForCaptivePortal()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(tab_reloader().TimerRunning());
EXPECT_EQ(CaptivePortalTabReloader::STATE_MAYBE_BROKEN_BY_PORTAL,
tab_reloader().state());
@@ -376,7 +376,7 @@ TEST_F(CaptivePortalTabReloaderTest, SSLProtocolErrorAlreadyLoggedIn) {
// The error page commits, which should trigger a reload.
EXPECT_CALL(tab_reloader(), ReloadTab()).Times(1);
tab_reloader().OnLoadCommitted(net::ERR_SSL_PROTOCOL_ERROR);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, tab_reloader().state());
}
@@ -387,7 +387,7 @@ TEST_F(CaptivePortalTabReloaderTest, AlreadyLoggedIn) {
tab_reloader().OnLoadStart(true);
EXPECT_CALL(tab_reloader(), CheckForCaptivePortal()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(tab_reloader().TimerRunning());
EXPECT_EQ(CaptivePortalTabReloader::STATE_MAYBE_BROKEN_BY_PORTAL,
tab_reloader().state());
@@ -405,7 +405,7 @@ TEST_F(CaptivePortalTabReloaderTest, AlreadyLoggedIn) {
tab_reloader().state());
EXPECT_CALL(tab_reloader(), ReloadTab()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, tab_reloader().state());
}
@@ -429,7 +429,7 @@ TEST_F(CaptivePortalTabReloaderTest, AlreadyLoggedInBeforeTimerTriggers) {
tab_reloader().state());
EXPECT_CALL(tab_reloader(), ReloadTab()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, tab_reloader().state());
}
@@ -453,7 +453,7 @@ TEST_F(CaptivePortalTabReloaderTest, LoginWhileTimerRunning) {
tab_reloader().state());
EXPECT_CALL(tab_reloader(), ReloadTab()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, tab_reloader().state());
}
@@ -475,7 +475,7 @@ TEST_F(CaptivePortalTabReloaderTest, BehindPortalResultWhileTimerRunning) {
// The rest proceeds as normal.
EXPECT_CALL(tab_reloader(), CheckForCaptivePortal()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(CaptivePortalTabReloader::STATE_MAYBE_BROKEN_BY_PORTAL,
tab_reloader().state());
@@ -500,7 +500,7 @@ TEST_F(CaptivePortalTabReloaderTest, BehindPortalResultWhileTimerRunning) {
tab_reloader().state());
EXPECT_CALL(tab_reloader(), ReloadTab()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, tab_reloader().state());
}
@@ -559,7 +559,7 @@ TEST_F(CaptivePortalTabReloaderTest, SSLCertErrorLogin) {
TEST_F(CaptivePortalTabReloaderTest, HttpToHttpsRedirectInternetConnected) {
tab_reloader().OnLoadStart(false);
// There should be no captive portal check pending.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// HTTP to HTTPS redirect.
tab_reloader().OnRedirect(true);
@@ -568,7 +568,7 @@ TEST_F(CaptivePortalTabReloaderTest, HttpToHttpsRedirectInternetConnected) {
EXPECT_TRUE(tab_reloader().TimerRunning());
EXPECT_CALL(tab_reloader(), CheckForCaptivePortal()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(tab_reloader().TimerRunning());
EXPECT_EQ(CaptivePortalTabReloader::STATE_MAYBE_BROKEN_BY_PORTAL,
tab_reloader().state());
@@ -588,7 +588,7 @@ TEST_F(CaptivePortalTabReloaderTest, HttpToHttpsRedirectInternetConnected) {
TEST_F(CaptivePortalTabReloaderTest, HttpToHttpsRedirectLogin) {
tab_reloader().OnLoadStart(false);
// There should be no captive portal check pending.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// HTTP to HTTPS redirect.
tab_reloader().OnRedirect(true);
@@ -596,7 +596,7 @@ TEST_F(CaptivePortalTabReloaderTest, HttpToHttpsRedirectLogin) {
tab_reloader().state());
EXPECT_CALL(tab_reloader(), CheckForCaptivePortal()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(tab_reloader().TimerRunning());
EXPECT_EQ(CaptivePortalTabReloader::STATE_MAYBE_BROKEN_BY_PORTAL,
tab_reloader().state());
@@ -622,7 +622,7 @@ TEST_F(CaptivePortalTabReloaderTest, HttpToHttpsRedirectLogin) {
tab_reloader().state());
EXPECT_CALL(tab_reloader(), ReloadTab()).Times(1);
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, tab_reloader().state());
}
@@ -638,7 +638,7 @@ TEST_F(CaptivePortalTabReloaderTest, HttpsToHttpRedirect) {
EXPECT_FALSE(tab_reloader().TimerRunning());
// There should be no captive portal check pending after the redirect.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Logging in shouldn't do anything.
tab_reloader().OnCaptivePortalResults(RESULT_BEHIND_CAPTIVE_PORTAL,
@@ -657,7 +657,7 @@ TEST_F(CaptivePortalTabReloaderTest, HttpsToHttpsRedirect) {
tab_reloader().state());
EXPECT_FALSE(tab_reloader().TimerRunning());
// Nothing should happen.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
// Check that an HTTPS to HTTP to HTTPS redirect results in no timer running.
@@ -675,7 +675,7 @@ TEST_F(CaptivePortalTabReloaderTest, HttpsToHttpToHttpsRedirect) {
tab_reloader().state());
EXPECT_FALSE(tab_reloader().TimerRunning());
// Nothing should happen.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
}
// Check that an HTTP to HTTP redirect results in the timer not running.
@@ -688,7 +688,7 @@ TEST_F(CaptivePortalTabReloaderTest, HttpToHttpRedirect) {
EXPECT_FALSE(tab_reloader().TimerRunning());
// There should be no captive portal check pending after the redirect.
- MessageLoop::current()->RunUntilIdle();
+ base::MessageLoop::current()->RunUntilIdle();
// Logging in shouldn't do anything.
tab_reloader().OnCaptivePortalResults(RESULT_BEHIND_CAPTIVE_PORTAL,
« no previous file with comments | « chrome/browser/captive_portal/captive_portal_tab_reloader.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698