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

Unified Diff: google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc

Issue 2890293005: Network traffic annotation stored in url_request. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « google_apis/gaia/mock_url_fetcher_factory.h ('k') | google_apis/gaia/oauth2_api_call_flow_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc
diff --git a/google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc b/google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc
index f62cf6be9ceedc14f3a52d989982b6abf9ea684d..650ade609d52d330acb6a4ea915e4088331f6a4f 100644
--- a/google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc
+++ b/google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc
@@ -18,6 +18,7 @@
#include "google_apis/gaia/oauth2_access_token_consumer.h"
#include "net/base/net_errors.h"
#include "net/http/http_status_code.h"
+#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_delegate.h"
@@ -65,19 +66,22 @@ class MockUrlFetcherFactory : public ScopedURLFetcherFactory,
MockUrlFetcherFactory() : ScopedURLFetcherFactory(this) {}
virtual ~MockUrlFetcherFactory() {}
- MOCK_METHOD4(CreateURLFetcherMock,
- URLFetcher*(int id,
- const GURL& url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d));
+ MOCK_METHOD5(
+ CreateURLFetcherMock,
+ URLFetcher*(int id,
+ const GURL& url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d,
+ net::NetworkTrafficAnnotationTag traffic_annotation));
std::unique_ptr<URLFetcher> CreateURLFetcher(
int id,
const GURL& url,
URLFetcher::RequestType request_type,
- URLFetcherDelegate* d) override {
+ URLFetcherDelegate* d,
+ net::NetworkTrafficAnnotationTag traffic_annotation) override {
return std::unique_ptr<URLFetcher>(
- CreateURLFetcherMock(id, url, request_type, d));
+ CreateURLFetcherMock(id, url, request_type, d, traffic_annotation));
}
};
@@ -119,7 +123,7 @@ class OAuth2AccessTokenFetcherImplTest : public testing::Test {
if (!body.empty())
url_fetcher->SetResponseString(body);
- EXPECT_CALL(factory_, CreateURLFetcherMock(_, url, _, _))
+ EXPECT_CALL(factory_, CreateURLFetcherMock(_, url, _, _, _))
.WillOnce(Return(url_fetcher));
return url_fetcher;
}
« no previous file with comments | « google_apis/gaia/mock_url_fetcher_factory.h ('k') | google_apis/gaia/oauth2_api_call_flow_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698