| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // A complete set of unit tests for GaiaAuthFetcher. | 5 // A complete set of unit tests for GaiaAuthFetcher. |
| 6 // Originally ported from GoogleAuthenticator tests. | 6 // Originally ported from GoogleAuthenticator tests. |
| 7 | 7 |
| 8 #include "chrome/common/net/gaia/gaia_auth_fetcher_unittest.h" | 8 #include "chrome/common/net/gaia/gaia_auth_fetcher_unittest.h" |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
| 13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
| 14 #include "chrome/common/net/gaia/gaia_auth_consumer.h" | 14 #include "chrome/common/net/gaia/gaia_auth_consumer.h" |
| 15 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" | 15 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" |
| 16 #include "chrome/common/net/gaia/gaia_urls.h" | 16 #include "chrome/common/net/gaia/gaia_urls.h" |
| 17 #include "chrome/common/net/gaia/google_service_auth_error.h" | 17 #include "chrome/common/net/gaia/google_service_auth_error.h" |
| 18 #include "chrome/common/net/http_return.h" | 18 #include "chrome/common/net/http_return.h" |
| 19 #include "chrome/test/base/testing_browser_process_test.h" |
| 19 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
| 20 #include "chrome/test/testing_browser_process_test.h" | |
| 21 #include "content/common/url_fetcher.h" | 21 #include "content/common/url_fetcher.h" |
| 22 #include "content/test/test_url_fetcher_factory.h" | 22 #include "content/test/test_url_fetcher_factory.h" |
| 23 #include "googleurl/src/gurl.h" | 23 #include "googleurl/src/gurl.h" |
| 24 #include "net/base/net_errors.h" | 24 #include "net/base/net_errors.h" |
| 25 #include "net/url_request/url_request_status.h" | 25 #include "net/url_request/url_request_status.h" |
| 26 #include "testing/gmock/include/gmock/gmock.h" | 26 #include "testing/gmock/include/gmock/gmock.h" |
| 27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
| 28 | 28 |
| 29 using ::testing::_; | 29 using ::testing::_; |
| 30 | 30 |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 EXPECT_TRUE(auth.HasPendingFetch()); | 585 EXPECT_TRUE(auth.HasPendingFetch()); |
| 586 auth.OnURLFetchComplete( | 586 auth.OnURLFetchComplete( |
| 587 NULL, | 587 NULL, |
| 588 token_auth_source_, | 588 token_auth_source_, |
| 589 net::URLRequestStatus(net::URLRequestStatus::FAILED, 0), | 589 net::URLRequestStatus(net::URLRequestStatus::FAILED, 0), |
| 590 RC_REQUEST_OK, | 590 RC_REQUEST_OK, |
| 591 cookies_, | 591 cookies_, |
| 592 ""); | 592 ""); |
| 593 EXPECT_FALSE(auth.HasPendingFetch()); | 593 EXPECT_FALSE(auth.HasPendingFetch()); |
| 594 } | 594 } |
| OLD | NEW |