OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/managed_mode/managed_user_refresh_token_fetcher.h" | 10 #include "chrome/browser/managed_mode/managed_user_refresh_token_fetcher.h" |
11 #include "chrome/browser/signin/oauth2_token_service.h" | 11 #include "chrome/browser/signin/oauth2_token_service.h" |
12 #include "chrome/test/base/testing_profile.h" | 12 #include "chrome/test/base/testing_profile.h" |
13 #include "content/public/test/test_browser_thread.h" | 13 #include "content/public/test/test_browser_thread.h" |
14 #include "google_apis/gaia/gaia_oauth_client.h" | 14 #include "google_apis/gaia/gaia_oauth_client.h" |
15 #include "google_apis/gaia/gaia_urls.h" | 15 #include "google_apis/gaia/gaia_urls.h" |
16 #include "google_apis/gaia/google_service_auth_error.h" | 16 #include "google_apis/gaia/google_service_auth_error.h" |
17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 | 419 |
420 TEST_F(ManagedUserRefreshTokenFetcherTest, CancelWhileFetchingRefreshToken) { | 420 TEST_F(ManagedUserRefreshTokenFetcherTest, CancelWhileFetchingRefreshToken) { |
421 StartFetching(); | 421 StartFetching(); |
422 GetOAuth2TokenServiceRequest()->Succeed(); | 422 GetOAuth2TokenServiceRequest()->Succeed(); |
423 MakeIssueTokenRequestSucceed(); | 423 MakeIssueTokenRequestSucceed(); |
424 Reset(); | 424 Reset(); |
425 | 425 |
426 EXPECT_EQ(GoogleServiceAuthError::NONE, error().state()); | 426 EXPECT_EQ(GoogleServiceAuthError::NONE, error().state()); |
427 EXPECT_EQ(std::string(), token()); | 427 EXPECT_EQ(std::string(), token()); |
428 } | 428 } |
OLD | NEW |