| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #include "net/disk_cache/disk_cache.h" | 51 #include "net/disk_cache/disk_cache.h" |
| 52 #include "net/dns/mock_host_resolver.h" | 52 #include "net/dns/mock_host_resolver.h" |
| 53 #include "net/ftp/ftp_network_layer.h" | 53 #include "net/ftp/ftp_network_layer.h" |
| 54 #include "net/http/http_byte_range.h" | 54 #include "net/http/http_byte_range.h" |
| 55 #include "net/http/http_cache.h" | 55 #include "net/http/http_cache.h" |
| 56 #include "net/http/http_network_layer.h" | 56 #include "net/http/http_network_layer.h" |
| 57 #include "net/http/http_network_session.h" | 57 #include "net/http/http_network_session.h" |
| 58 #include "net/http/http_request_headers.h" | 58 #include "net/http/http_request_headers.h" |
| 59 #include "net/http/http_response_headers.h" | 59 #include "net/http/http_response_headers.h" |
| 60 #include "net/http/http_util.h" | 60 #include "net/http/http_util.h" |
| 61 #include "net/log/captured_net_log_entry.h" |
| 61 #include "net/log/net_log.h" | 62 #include "net/log/net_log.h" |
| 62 #include "net/log/net_log_unittest.h" | 63 #include "net/log/net_log_unittest.h" |
| 63 #include "net/log/test_net_log.h" | 64 #include "net/log/test_net_log.h" |
| 64 #include "net/proxy/proxy_service.h" | 65 #include "net/proxy/proxy_service.h" |
| 65 #include "net/socket/ssl_client_socket.h" | 66 #include "net/socket/ssl_client_socket.h" |
| 66 #include "net/ssl/ssl_cipher_suite_names.h" | 67 #include "net/ssl/ssl_cipher_suite_names.h" |
| 67 #include "net/ssl/ssl_connection_status_flags.h" | 68 #include "net/ssl/ssl_connection_status_flags.h" |
| 68 #include "net/test/cert_test_util.h" | 69 #include "net/test/cert_test_util.h" |
| 69 #include "net/test/spawned_test_server/spawned_test_server.h" | 70 #include "net/test/spawned_test_server/spawned_test_server.h" |
| 70 #include "net/url_request/data_protocol_handler.h" | 71 #include "net/url_request/data_protocol_handler.h" |
| (...skipping 4085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4156 expected_second_load_state, | 4157 expected_second_load_state, |
| 4157 expected_third_load_state, | 4158 expected_third_load_state, |
| 4158 callback); | 4159 callback); |
| 4159 logger->Start(); | 4160 logger->Start(); |
| 4160 } | 4161 } |
| 4161 | 4162 |
| 4162 // Checks that the log entries, starting with log_position, contain the | 4163 // Checks that the log entries, starting with log_position, contain the |
| 4163 // DELEGATE_INFO NetLog events that an AsyncDelegateLogger should have | 4164 // DELEGATE_INFO NetLog events that an AsyncDelegateLogger should have |
| 4164 // recorded. Returns the index of entry after the expected number of | 4165 // recorded. Returns the index of entry after the expected number of |
| 4165 // events this logged, or entries.size() if there aren't enough entries. | 4166 // events this logged, or entries.size() if there aren't enough entries. |
| 4166 static size_t CheckDelegateInfo(const TestNetLog::CapturedEntryList& entries, | 4167 static size_t CheckDelegateInfo(const CapturedNetLogEntry::List& entries, |
| 4167 size_t log_position) { | 4168 size_t log_position) { |
| 4168 // There should be 4 DELEGATE_INFO events: Two begins and two ends. | 4169 // There should be 4 DELEGATE_INFO events: Two begins and two ends. |
| 4169 if (log_position + 3 >= entries.size()) { | 4170 if (log_position + 3 >= entries.size()) { |
| 4170 ADD_FAILURE() << "Not enough log entries"; | 4171 ADD_FAILURE() << "Not enough log entries"; |
| 4171 return entries.size(); | 4172 return entries.size(); |
| 4172 } | 4173 } |
| 4173 std::string delegate_info; | 4174 std::string delegate_info; |
| 4174 EXPECT_EQ(NetLog::TYPE_DELEGATE_INFO, entries[log_position].type); | 4175 EXPECT_EQ(NetLog::TYPE_DELEGATE_INFO, entries[log_position].type); |
| 4175 EXPECT_EQ(NetLog::PHASE_BEGIN, entries[log_position].phase); | 4176 EXPECT_EQ(NetLog::PHASE_BEGIN, entries[log_position].phase); |
| 4176 EXPECT_TRUE(entries[log_position].GetStringValue("delegate_info", | 4177 EXPECT_TRUE(entries[log_position].GetStringValue("delegate_info", |
| (...skipping 14 matching lines...) Expand all Loading... |
| 4191 ++log_position; | 4192 ++log_position; |
| 4192 EXPECT_EQ(NetLog::TYPE_DELEGATE_INFO, entries[log_position].type); | 4193 EXPECT_EQ(NetLog::TYPE_DELEGATE_INFO, entries[log_position].type); |
| 4193 EXPECT_EQ(NetLog::PHASE_END, entries[log_position].phase); | 4194 EXPECT_EQ(NetLog::PHASE_END, entries[log_position].phase); |
| 4194 | 4195 |
| 4195 return log_position + 1; | 4196 return log_position + 1; |
| 4196 } | 4197 } |
| 4197 | 4198 |
| 4198 // Find delegate request begin and end messages for OnBeforeNetworkStart. | 4199 // Find delegate request begin and end messages for OnBeforeNetworkStart. |
| 4199 // Returns the position of the end message. | 4200 // Returns the position of the end message. |
| 4200 static size_t ExpectBeforeNetworkEvents( | 4201 static size_t ExpectBeforeNetworkEvents( |
| 4201 const TestNetLog::CapturedEntryList& entries, | 4202 const CapturedNetLogEntry::List& entries, |
| 4202 size_t log_position) { | 4203 size_t log_position) { |
| 4203 log_position = | 4204 log_position = |
| 4204 ExpectLogContainsSomewhereAfter(entries, | 4205 ExpectLogContainsSomewhereAfter(entries, |
| 4205 log_position, | 4206 log_position, |
| 4206 NetLog::TYPE_URL_REQUEST_DELEGATE, | 4207 NetLog::TYPE_URL_REQUEST_DELEGATE, |
| 4207 NetLog::PHASE_BEGIN); | 4208 NetLog::PHASE_BEGIN); |
| 4208 EXPECT_EQ(NetLog::TYPE_URL_REQUEST_DELEGATE, | 4209 EXPECT_EQ(NetLog::TYPE_URL_REQUEST_DELEGATE, |
| 4209 entries[log_position + 1].type); | 4210 entries[log_position + 1].type); |
| 4210 EXPECT_EQ(NetLog::PHASE_END, entries[log_position + 1].phase); | 4211 EXPECT_EQ(NetLog::PHASE_END, entries[log_position + 1].phase); |
| 4211 return log_position + 1; | 4212 return log_position + 1; |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4458 LOAD_STATE_WAITING_FOR_DELEGATE, | 4459 LOAD_STATE_WAITING_FOR_DELEGATE, |
| 4459 LOAD_STATE_IDLE, | 4460 LOAD_STATE_IDLE, |
| 4460 base::Bind(&URLRequest::Start, base::Unretained(r.get()))); | 4461 base::Bind(&URLRequest::Start, base::Unretained(r.get()))); |
| 4461 | 4462 |
| 4462 base::RunLoop().Run(); | 4463 base::RunLoop().Run(); |
| 4463 | 4464 |
| 4464 EXPECT_EQ(200, r->GetResponseCode()); | 4465 EXPECT_EQ(200, r->GetResponseCode()); |
| 4465 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); | 4466 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); |
| 4466 } | 4467 } |
| 4467 | 4468 |
| 4468 TestNetLog::CapturedEntryList entries; | 4469 CapturedNetLogEntry::List entries; |
| 4469 net_log_.GetEntries(&entries); | 4470 net_log_.GetEntries(&entries); |
| 4470 size_t log_position = ExpectLogContainsSomewhereAfter( | 4471 size_t log_position = ExpectLogContainsSomewhereAfter( |
| 4471 entries, | 4472 entries, |
| 4472 0, | 4473 0, |
| 4473 NetLog::TYPE_DELEGATE_INFO, | 4474 NetLog::TYPE_DELEGATE_INFO, |
| 4474 NetLog::PHASE_BEGIN); | 4475 NetLog::PHASE_BEGIN); |
| 4475 | 4476 |
| 4476 log_position = AsyncDelegateLogger::CheckDelegateInfo(entries, log_position); | 4477 log_position = AsyncDelegateLogger::CheckDelegateInfo(entries, log_position); |
| 4477 | 4478 |
| 4478 // Nothing else should add any delegate info to the request. | 4479 // Nothing else should add any delegate info to the request. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 4503 base::RunLoop().Run(); | 4504 base::RunLoop().Run(); |
| 4504 | 4505 |
| 4505 EXPECT_EQ(200, r->GetResponseCode()); | 4506 EXPECT_EQ(200, r->GetResponseCode()); |
| 4506 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); | 4507 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); |
| 4507 EXPECT_EQ(1, network_delegate.created_requests()); | 4508 EXPECT_EQ(1, network_delegate.created_requests()); |
| 4508 EXPECT_EQ(0, network_delegate.destroyed_requests()); | 4509 EXPECT_EQ(0, network_delegate.destroyed_requests()); |
| 4509 } | 4510 } |
| 4510 EXPECT_EQ(1, network_delegate.destroyed_requests()); | 4511 EXPECT_EQ(1, network_delegate.destroyed_requests()); |
| 4511 | 4512 |
| 4512 size_t log_position = 0; | 4513 size_t log_position = 0; |
| 4513 TestNetLog::CapturedEntryList entries; | 4514 CapturedNetLogEntry::List entries; |
| 4514 net_log_.GetEntries(&entries); | 4515 net_log_.GetEntries(&entries); |
| 4515 for (size_t i = 0; i < 3; ++i) { | 4516 for (size_t i = 0; i < 3; ++i) { |
| 4516 log_position = ExpectLogContainsSomewhereAfter( | 4517 log_position = ExpectLogContainsSomewhereAfter( |
| 4517 entries, | 4518 entries, |
| 4518 log_position + 1, | 4519 log_position + 1, |
| 4519 NetLog::TYPE_URL_REQUEST_DELEGATE, | 4520 NetLog::TYPE_URL_REQUEST_DELEGATE, |
| 4520 NetLog::PHASE_BEGIN); | 4521 NetLog::PHASE_BEGIN); |
| 4521 | 4522 |
| 4522 log_position = AsyncDelegateLogger::CheckDelegateInfo(entries, | 4523 log_position = AsyncDelegateLogger::CheckDelegateInfo(entries, |
| 4523 log_position + 1); | 4524 log_position + 1); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4560 base::RunLoop().Run(); | 4561 base::RunLoop().Run(); |
| 4561 | 4562 |
| 4562 EXPECT_EQ(200, r->GetResponseCode()); | 4563 EXPECT_EQ(200, r->GetResponseCode()); |
| 4563 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); | 4564 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); |
| 4564 EXPECT_EQ(2, network_delegate.created_requests()); | 4565 EXPECT_EQ(2, network_delegate.created_requests()); |
| 4565 EXPECT_EQ(0, network_delegate.destroyed_requests()); | 4566 EXPECT_EQ(0, network_delegate.destroyed_requests()); |
| 4566 } | 4567 } |
| 4567 EXPECT_EQ(1, network_delegate.destroyed_requests()); | 4568 EXPECT_EQ(1, network_delegate.destroyed_requests()); |
| 4568 | 4569 |
| 4569 size_t log_position = 0; | 4570 size_t log_position = 0; |
| 4570 TestNetLog::CapturedEntryList entries; | 4571 CapturedNetLogEntry::List entries; |
| 4571 net_log_.GetEntries(&entries); | 4572 net_log_.GetEntries(&entries); |
| 4572 // The NetworkDelegate logged information in OnBeforeURLRequest, | 4573 // The NetworkDelegate logged information in OnBeforeURLRequest, |
| 4573 // OnBeforeSendHeaders, and OnHeadersReceived. | 4574 // OnBeforeSendHeaders, and OnHeadersReceived. |
| 4574 for (size_t i = 0; i < 3; ++i) { | 4575 for (size_t i = 0; i < 3; ++i) { |
| 4575 log_position = ExpectLogContainsSomewhereAfter( | 4576 log_position = ExpectLogContainsSomewhereAfter( |
| 4576 entries, | 4577 entries, |
| 4577 log_position + 1, | 4578 log_position + 1, |
| 4578 NetLog::TYPE_URL_REQUEST_DELEGATE, | 4579 NetLog::TYPE_URL_REQUEST_DELEGATE, |
| 4579 NetLog::PHASE_BEGIN); | 4580 NetLog::PHASE_BEGIN); |
| 4580 | 4581 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4642 base::RunLoop().Run(); | 4643 base::RunLoop().Run(); |
| 4643 | 4644 |
| 4644 EXPECT_EQ(200, r->GetResponseCode()); | 4645 EXPECT_EQ(200, r->GetResponseCode()); |
| 4645 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); | 4646 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); |
| 4646 EXPECT_EQ(1, network_delegate.created_requests()); | 4647 EXPECT_EQ(1, network_delegate.created_requests()); |
| 4647 EXPECT_EQ(0, network_delegate.destroyed_requests()); | 4648 EXPECT_EQ(0, network_delegate.destroyed_requests()); |
| 4648 } | 4649 } |
| 4649 EXPECT_EQ(1, network_delegate.destroyed_requests()); | 4650 EXPECT_EQ(1, network_delegate.destroyed_requests()); |
| 4650 | 4651 |
| 4651 size_t log_position = 0; | 4652 size_t log_position = 0; |
| 4652 TestNetLog::CapturedEntryList entries; | 4653 CapturedNetLogEntry::List entries; |
| 4653 net_log_.GetEntries(&entries); | 4654 net_log_.GetEntries(&entries); |
| 4654 // The NetworkDelegate should have logged information in OnBeforeURLRequest, | 4655 // The NetworkDelegate should have logged information in OnBeforeURLRequest, |
| 4655 // OnBeforeSendHeaders, OnHeadersReceived, OnAuthRequired, and then again in | 4656 // OnBeforeSendHeaders, OnHeadersReceived, OnAuthRequired, and then again in |
| 4656 // OnBeforeURLRequest and OnBeforeSendHeaders. | 4657 // OnBeforeURLRequest and OnBeforeSendHeaders. |
| 4657 for (size_t i = 0; i < 6; ++i) { | 4658 for (size_t i = 0; i < 6; ++i) { |
| 4658 log_position = ExpectLogContainsSomewhereAfter( | 4659 log_position = ExpectLogContainsSomewhereAfter( |
| 4659 entries, | 4660 entries, |
| 4660 log_position + 1, | 4661 log_position + 1, |
| 4661 NetLog::TYPE_URL_REQUEST_DELEGATE, | 4662 NetLog::TYPE_URL_REQUEST_DELEGATE, |
| 4662 NetLog::PHASE_BEGIN); | 4663 NetLog::PHASE_BEGIN); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4699 test_server_.GetURL("chunked?waitBetweenChunks=20"), DEFAULT_PRIORITY, | 4700 test_server_.GetURL("chunked?waitBetweenChunks=20"), DEFAULT_PRIORITY, |
| 4700 &request_delegate)); | 4701 &request_delegate)); |
| 4701 LoadStateWithParam load_state = r->GetLoadState(); | 4702 LoadStateWithParam load_state = r->GetLoadState(); |
| 4702 r->Start(); | 4703 r->Start(); |
| 4703 base::RunLoop().Run(); | 4704 base::RunLoop().Run(); |
| 4704 | 4705 |
| 4705 EXPECT_EQ(200, r->GetResponseCode()); | 4706 EXPECT_EQ(200, r->GetResponseCode()); |
| 4706 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); | 4707 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); |
| 4707 } | 4708 } |
| 4708 | 4709 |
| 4709 TestNetLog::CapturedEntryList entries; | 4710 CapturedNetLogEntry::List entries; |
| 4710 net_log_.GetEntries(&entries); | 4711 net_log_.GetEntries(&entries); |
| 4711 | 4712 |
| 4712 size_t log_position = 0; | 4713 size_t log_position = 0; |
| 4713 | 4714 |
| 4714 log_position = AsyncDelegateLogger::ExpectBeforeNetworkEvents( | 4715 log_position = AsyncDelegateLogger::ExpectBeforeNetworkEvents( |
| 4715 entries, log_position); | 4716 entries, log_position); |
| 4716 | 4717 |
| 4717 // The delegate info should only have been logged on header complete. Other | 4718 // The delegate info should only have been logged on header complete. Other |
| 4718 // times it should silently be ignored. | 4719 // times it should silently be ignored. |
| 4719 log_position = | 4720 log_position = |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4752 test_server_.GetURL("server-redirect?simple.html"), DEFAULT_PRIORITY, | 4753 test_server_.GetURL("server-redirect?simple.html"), DEFAULT_PRIORITY, |
| 4753 &request_delegate)); | 4754 &request_delegate)); |
| 4754 LoadStateWithParam load_state = r->GetLoadState(); | 4755 LoadStateWithParam load_state = r->GetLoadState(); |
| 4755 r->Start(); | 4756 r->Start(); |
| 4756 base::RunLoop().Run(); | 4757 base::RunLoop().Run(); |
| 4757 | 4758 |
| 4758 EXPECT_EQ(200, r->GetResponseCode()); | 4759 EXPECT_EQ(200, r->GetResponseCode()); |
| 4759 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); | 4760 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); |
| 4760 } | 4761 } |
| 4761 | 4762 |
| 4762 TestNetLog::CapturedEntryList entries; | 4763 CapturedNetLogEntry::List entries; |
| 4763 net_log_.GetEntries(&entries); | 4764 net_log_.GetEntries(&entries); |
| 4764 | 4765 |
| 4765 // Delegate info should only have been logged in OnReceivedRedirect and | 4766 // Delegate info should only have been logged in OnReceivedRedirect and |
| 4766 // OnResponseStarted. | 4767 // OnResponseStarted. |
| 4767 size_t log_position = 0; | 4768 size_t log_position = 0; |
| 4768 for (int i = 0; i < 2; ++i) { | 4769 for (int i = 0; i < 2; ++i) { |
| 4769 if (i == 0) { | 4770 if (i == 0) { |
| 4770 log_position = AsyncDelegateLogger::ExpectBeforeNetworkEvents( | 4771 log_position = AsyncDelegateLogger::ExpectBeforeNetworkEvents( |
| 4771 entries, log_position) + 1; | 4772 entries, log_position) + 1; |
| 4772 } | 4773 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4814 { | 4815 { |
| 4815 scoped_ptr<URLRequest> r(context.CreateRequest( | 4816 scoped_ptr<URLRequest> r(context.CreateRequest( |
| 4816 test_server_.GetURL("server-redirect?simple.html"), DEFAULT_PRIORITY, | 4817 test_server_.GetURL("server-redirect?simple.html"), DEFAULT_PRIORITY, |
| 4817 &request_delegate)); | 4818 &request_delegate)); |
| 4818 LoadStateWithParam load_state = r->GetLoadState(); | 4819 LoadStateWithParam load_state = r->GetLoadState(); |
| 4819 r->Start(); | 4820 r->Start(); |
| 4820 base::RunLoop().Run(); | 4821 base::RunLoop().Run(); |
| 4821 EXPECT_EQ(URLRequestStatus::CANCELED, r->status().status()); | 4822 EXPECT_EQ(URLRequestStatus::CANCELED, r->status().status()); |
| 4822 } | 4823 } |
| 4823 | 4824 |
| 4824 TestNetLog::CapturedEntryList entries; | 4825 CapturedNetLogEntry::List entries; |
| 4825 net_log.GetEntries(&entries); | 4826 net_log.GetEntries(&entries); |
| 4826 | 4827 |
| 4827 // Delegate info is always logged in both OnReceivedRedirect and | 4828 // Delegate info is always logged in both OnReceivedRedirect and |
| 4828 // OnResponseStarted. In the CANCEL_ON_RECEIVED_REDIRECT, the | 4829 // OnResponseStarted. In the CANCEL_ON_RECEIVED_REDIRECT, the |
| 4829 // OnResponseStarted delegate call is after cancellation, but logging is | 4830 // OnResponseStarted delegate call is after cancellation, but logging is |
| 4830 // still currently supported in that call. | 4831 // still currently supported in that call. |
| 4831 size_t log_position = 0; | 4832 size_t log_position = 0; |
| 4832 for (int i = 0; i < 2; ++i) { | 4833 for (int i = 0; i < 2; ++i) { |
| 4833 if (i == 0) { | 4834 if (i == 0) { |
| 4834 log_position = AsyncDelegateLogger::ExpectBeforeNetworkEvents( | 4835 log_position = AsyncDelegateLogger::ExpectBeforeNetworkEvents( |
| (...skipping 2459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7294 EXPECT_FALSE(r->ssl_info().connection_status & | 7295 EXPECT_FALSE(r->ssl_info().connection_status & |
| 7295 SSL_CONNECTION_VERSION_FALLBACK); | 7296 SSL_CONNECTION_VERSION_FALLBACK); |
| 7296 int expected_version = SSL_CONNECTION_VERSION_TLS1_2; | 7297 int expected_version = SSL_CONNECTION_VERSION_TLS1_2; |
| 7297 if (SSLClientSocket::GetMaxSupportedSSLVersion() < | 7298 if (SSLClientSocket::GetMaxSupportedSSLVersion() < |
| 7298 SSL_PROTOCOL_VERSION_TLS1_2) { | 7299 SSL_PROTOCOL_VERSION_TLS1_2) { |
| 7299 expected_version = SSL_CONNECTION_VERSION_TLS1_1; | 7300 expected_version = SSL_CONNECTION_VERSION_TLS1_1; |
| 7300 } | 7301 } |
| 7301 EXPECT_EQ(expected_version, | 7302 EXPECT_EQ(expected_version, |
| 7302 SSLConnectionStatusToVersion(r->ssl_info().connection_status)); | 7303 SSLConnectionStatusToVersion(r->ssl_info().connection_status)); |
| 7303 | 7304 |
| 7304 TestNetLog::CapturedEntryList entries; | 7305 CapturedNetLogEntry::List entries; |
| 7305 net_log.GetEntries(&entries); | 7306 net_log.GetEntries(&entries); |
| 7306 ExpectLogContainsSomewhere(entries, 0, NetLog::TYPE_SSL_CIPHER_FALLBACK, | 7307 ExpectLogContainsSomewhere(entries, 0, NetLog::TYPE_SSL_CIPHER_FALLBACK, |
| 7307 NetLog::PHASE_NONE); | 7308 NetLog::PHASE_NONE); |
| 7308 } | 7309 } |
| 7309 | 7310 |
| 7310 // This tests that a load of www.google.com with a certificate error sets | 7311 // This tests that a load of www.google.com with a certificate error sets |
| 7311 // the |certificate_errors_are_fatal| flag correctly. This flag will cause | 7312 // the |certificate_errors_are_fatal| flag correctly. This flag will cause |
| 7312 // the interstitial to be fatal. | 7313 // the interstitial to be fatal. |
| 7313 TEST_F(HTTPSRequestTest, HTTPSPreloadedHSTSTest) { | 7314 TEST_F(HTTPSRequestTest, HTTPSPreloadedHSTSTest) { |
| 7314 SpawnedTestServer::SSLOptions ssl_options( | 7315 SpawnedTestServer::SSLOptions ssl_options( |
| (...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9113 | 9114 |
| 9114 EXPECT_FALSE(r->is_pending()); | 9115 EXPECT_FALSE(r->is_pending()); |
| 9115 EXPECT_EQ(1, d->response_started_count()); | 9116 EXPECT_EQ(1, d->response_started_count()); |
| 9116 EXPECT_FALSE(d->received_data_before_response()); | 9117 EXPECT_FALSE(d->received_data_before_response()); |
| 9117 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); | 9118 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); |
| 9118 } | 9119 } |
| 9119 } | 9120 } |
| 9120 #endif // !defined(DISABLE_FTP_SUPPORT) | 9121 #endif // !defined(DISABLE_FTP_SUPPORT) |
| 9121 | 9122 |
| 9122 } // namespace net | 9123 } // namespace net |
| OLD | NEW |