Index: google_apis/gaia/gaia_auth_fetcher_unittest.cc |
diff --git a/google_apis/gaia/gaia_auth_fetcher_unittest.cc b/google_apis/gaia/gaia_auth_fetcher_unittest.cc |
index 9d2f60aa5f05e384b8b3bcd3f021f584c126d032..af235dfd1b963c2f653207cdf92ce161845c4a03 100644 |
--- a/google_apis/gaia/gaia_auth_fetcher_unittest.cc |
+++ b/google_apis/gaia/gaia_auth_fetcher_unittest.cc |
@@ -175,8 +175,6 @@ class MockGaiaConsumer : public GaiaAuthConsumer { |
const std::string& token)); |
MOCK_METHOD1(OnClientOAuthSuccess, |
void(const GaiaAuthConsumer::ClientOAuthResult& result)); |
- MOCK_METHOD1(OnClientOAuthCodeSuccess, |
- void(const std::string& result)); |
MOCK_METHOD1(OnMergeSessionSuccess, void(const std::string& data)); |
MOCK_METHOD1(OnUberAuthTokenSuccess, void(const std::string& data)); |
MOCK_METHOD1(OnClientLoginFailure, |
@@ -185,8 +183,6 @@ class MockGaiaConsumer : public GaiaAuthConsumer { |
const GoogleServiceAuthError& error)); |
MOCK_METHOD1(OnClientOAuthFailure, |
void(const GoogleServiceAuthError& error)); |
- MOCK_METHOD1(OnClientOAuthCodeFailure, |
- void(const GoogleServiceAuthError& error)); |
MOCK_METHOD1(OnMergeSessionFailure, void( |
const GoogleServiceAuthError& error)); |
MOCK_METHOD1(OnUberAuthTokenFailure, void( |
@@ -632,54 +628,6 @@ TEST_F(GaiaAuthFetcherTest, OAuthLoginTokenOAuth2TokenPairFailure) { |
EXPECT_FALSE(auth.HasPendingFetch()); |
} |
-TEST_F(GaiaAuthFetcherTest, OAuthCodeWithCookiesSuccess) { |
- MockGaiaConsumer consumer; |
- EXPECT_CALL(consumer, OnClientOAuthCodeSuccess("test-code")).Times(1); |
- |
- net::TestURLFetcherFactory factory; |
- GaiaAuthFetcher auth(&consumer, std::string(), GetRequestContext()); |
- auth.StartCookieForOAuthCodeExchange(""); |
- |
- net::TestURLFetcher* fetcher = factory.GetFetcherByID(0); |
- EXPECT_TRUE(NULL != fetcher); |
- EXPECT_EQ(net::LOAD_NORMAL, fetcher->GetLoadFlags()); |
- EXPECT_TRUE(auth.HasPendingFetch()); |
- |
- net::ResponseCookies cookies; |
- cookies.push_back(kGetAuthCodeValidCookie); |
- MockFetcher mock_fetcher( |
- client_login_to_oauth2_source_, |
- net::URLRequestStatus(net::URLRequestStatus::SUCCESS, 0), |
- net::HTTP_OK, |
- cookies, |
- std::string(), |
- net::URLFetcher::POST, |
- &auth); |
- auth.OnURLFetchComplete(&mock_fetcher); |
- EXPECT_FALSE(auth.HasPendingFetch()); |
-} |
- |
-TEST_F(GaiaAuthFetcherTest, OAuthCodeWithCookiesFailure) { |
- MockGaiaConsumer consumer; |
- EXPECT_CALL(consumer, OnClientOAuthCodeFailure(_)).Times(1); |
- |
- GaiaAuthFetcher auth(&consumer, std::string(), GetRequestContext()); |
- auth.StartCookieForOAuthCodeExchange(""); |
- |
- EXPECT_TRUE(auth.HasPendingFetch()); |
- net::ResponseCookies cookies; |
- MockFetcher mock_fetcher( |
- client_login_to_oauth2_source_, |
- net::URLRequestStatus(net::URLRequestStatus::SUCCESS, 0), |
- net::HTTP_FORBIDDEN, |
- cookies, |
- std::string(), |
- net::URLFetcher::POST, |
- &auth); |
- auth.OnURLFetchComplete(&mock_fetcher); |
- EXPECT_FALSE(auth.HasPendingFetch()); |
-} |
- |
TEST_F(GaiaAuthFetcherTest, MergeSessionSuccess) { |
MockGaiaConsumer consumer; |
EXPECT_CALL(consumer, OnMergeSessionSuccess("<html></html>")) |