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

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

Issue 651433003: Change MISSING_VIA_HEADER_4XX bypasses to only last 1 second. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test case Created 6 years, 2 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
« no previous file with comments | « no previous file | components/data_reduction_proxy/common/data_reduction_proxy_headers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | components/data_reduction_proxy/common/data_reduction_proxy_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698