| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" | |
| 9 #include "chrome/browser/supervised_user/legacy/supervised_user_refresh_token_fe
tcher.h" | 8 #include "chrome/browser/supervised_user/legacy/supervised_user_refresh_token_fe
tcher.h" |
| 10 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
| 10 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" |
| 11 #include "content/public/test/test_browser_thread_bundle.h" | 11 #include "content/public/test/test_browser_thread_bundle.h" |
| 12 #include "google_apis/gaia/gaia_constants.h" | 12 #include "google_apis/gaia/gaia_constants.h" |
| 13 #include "google_apis/gaia/gaia_oauth_client.h" | 13 #include "google_apis/gaia/gaia_oauth_client.h" |
| 14 #include "google_apis/gaia/gaia_urls.h" | 14 #include "google_apis/gaia/gaia_urls.h" |
| 15 #include "google_apis/gaia/google_service_auth_error.h" | 15 #include "google_apis/gaia/google_service_auth_error.h" |
| 16 #include "google_apis/gaia/oauth2_token_service.h" | 16 #include "google_apis/gaia/oauth2_token_service.h" |
| 17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
| 18 #include "net/base/url_util.h" | 18 #include "net/base/url_util.h" |
| 19 #include "net/http/http_request_headers.h" | 19 #include "net/http/http_request_headers.h" |
| 20 #include "net/http/http_status_code.h" | 20 #include "net/http/http_status_code.h" |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 | 370 |
| 371 TEST_F(SupervisedUserRefreshTokenFetcherTest, CancelWhileFetchingRefreshToken) { | 371 TEST_F(SupervisedUserRefreshTokenFetcherTest, CancelWhileFetchingRefreshToken) { |
| 372 StartFetching(); | 372 StartFetching(); |
| 373 MakeOAuth2TokenServiceRequestSucceed(); | 373 MakeOAuth2TokenServiceRequestSucceed(); |
| 374 MakeIssueTokenRequestSucceed(); | 374 MakeIssueTokenRequestSucceed(); |
| 375 Reset(); | 375 Reset(); |
| 376 | 376 |
| 377 EXPECT_EQ(GoogleServiceAuthError::NONE, error().state()); | 377 EXPECT_EQ(GoogleServiceAuthError::NONE, error().state()); |
| 378 EXPECT_EQ(std::string(), token()); | 378 EXPECT_EQ(std::string(), token()); |
| 379 } | 379 } |
| OLD | NEW |