Chromium Code Reviews| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 #include "net/http/http_response_headers.h" | 68 #include "net/http/http_response_headers.h" |
| 69 #include "net/http/http_util.h" | 69 #include "net/http/http_util.h" |
| 70 #include "net/log/net_log.h" | 70 #include "net/log/net_log.h" |
| 71 #include "net/log/test_net_log.h" | 71 #include "net/log/test_net_log.h" |
| 72 #include "net/log/test_net_log_entry.h" | 72 #include "net/log/test_net_log_entry.h" |
| 73 #include "net/log/test_net_log_util.h" | 73 #include "net/log/test_net_log_util.h" |
| 74 #include "net/proxy/proxy_service.h" | 74 #include "net/proxy/proxy_service.h" |
| 75 #include "net/socket/ssl_client_socket.h" | 75 #include "net/socket/ssl_client_socket.h" |
| 76 #include "net/ssl/ssl_cipher_suite_names.h" | 76 #include "net/ssl/ssl_cipher_suite_names.h" |
| 77 #include "net/ssl/ssl_connection_status_flags.h" | 77 #include "net/ssl/ssl_connection_status_flags.h" |
| 78 #include "net/ssl/ssl_private_key.h" | |
|
davidben
2015/09/25 20:10:12
Nit: unnecessary
svaldez
2015/09/28 16:54:54
Done.
| |
| 78 #include "net/test/cert_test_util.h" | 79 #include "net/test/cert_test_util.h" |
| 79 #include "net/test/spawned_test_server/spawned_test_server.h" | 80 #include "net/test/spawned_test_server/spawned_test_server.h" |
| 80 #include "net/url_request/data_protocol_handler.h" | 81 #include "net/url_request/data_protocol_handler.h" |
| 81 #include "net/url_request/static_http_user_agent_settings.h" | 82 #include "net/url_request/static_http_user_agent_settings.h" |
| 82 #include "net/url_request/url_request.h" | 83 #include "net/url_request/url_request.h" |
| 83 #include "net/url_request/url_request_http_job.h" | 84 #include "net/url_request/url_request_http_job.h" |
| 84 #include "net/url_request/url_request_intercepting_job_factory.h" | 85 #include "net/url_request/url_request_intercepting_job_factory.h" |
| 85 #include "net/url_request/url_request_interceptor.h" | 86 #include "net/url_request/url_request_interceptor.h" |
| 86 #include "net/url_request/url_request_job_factory_impl.h" | 87 #include "net/url_request/url_request_job_factory_impl.h" |
| 87 #include "net/url_request/url_request_redirect_job.h" | 88 #include "net/url_request/url_request_redirect_job.h" |
| (...skipping 7869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7957 | 7958 |
| 7958 base::RunLoop().Run(); | 7959 base::RunLoop().Run(); |
| 7959 | 7960 |
| 7960 EXPECT_EQ(1, d.on_certificate_requested_count()); | 7961 EXPECT_EQ(1, d.on_certificate_requested_count()); |
| 7961 EXPECT_FALSE(d.received_data_before_response()); | 7962 EXPECT_FALSE(d.received_data_before_response()); |
| 7962 EXPECT_EQ(0, d.bytes_received()); | 7963 EXPECT_EQ(0, d.bytes_received()); |
| 7963 | 7964 |
| 7964 // Send no certificate. | 7965 // Send no certificate. |
| 7965 // TODO(davidben): Get temporary client cert import (with keys) working on | 7966 // TODO(davidben): Get temporary client cert import (with keys) working on |
| 7966 // all platforms so we can test sending a cert as well. | 7967 // all platforms so we can test sending a cert as well. |
| 7967 r->ContinueWithCertificate(NULL); | 7968 r->ContinueWithCertificate(NULL, NULL); |
|
davidben
2015/09/25 20:10:12
Nit: while you're here, want to make this nullptr?
svaldez
2015/09/28 16:54:54
Done.
| |
| 7968 | 7969 |
| 7969 base::RunLoop().Run(); | 7970 base::RunLoop().Run(); |
| 7970 | 7971 |
| 7971 EXPECT_EQ(1, d.response_started_count()); | 7972 EXPECT_EQ(1, d.response_started_count()); |
| 7972 EXPECT_FALSE(d.received_data_before_response()); | 7973 EXPECT_FALSE(d.received_data_before_response()); |
| 7973 EXPECT_NE(0, d.bytes_received()); | 7974 EXPECT_NE(0, d.bytes_received()); |
| 7974 } | 7975 } |
| 7975 } | 7976 } |
| 7976 | 7977 |
| 7977 TEST_F(HTTPSRequestTest, ResumeTest) { | 7978 TEST_F(HTTPSRequestTest, ResumeTest) { |
| (...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9473 | 9474 |
| 9474 req->Start(); | 9475 req->Start(); |
| 9475 req->Cancel(); | 9476 req->Cancel(); |
| 9476 job->DetachRequest(); | 9477 job->DetachRequest(); |
| 9477 base::RunLoop().RunUntilIdle(); | 9478 base::RunLoop().RunUntilIdle(); |
| 9478 EXPECT_EQ(URLRequestStatus::CANCELED, req->status().status()); | 9479 EXPECT_EQ(URLRequestStatus::CANCELED, req->status().status()); |
| 9479 EXPECT_EQ(0, d.received_redirect_count()); | 9480 EXPECT_EQ(0, d.received_redirect_count()); |
| 9480 } | 9481 } |
| 9481 | 9482 |
| 9482 } // namespace net | 9483 } // namespace net |
| OLD | NEW |