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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 2956023003: Add enable_reporting to fix size regression in Cronet. (Closed)
Patch Set: Created 3 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: net/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 055f081025411808e116746c10dbe07e872fd16e..bba9d84ceba49e3c4f8c5ceb8f4b39226818ff85 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -93,7 +93,6 @@
#include "net/proxy/proxy_service.h"
#include "net/quic/chromium/mock_crypto_client_stream_factory.h"
#include "net/quic/chromium/quic_server_info.h"
-#include "net/reporting/reporting_service.h"
#include "net/socket/socket_test_util.h"
#include "net/socket/ssl_client_socket.h"
#include "net/ssl/channel_id_service.h"
@@ -141,6 +140,10 @@
#include "base/win/scoped_comptr.h"
#endif
+#if BUILDFLAG(ENABLE_REPORTING)
+#include "net/reporting/reporting_service.h"
+#endif // BUILDFLAG(ENABLE_REPORTING)
+
using net::test::IsError;
using net::test::IsOk;
@@ -6799,7 +6802,9 @@ TEST_F(URLRequestTestHTTP, ExpectCTHeader) {
EXPECT_EQ(1u, reporter.num_failures());
}
+#endif // !defined(OS_IOS)
+#if BUILDFLAG(ENABLE_REPORTING)
namespace {
class TestReportingService : public ReportingService {
@@ -6936,8 +6941,7 @@ TEST_F(URLRequestTestHTTP, DontProcessReportToHeaderInvalidHTTPS) {
EXPECT_TRUE(IsCertStatusError(request->ssl_info().cert_status));
EXPECT_TRUE(reporting_service.headers().empty());
}
-
-#endif // !defined(OS_IOS)
+#endif // BUILDFLAG(ENABLE_REPORTING)
TEST_F(URLRequestTestHTTP, ContentTypeNormalizationTest) {
ASSERT_TRUE(http_test_server()->Start());
« net/url_request/url_request_context_builder.h ('K') | « net/url_request/url_request_http_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698