diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-18 20:47:27 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-18 20:47:27 +0000 |
commit | 6c0507960c2634185ed3df13f75e31ecdaceda34 (patch) | |
tree | 92fc79cf981d9be22871f49ea9efa99c101325cf /google_apis/gaia/gaia_auth_fetcher_unittest.cc | |
parent | 2b7dea8f59e2517df1cd8bfba3dd90ce260dafc3 (diff) | |
download | chromium_src-6c0507960c2634185ed3df13f75e31ecdaceda34.zip chromium_src-6c0507960c2634185ed3df13f75e31ecdaceda34.tar.gz chromium_src-6c0507960c2634185ed3df13f75e31ecdaceda34.tar.bz2 |
Fix "unreachable code" warnings (MSVC warning 4702) in google_apis/.
BUG=346399
TEST=none
R=mtomasz@chromium.org, rogerta@chromium.org
Review URL: https://codereview.chromium.org/203033002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis/gaia/gaia_auth_fetcher_unittest.cc')
-rw-r--r-- | google_apis/gaia/gaia_auth_fetcher_unittest.cc | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/google_apis/gaia/gaia_auth_fetcher_unittest.cc b/google_apis/gaia/gaia_auth_fetcher_unittest.cc index 5bced8c..9d2f60a 100644 --- a/google_apis/gaia/gaia_auth_fetcher_unittest.cc +++ b/google_apis/gaia/gaia_auth_fetcher_unittest.cc @@ -406,7 +406,7 @@ TEST_F(GaiaAuthFetcherTest, AccountDisabledError) { 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 @@ TEST_F(GaiaAuthFetcherTest,BadAuthenticationError) { 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,43 +422,11 @@ TEST_F(GaiaAuthFetcherTest,IncomprehensibleError) { 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); - 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); + GaiaAuthFetcher::GenerateAuthError(data, status); EXPECT_EQ(error.state(), GoogleServiceAuthError::SERVICE_UNAVAILABLE); } |