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

Unified Diff: google_apis/gaia/oauth2_api_call_flow_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
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 1332c97af3b1b75c89d21fa4be9e9411d2140a5d..61a704212e3b0c31fea1b8fcff3a53591466a559 100644
--- a/google_apis/gaia/oauth2_api_call_flow_unittest.cc
+++ b/google_apis/gaia/oauth2_api_call_flow_unittest.cc
@@ -19,6 +19,7 @@
#include "net/base/net_errors.h"
#include "net/http/http_request_headers.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"
@@ -63,19 +64,22 @@ class MockUrlFetcherFactory : public ScopedURLFetcherFactory,
}
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));
}
};
@@ -127,7 +131,7 @@ class OAuth2ApiCallFlowTest : public testing::Test {
EXPECT_CALL(flow_, CreateApiCallUrl()).WillOnce(Return(url));
TestURLFetcher* url_fetcher =
CreateURLFetcher(url, succeeds, status, std::string());
- 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/oauth2_access_token_fetcher_impl_unittest.cc ('k') | ios/chrome/test/app/signin_test_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698