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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc

Issue 959913002: Create fluent Builder for DataReductionProxyTestContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sclittle CR comments + 1 unittest cleanup Created 5 years, 10 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: components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
index e386b511cfb08c0867b6681656f291cfd942bf72..1e0c25fb6f2b184f411234fdc69893db3d4c541c 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
@@ -182,13 +182,15 @@ class DataReductionProxyInterceptorWithServerTest : public testing::Test {
ASSERT_TRUE(proxy_.InitializeAndWaitUntilReady());
ASSERT_TRUE(direct_.InitializeAndWaitUntilReady());
- test_context_.reset(new DataReductionProxyTestContext(
- DataReductionProxyParams::kAllowed,
- TestDataReductionProxyParams::HAS_EVERYTHING &
- ~TestDataReductionProxyParams::HAS_DEV_ORIGIN &
- ~TestDataReductionProxyParams::HAS_DEV_FALLBACK_ORIGIN,
- DataReductionProxyTestContext::DEFAULT_TEST_CONTEXT_OPTIONS,
- &context_));
+ test_context_ =
+ DataReductionProxyTestContext::Builder()
+ .WithParamsFlags(DataReductionProxyParams::kAllowed)
+ .WithParamsDefinitions(
+ TestDataReductionProxyParams::HAS_EVERYTHING &
+ ~TestDataReductionProxyParams::HAS_DEV_ORIGIN &
+ ~TestDataReductionProxyParams::HAS_DEV_FALLBACK_ORIGIN)
+ .WithURLRequestContext(&context_)
+ .Build();
std::string spec;
base::TrimString(proxy_.GetURL("/").spec(), "/", &spec);
test_context_->config()->test_params()->set_origin(

Powered by Google App Engine
This is Rietveld 408576698