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 <utility> | 5 #include <utility> |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 8267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8278 EXPECT_FALSE(d.received_data_before_response()); | 8278 EXPECT_FALSE(d.received_data_before_response()); |
8279 EXPECT_EQ(0, d.bytes_received()); | 8279 EXPECT_EQ(0, d.bytes_received()); |
8280 | 8280 |
8281 // Send no certificate. | 8281 // Send no certificate. |
8282 // TODO(davidben): Get temporary client cert import (with keys) working on | 8282 // TODO(davidben): Get temporary client cert import (with keys) working on |
8283 // all platforms so we can test sending a cert as well. | 8283 // all platforms so we can test sending a cert as well. |
8284 r->ContinueWithCertificate(nullptr, nullptr); | 8284 r->ContinueWithCertificate(nullptr, nullptr); |
8285 | 8285 |
8286 base::RunLoop().Run(); | 8286 base::RunLoop().Run(); |
8287 | 8287 |
8288 // Client certs is required but none is sent | |
8288 EXPECT_EQ(1, d.response_started_count()); | 8289 EXPECT_EQ(1, d.response_started_count()); |
8289 EXPECT_FALSE(d.received_data_before_response()); | 8290 EXPECT_FALSE(d.received_data_before_response()); |
8290 EXPECT_NE(0, d.bytes_received()); | 8291 EXPECT_EQ(0, d.bytes_received()); |
davidben
2016/01/25 20:56:12
You change the test from successfully connecting t
ryanchung
2016/01/29 23:22:14
If we want to support optional client certificates
davidben
2016/02/04 00:40:11
Oh hrmf, did I ask you do remove that from a previ
ryanchung
2016/02/05 01:56:13
Ok, using a enum. I changed the test back to what
| |
8291 } | 8292 } |
8292 } | 8293 } |
8293 | 8294 |
8294 TEST_F(HTTPSRequestTest, ResumeTest) { | 8295 TEST_F(HTTPSRequestTest, ResumeTest) { |
8295 // Test that we attempt a session resume when making two connections to the | 8296 // Test that we attempt a session resume when making two connections to the |
8296 // same host. | 8297 // same host. |
8297 SpawnedTestServer::SSLOptions ssl_options; | 8298 SpawnedTestServer::SSLOptions ssl_options; |
8298 ssl_options.record_resume = true; | 8299 ssl_options.record_resume = true; |
8299 SpawnedTestServer test_server( | 8300 SpawnedTestServer test_server( |
8300 SpawnedTestServer::TYPE_HTTPS, | 8301 SpawnedTestServer::TYPE_HTTPS, |
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9768 AddTestInterceptor()->set_main_intercept_job(std::move(job)); | 9769 AddTestInterceptor()->set_main_intercept_job(std::move(job)); |
9769 | 9770 |
9770 req->Start(); | 9771 req->Start(); |
9771 req->Cancel(); | 9772 req->Cancel(); |
9772 base::RunLoop().RunUntilIdle(); | 9773 base::RunLoop().RunUntilIdle(); |
9773 EXPECT_EQ(URLRequestStatus::CANCELED, req->status().status()); | 9774 EXPECT_EQ(URLRequestStatus::CANCELED, req->status().status()); |
9774 EXPECT_EQ(0, d.received_redirect_count()); | 9775 EXPECT_EQ(0, d.received_redirect_count()); |
9775 } | 9776 } |
9776 | 9777 |
9777 } // namespace net | 9778 } // namespace net |
OLD | NEW |