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

Side by Side Diff: components/data_reduction_proxy/browser/data_reduction_proxy_protocol_unittest.cc

Issue 382313003: Add data reduction functionality to all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove incorrect DCHECK from drp_statistics_prefs.cc Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol. h" 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol. h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 EXPECT_FALSE(data_reduction_proxy_info.is_direct()); 883 EXPECT_FALSE(data_reduction_proxy_info.is_direct());
884 884
885 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, 885 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
886 empty_proxy_retry_info, &test_params, 886 empty_proxy_retry_info, &test_params,
887 &other_proxy_info); 887 &other_proxy_info);
888 EXPECT_FALSE(other_proxy_info.is_direct()); 888 EXPECT_FALSE(other_proxy_info.is_direct());
889 889
890 // With Finch trial set, should only bypass if LOAD flag is set and the 890 // With Finch trial set, should only bypass if LOAD flag is set and the
891 // effective proxy is the data compression proxy. 891 // effective proxy is the data compression proxy.
892 base::FieldTrialList field_trial_list(new BadEntropyProvider()); 892 base::FieldTrialList field_trial_list(new BadEntropyProvider());
893 base::FieldTrialList::CreateFieldTrial("DataCompressionProxyRollout",
894 "Enabled");
895 base::FieldTrialList::CreateFieldTrial("DataCompressionProxyCriticalBypass", 893 base::FieldTrialList::CreateFieldTrial("DataCompressionProxyCriticalBypass",
896 "Enabled"); 894 "Enabled");
897 EXPECT_TRUE( 895 EXPECT_TRUE(
898 DataReductionProxyParams::IsIncludedInCriticalPathBypassFieldTrial()); 896 DataReductionProxyParams::IsIncludedInCriticalPathBypassFieldTrial());
899 897
900 load_flags = net::LOAD_NORMAL; 898 load_flags = net::LOAD_NORMAL;
901 899
902 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, 900 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
903 empty_proxy_retry_info, &test_params, 901 empty_proxy_retry_info, &test_params,
904 &data_reduction_proxy_info); 902 &data_reduction_proxy_info);
(...skipping 11 matching lines...) Expand all
916 &other_proxy_info); 914 &other_proxy_info);
917 EXPECT_FALSE(other_proxy_info.is_direct()); 915 EXPECT_FALSE(other_proxy_info.is_direct());
918 916
919 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, 917 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
920 empty_proxy_retry_info, &test_params, 918 empty_proxy_retry_info, &test_params,
921 &data_reduction_proxy_info); 919 &data_reduction_proxy_info);
922 EXPECT_TRUE(data_reduction_proxy_info.is_direct()); 920 EXPECT_TRUE(data_reduction_proxy_info.is_direct());
923 } 921 }
924 922
925 } // namespace data_reduction_proxy 923 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698