Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3603)

Unified Diff: chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc

Issue 10581012: Move test_url_fetcher_factory.* from content/ to net/url_request (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove export annotations Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
diff --git a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
index 10d8774737e7c01bade3898ddc78b5fcd6311fef..22290571c61d9a1ef94ed3afdee585f3d1f2354c 100644
--- a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
+++ b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
@@ -17,11 +17,11 @@
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "chrome/common/net/gaia/mock_url_fetcher_factory.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/public/test/test_url_fetcher_factory.h"
#include "googleurl/src/gurl.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/http/http_status_code.h"
+#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "net/url_request/url_request_status.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -531,7 +531,7 @@ TEST_F(GaiaAuthFetcherTest, ClientFetchPending) {
EXPECT_CALL(consumer, OnClientLoginSuccess(_))
.Times(1);
- TestURLFetcherFactory factory;
+ net::TestURLFetcherFactory factory;
GaiaAuthFetcher auth(&consumer, std::string(),
profile_.GetRequestContext());
@@ -557,7 +557,7 @@ TEST_F(GaiaAuthFetcherTest, FullTokenSuccess) {
EXPECT_CALL(consumer, OnIssueAuthTokenSuccess("service", "token"))
.Times(1);
- TestURLFetcherFactory factory;
+ net::TestURLFetcherFactory factory;
GaiaAuthFetcher auth(&consumer, std::string(),
profile_.GetRequestContext());
auth.StartIssueAuthToken("sid", "lsid", "service");
@@ -577,7 +577,7 @@ TEST_F(GaiaAuthFetcherTest, FullTokenFailure) {
EXPECT_CALL(consumer, OnIssueAuthTokenFailure("service", _))
.Times(1);
- TestURLFetcherFactory factory;
+ net::TestURLFetcherFactory factory;
GaiaAuthFetcher auth(&consumer, std::string(),
profile_.GetRequestContext());
@@ -597,11 +597,11 @@ TEST_F(GaiaAuthFetcherTest, OAuthLoginTokenSuccess) {
EXPECT_CALL(consumer, OnClientOAuthSuccess(
GaiaAuthConsumer::ClientOAuthResult("rt1", "at1", 3600))).Times(1);
- TestURLFetcherFactory factory;
+ net::TestURLFetcherFactory factory;
GaiaAuthFetcher auth(&consumer, std::string(),
profile_.GetRequestContext());
auth.StartLsoForOAuthLoginTokenExchange("lso_token");
- TestURLFetcher* fetcher = factory.GetFetcherByID(0);
+ net::TestURLFetcher* fetcher = factory.GetFetcherByID(0);
EXPECT_TRUE(NULL != fetcher);
EXPECT_EQ(net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES,
fetcher->GetLoadFlags());
@@ -627,11 +627,11 @@ TEST_F(GaiaAuthFetcherTest, OAuthLoginTokenSuccess) {
TEST_F(GaiaAuthFetcherTest, OAuthLoginTokenWithCookies) {
MockGaiaConsumer consumer;
- TestURLFetcherFactory factory;
+ net::TestURLFetcherFactory factory;
GaiaAuthFetcher auth(&consumer, std::string(),
profile_.GetRequestContext());
auth.StartCookieForOAuthLoginTokenExchange("0");
- TestURLFetcher* fetcher = factory.GetFetcherByID(0);
+ net::TestURLFetcher* fetcher = factory.GetFetcherByID(0);
EXPECT_TRUE(NULL != fetcher);
EXPECT_EQ(net::LOAD_NORMAL, fetcher->GetLoadFlags());
}
@@ -641,7 +641,7 @@ TEST_F(GaiaAuthFetcherTest, OAuthLoginTokenClientLoginToOAuth2Failure) {
EXPECT_CALL(consumer, OnClientOAuthFailure(_))
.Times(1);
- TestURLFetcherFactory factory;
+ net::TestURLFetcherFactory factory;
GaiaAuthFetcher auth(&consumer, std::string(),
profile_.GetRequestContext());
auth.StartLsoForOAuthLoginTokenExchange("lso_token");
@@ -662,7 +662,7 @@ TEST_F(GaiaAuthFetcherTest, OAuthLoginTokenOAuth2TokenPairFailure) {
EXPECT_CALL(consumer, OnClientOAuthFailure(_))
.Times(1);
- TestURLFetcherFactory factory;
+ net::TestURLFetcherFactory factory;
GaiaAuthFetcher auth(&consumer, std::string(),
profile_.GetRequestContext());
auth.StartLsoForOAuthLoginTokenExchange("lso_token");
@@ -691,7 +691,7 @@ TEST_F(GaiaAuthFetcherTest, MergeSessionSuccess) {
EXPECT_CALL(consumer, OnMergeSessionSuccess("<html></html>"))
.Times(1);
- TestURLFetcherFactory factory;
+ net::TestURLFetcherFactory factory;
GaiaAuthFetcher auth(&consumer, std::string(),
profile_.GetRequestContext());
@@ -712,7 +712,7 @@ TEST_F(GaiaAuthFetcherTest, MergeSessionSuccessRedirect) {
EXPECT_CALL(consumer, OnMergeSessionSuccess("<html></html>"))
.Times(1);
- TestURLFetcherFactory factory;
+ net::TestURLFetcherFactory factory;
GaiaAuthFetcher auth(&consumer, std::string(),
profile_.GetRequestContext());
@@ -720,7 +720,7 @@ TEST_F(GaiaAuthFetcherTest, MergeSessionSuccessRedirect) {
// Make sure the fetcher created has the expected flags. Set its url()
// properties to reflect a redirect.
- TestURLFetcher* test_fetcher = factory.GetFetcherByID(0);
+ net::TestURLFetcher* test_fetcher = factory.GetFetcherByID(0);
EXPECT_TRUE(test_fetcher != NULL);
EXPECT_TRUE(test_fetcher->GetLoadFlags() == net::LOAD_NORMAL);
EXPECT_TRUE(auth.HasPendingFetch());
@@ -742,7 +742,7 @@ TEST_F(GaiaAuthFetcherTest, UberAuthTokenSuccess) {
EXPECT_CALL(consumer, OnUberAuthTokenSuccess("uberToken"))
.Times(1);
- TestURLFetcherFactory factory;
+ net::TestURLFetcherFactory factory;
GaiaAuthFetcher auth(&consumer, std::string(),
profile_.GetRequestContext());
« no previous file with comments | « chrome/browser/web_resource/promo_resource_service_unittest.cc ('k') | chrome/common/net/gaia/gaia_oauth_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698