| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shlobj.h> | 9 #include <shlobj.h> |
| 10 #endif | 10 #endif |
| (...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1704 EXPECT_EQ(job_load_timing.connect_timing.ssl_end, | 1704 EXPECT_EQ(job_load_timing.connect_timing.ssl_end, |
| 1705 load_timing_result.connect_timing.ssl_end); | 1705 load_timing_result.connect_timing.ssl_end); |
| 1706 | 1706 |
| 1707 // Redundant sanity check. | 1707 // Redundant sanity check. |
| 1708 TestLoadTimingNotReusedWithProxy(load_timing_result, | 1708 TestLoadTimingNotReusedWithProxy(load_timing_result, |
| 1709 CONNECT_TIMING_HAS_SSL_TIMES); | 1709 CONNECT_TIMING_HAS_SSL_TIMES); |
| 1710 } | 1710 } |
| 1711 | 1711 |
| 1712 // Make sure that URLRequest correctly adjusts proxy times when they're before | 1712 // Make sure that URLRequest correctly adjusts proxy times when they're before |
| 1713 // |request_start|, due to already having a connected socket. This happens in | 1713 // |request_start|, due to already having a connected socket. This happens in |
| 1714 // the case of reusing a SPDY session or HTTP pipeline. The connected socket is | 1714 // the case of reusing a SPDY session. The connected socket is not considered |
| 1715 // not considered reused in this test (May be a preconnect). | 1715 // reused in this test (May be a preconnect). |
| 1716 // | 1716 // |
| 1717 // To mix things up from the test above, assumes DNS times but no SSL times. | 1717 // To mix things up from the test above, assumes DNS times but no SSL times. |
| 1718 TEST_F(URLRequestTest, InterceptLoadTimingEarlyProxyResolution) { | 1718 TEST_F(URLRequestTest, InterceptLoadTimingEarlyProxyResolution) { |
| 1719 base::TimeTicks now = base::TimeTicks::Now(); | 1719 base::TimeTicks now = base::TimeTicks::Now(); |
| 1720 LoadTimingInfo job_load_timing = | 1720 LoadTimingInfo job_load_timing = |
| 1721 NormalLoadTimingInfo(now, CONNECT_TIMING_HAS_DNS_TIMES, true); | 1721 NormalLoadTimingInfo(now, CONNECT_TIMING_HAS_DNS_TIMES, true); |
| 1722 job_load_timing.proxy_resolve_start = now - base::TimeDelta::FromDays(6); | 1722 job_load_timing.proxy_resolve_start = now - base::TimeDelta::FromDays(6); |
| 1723 job_load_timing.proxy_resolve_end = now - base::TimeDelta::FromDays(5); | 1723 job_load_timing.proxy_resolve_end = now - base::TimeDelta::FromDays(5); |
| 1724 job_load_timing.connect_timing.dns_start = now - base::TimeDelta::FromDays(4); | 1724 job_load_timing.connect_timing.dns_start = now - base::TimeDelta::FromDays(4); |
| 1725 job_load_timing.connect_timing.dns_end = now - base::TimeDelta::FromDays(3); | 1725 job_load_timing.connect_timing.dns_end = now - base::TimeDelta::FromDays(3); |
| (...skipping 6287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8013 | 8013 |
| 8014 EXPECT_FALSE(r.is_pending()); | 8014 EXPECT_FALSE(r.is_pending()); |
| 8015 EXPECT_EQ(1, d->response_started_count()); | 8015 EXPECT_EQ(1, d->response_started_count()); |
| 8016 EXPECT_FALSE(d->received_data_before_response()); | 8016 EXPECT_FALSE(d->received_data_before_response()); |
| 8017 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); | 8017 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); |
| 8018 } | 8018 } |
| 8019 } | 8019 } |
| 8020 #endif // !defined(DISABLE_FTP_SUPPORT) | 8020 #endif // !defined(DISABLE_FTP_SUPPORT) |
| 8021 | 8021 |
| 8022 } // namespace net | 8022 } // namespace net |
| OLD | NEW |