| 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(_))
|
|
|