OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/core/browser/data_reduction_proxy_dele
gate.h" | 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_dele
gate.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 EXPECT_EQ(other_proxy_info.proxy_server(), result.proxy_server()); | 355 EXPECT_EQ(other_proxy_info.proxy_server(), result.proxy_server()); |
356 | 356 |
357 // A direct connection is used. The data reduction proxy should be used | 357 // A direct connection is used. The data reduction proxy should be used |
358 // afterwards. | 358 // afterwards. |
359 // Another proxy is used. It should be used afterwards. | 359 // Another proxy is used. It should be used afterwards. |
360 result.Use(direct_proxy_info); | 360 result.Use(direct_proxy_info); |
361 net::ProxyConfig::ID prev_id = result.config_id(); | 361 net::ProxyConfig::ID prev_id = result.config_id(); |
362 OnResolveProxyHandler(url, "GET", load_flags, data_reduction_proxy_config, | 362 OnResolveProxyHandler(url, "GET", load_flags, data_reduction_proxy_config, |
363 empty_proxy_retry_info, config(), &result); | 363 empty_proxy_retry_info, config(), &result); |
364 EXPECT_EQ(data_reduction_proxy_info.proxy_server(), result.proxy_server()); | 364 EXPECT_EQ(data_reduction_proxy_info.proxy_server(), result.proxy_server()); |
365 // Only the proxy list should be updated, not he proxy info. | 365 // Only the proxy list should be updated, not the proxy info. |
366 EXPECT_EQ(result.config_id(), prev_id); | 366 EXPECT_EQ(result.config_id(), prev_id); |
367 | 367 |
368 // A direct connection is used, but the data reduction proxy is on the retry | 368 // A direct connection is used, but the data reduction proxy is on the retry |
369 // list. A direct connection should be used afterwards. | 369 // list. A direct connection should be used afterwards. |
370 result.Use(direct_proxy_info); | 370 result.Use(direct_proxy_info); |
371 prev_id = result.config_id(); | 371 prev_id = result.config_id(); |
372 OnResolveProxyHandler(GURL("ws://echo.websocket.org/"), "GET", load_flags, | 372 OnResolveProxyHandler(GURL("ws://echo.websocket.org/"), "GET", load_flags, |
373 data_reduction_proxy_config, | 373 data_reduction_proxy_config, |
374 data_reduction_proxy_retry_info, config(), &result); | 374 data_reduction_proxy_retry_info, config(), &result); |
375 EXPECT_TRUE(result.proxy_server().is_direct()); | 375 EXPECT_TRUE(result.proxy_server().is_direct()); |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 | 605 |
606 EXPECT_EQ(request->GetTotalReceivedBytes(), | 606 EXPECT_EQ(request->GetTotalReceivedBytes(), |
607 total_received_bytes() - baseline_received_bytes); | 607 total_received_bytes() - baseline_received_bytes); |
608 EXPECT_EQ(request->GetTotalReceivedBytes(), | 608 EXPECT_EQ(request->GetTotalReceivedBytes(), |
609 total_original_received_bytes() - baseline_original_received_bytes); | 609 total_original_received_bytes() - baseline_original_received_bytes); |
610 } | 610 } |
611 | 611 |
612 } // namespace | 612 } // namespace |
613 | 613 |
614 } // namespace data_reduction_proxy | 614 } // namespace data_reduction_proxy |
OLD | NEW |