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

Unified Diff: google_apis/gaia/oauth2_api_call_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_api_call_flow_unittest.cc
diff --git a/google_apis/gaia/oauth2_api_call_flow_unittest.cc b/google_apis/gaia/oauth2_api_call_flow_unittest.cc
index d537bb7f08bb27420953f2b631e717984f9ba1e5..bf4192c19f646262bfed9e4c32baac933c07d1e2 100644
--- a/google_apis/gaia/oauth2_api_call_flow_unittest.cc
+++ b/google_apis/gaia/oauth2_api_call_flow_unittest.cc
@@ -15,6 +15,7 @@
#include "google_apis/gaia/oauth2_access_token_consumer.h"
#include "google_apis/gaia/oauth2_access_token_fetcher_impl.h"
#include "google_apis/gaia/oauth2_api_call_flow.h"
+#include "net/base/net_errors.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_status_code.h"
#include "net/url_request/test_url_fetcher_factory.h"
@@ -105,9 +106,8 @@ class OAuth2ApiCallFlowTest : public testing::Test {
const GURL& url, bool fetch_succeeds,
int response_code, const std::string& body) {
TestURLFetcher* url_fetcher = new TestURLFetcher(0, url, &flow_);
- URLRequestStatus::Status status =
- fetch_succeeds ? URLRequestStatus::SUCCESS : URLRequestStatus::FAILED;
- url_fetcher->set_status(URLRequestStatus(status, 0));
+ net::Error error = fetch_succeeds ? net::OK : net::ERR_FAILED;
+ url_fetcher->set_status(URLRequestStatus::FromError(error));
if (response_code != 0)
url_fetcher->set_response_code(response_code);
« no previous file with comments | « google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc ('k') | google_apis/gaia/oauth2_mint_token_flow_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698