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

Unified Diff: google_apis/gaia/gaia_auth_fetcher_unittest.cc

Issue 203033002: Fix "unreachable code" warnings (MSVC warning 4702) in google_apis/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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 | « google_apis/gaia/gaia_auth_fetcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/gaia_auth_fetcher_unittest.cc
===================================================================
--- google_apis/gaia/gaia_auth_fetcher_unittest.cc (revision 256983)
+++ google_apis/gaia/gaia_auth_fetcher_unittest.cc (working copy)
@@ -406,7 +406,7 @@
EXPECT_EQ(error.state(), GoogleServiceAuthError::ACCOUNT_DISABLED);
}
-TEST_F(GaiaAuthFetcherTest,BadAuthenticationError) {
+TEST_F(GaiaAuthFetcherTest, BadAuthenticationError) {
net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
std::string data = "Error=BadAuthentication\n";
GoogleServiceAuthError error =
@@ -414,7 +414,7 @@
EXPECT_EQ(error.state(), GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
}
-TEST_F(GaiaAuthFetcherTest,IncomprehensibleError) {
+TEST_F(GaiaAuthFetcherTest, IncomprehensibleError) {
net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
std::string data = "Error=Gobbledygook\n";
GoogleServiceAuthError error =
@@ -422,46 +422,14 @@
EXPECT_EQ(error.state(), GoogleServiceAuthError::SERVICE_UNAVAILABLE);
}
-TEST_F(GaiaAuthFetcherTest,ServiceUnavailableError) {
+TEST_F(GaiaAuthFetcherTest, ServiceUnavailableError) {
net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
std::string data = "Error=ServiceUnavailable\n";
GoogleServiceAuthError error =
- GaiaAuthFetcher::GenerateOAuthLoginError(data, status);
+ GaiaAuthFetcher::GenerateAuthError(data, status);
EXPECT_EQ(error.state(), GoogleServiceAuthError::SERVICE_UNAVAILABLE);
}
-TEST_F(GaiaAuthFetcherTest, OAuthAccountDeletedError) {
- net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
- std::string data = "Error=adel\n";
- GoogleServiceAuthError error =
- GaiaAuthFetcher::GenerateOAuthLoginError(data, status);
- EXPECT_EQ(error.state(), GoogleServiceAuthError::ACCOUNT_DELETED);
-}
-
-TEST_F(GaiaAuthFetcherTest, OAuthAccountDisabledError) {
- net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
- std::string data = "Error=adis\n";
- GoogleServiceAuthError error =
- GaiaAuthFetcher::GenerateOAuthLoginError(data, status);
- EXPECT_EQ(error.state(), GoogleServiceAuthError::ACCOUNT_DISABLED);
-}
-
-TEST_F(GaiaAuthFetcherTest, OAuthBadAuthenticationError) {
- net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
- std::string data = "Error=badauth\n";
- GoogleServiceAuthError error =
- GaiaAuthFetcher::GenerateOAuthLoginError(data, status);
- EXPECT_EQ(error.state(), GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
-}
-
-TEST_F(GaiaAuthFetcherTest, OAuthServiceUnavailableError) {
- net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
- std::string data = "Error=ire\n";
- GoogleServiceAuthError error =
- GaiaAuthFetcher::GenerateOAuthLoginError(data, status);
- EXPECT_EQ(error.state(), GoogleServiceAuthError::SERVICE_UNAVAILABLE);
-}
-
TEST_F(GaiaAuthFetcherTest, FullLogin) {
MockGaiaConsumer consumer;
EXPECT_CALL(consumer, OnClientLoginSuccess(_))
« no previous file with comments | « google_apis/gaia/gaia_auth_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698