OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |