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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 EXPECT_FALSE(data_reduction_proxy_info.is_direct()); | 879 EXPECT_FALSE(data_reduction_proxy_info.is_direct()); |
880 | 880 |
881 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, | 881 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, |
882 empty_proxy_retry_info, &test_params, | 882 empty_proxy_retry_info, &test_params, |
883 &other_proxy_info); | 883 &other_proxy_info); |
884 EXPECT_FALSE(other_proxy_info.is_direct()); | 884 EXPECT_FALSE(other_proxy_info.is_direct()); |
885 | 885 |
886 // With Finch trial set, should only bypass if LOAD flag is set and the | 886 // With Finch trial set, should only bypass if LOAD flag is set and the |
887 // effective proxy is the data compression proxy. | 887 // effective proxy is the data compression proxy. |
888 base::FieldTrialList field_trial_list(new BadEntropyProvider()); | 888 base::FieldTrialList field_trial_list(new BadEntropyProvider()); |
889 base::FieldTrialList::CreateFieldTrial("DataCompressionProxyRollout", | |
890 "Enabled"); | |
891 base::FieldTrialList::CreateFieldTrial("DataCompressionProxyCriticalBypass", | 889 base::FieldTrialList::CreateFieldTrial("DataCompressionProxyCriticalBypass", |
892 "Enabled"); | 890 "Enabled"); |
893 EXPECT_TRUE( | 891 EXPECT_TRUE( |
894 DataReductionProxyParams::IsIncludedInCriticalPathBypassFieldTrial()); | 892 DataReductionProxyParams::IsIncludedInCriticalPathBypassFieldTrial()); |
895 | 893 |
896 load_flags = net::LOAD_NORMAL; | 894 load_flags = net::LOAD_NORMAL; |
897 | 895 |
898 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, | 896 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, |
899 empty_proxy_retry_info, &test_params, | 897 empty_proxy_retry_info, &test_params, |
900 &data_reduction_proxy_info); | 898 &data_reduction_proxy_info); |
(...skipping 11 matching lines...) Expand all Loading... |
912 &other_proxy_info); | 910 &other_proxy_info); |
913 EXPECT_FALSE(other_proxy_info.is_direct()); | 911 EXPECT_FALSE(other_proxy_info.is_direct()); |
914 | 912 |
915 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, | 913 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, |
916 empty_proxy_retry_info, &test_params, | 914 empty_proxy_retry_info, &test_params, |
917 &data_reduction_proxy_info); | 915 &data_reduction_proxy_info); |
918 EXPECT_TRUE(data_reduction_proxy_info.is_direct()); | 916 EXPECT_TRUE(data_reduction_proxy_info.is_direct()); |
919 } | 917 } |
920 | 918 |
921 } // namespace data_reduction_proxy | 919 } // namespace data_reduction_proxy |
OLD | NEW |