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

Unified Diff: google_apis/gaia/oauth2_mint_token_flow_unittest.cc

Issue 1239993004: Fix all failed and canceled URLRequestStatuses without errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more failures Created 5 years, 4 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: google_apis/gaia/oauth2_mint_token_flow_unittest.cc
diff --git a/google_apis/gaia/oauth2_mint_token_flow_unittest.cc b/google_apis/gaia/oauth2_mint_token_flow_unittest.cc
index 913d55535474fc8e924fe8bcd832155aac5d54e0..e9eecbca43c0c7b0b775b15e7f4a86cfcce76c7c 100644
--- a/google_apis/gaia/oauth2_mint_token_flow_unittest.cc
+++ b/google_apis/gaia/oauth2_mint_token_flow_unittest.cc
@@ -14,6 +14,7 @@
#include "google_apis/gaia/google_service_auth_error.h"
#include "google_apis/gaia/oauth2_access_token_fetcher.h"
#include "google_apis/gaia/oauth2_mint_token_flow.h"
+#include "net/base/net_errors.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_request_status.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -352,14 +353,14 @@ TEST_F(OAuth2MintTokenFlowTest, ProcessApiCallSuccess) {
TEST_F(OAuth2MintTokenFlowTest, ProcessApiCallFailure) {
{ // Null delegate should work fine.
TestURLFetcher url_fetcher(1, GURL("http://www.google.com"), NULL);
- url_fetcher.set_status(URLRequestStatus(URLRequestStatus::FAILED, 101));
+ url_fetcher.set_status(URLRequestStatus::FromError(net::ERR_FAILED));
CreateFlow(NULL, OAuth2MintTokenFlow::MODE_MINT_TOKEN_NO_FORCE, "");
flow_->ProcessApiCallFailure(&url_fetcher);
}
{ // Non-null delegate.
TestURLFetcher url_fetcher(1, GURL("http://www.google.com"), NULL);
- url_fetcher.set_status(URLRequestStatus(URLRequestStatus::FAILED, 101));
+ url_fetcher.set_status(URLRequestStatus::FromError(net::ERR_FAILED));
CreateFlow(OAuth2MintTokenFlow::MODE_MINT_TOKEN_NO_FORCE);
EXPECT_CALL(delegate_, OnMintTokenFailure(_));
flow_->ProcessApiCallFailure(&url_fetcher);
« no previous file with comments | « google_apis/gaia/oauth2_api_call_flow_unittest.cc ('k') | google_apis/gcm/engine/registration_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698