| 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 { "GET", | 558 { "GET", |
| 559 "HTTP/1.1 503 Internal Server Error\r\n" | 559 "HTTP/1.1 503 Internal Server Error\r\n" |
| 560 "Server: proxy\r\n" | 560 "Server: proxy\r\n" |
| 561 "Via: 1.1 Chrome-Compression-Proxy\r\n\r\n", | 561 "Via: 1.1 Chrome-Compression-Proxy\r\n\r\n", |
| 562 true, | 562 true, |
| 563 1u, | 563 1u, |
| 564 true, | 564 true, |
| 565 0, | 565 0, |
| 566 BYPASS_EVENT_TYPE_STATUS_503_HTTP_SERVICE_UNAVAILABLE | 566 BYPASS_EVENT_TYPE_STATUS_503_HTTP_SERVICE_UNAVAILABLE |
| 567 }, | 567 }, |
| 568 // Invalid data reduction proxy 4xx response. Missing Via header. |
| 569 { "GET", |
| 570 "HTTP/1.1 404 Not Found\r\n" |
| 571 "Server: proxy\r\n\r\n", |
| 572 true, |
| 573 1u, |
| 574 true, |
| 575 1, |
| 576 BYPASS_EVENT_TYPE_MISSING_VIA_HEADER_4XX |
| 577 }, |
| 568 // Invalid data reduction proxy response. Missing Via header. | 578 // Invalid data reduction proxy response. Missing Via header. |
| 569 { "GET", | 579 { "GET", |
| 570 "HTTP/1.1 200 OK\r\n" | 580 "HTTP/1.1 200 OK\r\n" |
| 571 "Server: proxy\r\n\r\n", | 581 "Server: proxy\r\n\r\n", |
| 572 true, | 582 true, |
| 573 1u, | 583 1u, |
| 574 true, | 584 true, |
| 575 0, | 585 0, |
| 576 BYPASS_EVENT_TYPE_MISSING_VIA_HEADER_OTHER | 586 BYPASS_EVENT_TYPE_MISSING_VIA_HEADER_OTHER |
| 577 }, | 587 }, |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 &other_proxy_info); | 957 &other_proxy_info); |
| 948 EXPECT_FALSE(other_proxy_info.is_direct()); | 958 EXPECT_FALSE(other_proxy_info.is_direct()); |
| 949 | 959 |
| 950 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, | 960 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, |
| 951 empty_proxy_retry_info, &test_params, | 961 empty_proxy_retry_info, &test_params, |
| 952 &data_reduction_proxy_info); | 962 &data_reduction_proxy_info); |
| 953 EXPECT_TRUE(data_reduction_proxy_info.is_direct()); | 963 EXPECT_TRUE(data_reduction_proxy_info.is_direct()); |
| 954 } | 964 } |
| 955 | 965 |
| 956 } // namespace data_reduction_proxy | 966 } // namespace data_reduction_proxy |
| OLD | NEW |