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_params.h" | 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 net::HostPortPair::FromURL(GURL( | 570 net::HostPortPair::FromURL(GURL( |
571 TestDataReductionProxyParams::DefaultDevFallbackOrigin())), | 571 TestDataReductionProxyParams::DefaultDevFallbackOrigin())), |
572 false, | 572 false, |
573 false, | 573 false, |
574 false | 574 false |
575 }, | 575 }, |
576 { net::HostPortPair::FromURL(GURL( | 576 { net::HostPortPair::FromURL(GURL( |
577 TestDataReductionProxyParams::DefaultOrigin())), | 577 TestDataReductionProxyParams::DefaultOrigin())), |
578 true, | 578 true, |
579 true, | 579 true, |
580 true, | 580 false, |
581 net::HostPortPair::FromURL(GURL( | 581 net::HostPortPair::FromURL(GURL()), |
582 TestDataReductionProxyParams::DefaultOrigin())), | 582 net::HostPortPair::FromURL(GURL()), |
583 net::HostPortPair::FromURL(GURL( | |
584 TestDataReductionProxyParams::DefaultDevFallbackOrigin())), | |
585 false, | 583 false, |
586 false, | 584 false, |
587 false | 585 false |
588 }, | 586 }, |
589 }; | 587 }; |
590 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { | 588 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { |
591 int flags = DataReductionProxyParams::kAllowed | | 589 int flags = DataReductionProxyParams::kAllowed | |
592 DataReductionProxyParams::kAlternativeAllowed; | 590 DataReductionProxyParams::kAlternativeAllowed; |
593 if (tests[i].fallback_allowed) | 591 if (tests[i].fallback_allowed) |
594 flags |= DataReductionProxyParams::kFallbackAllowed; | 592 flags |= DataReductionProxyParams::kFallbackAllowed; |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 retry_map[ssl_origin] = retry_info; | 993 retry_map[ssl_origin] = retry_info; |
996 | 994 |
997 bool was_bypassed = params.AreProxiesBypassed(retry_map, | 995 bool was_bypassed = params.AreProxiesBypassed(retry_map, |
998 tests[i].is_https, | 996 tests[i].is_https, |
999 NULL); | 997 NULL); |
1000 | 998 |
1001 EXPECT_EQ(tests[i].expected_result, was_bypassed); | 999 EXPECT_EQ(tests[i].expected_result, was_bypassed); |
1002 } | 1000 } |
1003 } | 1001 } |
1004 } // namespace data_reduction_proxy | 1002 } // namespace data_reduction_proxy |
OLD | NEW |