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 8204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8215 | 8215 |
8216 base::RunLoop().Run(); | 8216 base::RunLoop().Run(); |
8217 | 8217 |
8218 EXPECT_EQ(1, d.on_certificate_requested_count()); | 8218 EXPECT_EQ(1, d.on_certificate_requested_count()); |
8219 EXPECT_FALSE(d.received_data_before_response()); | 8219 EXPECT_FALSE(d.received_data_before_response()); |
8220 EXPECT_EQ(0, d.bytes_received()); | 8220 EXPECT_EQ(0, d.bytes_received()); |
8221 | 8221 |
8222 // Send no certificate. | 8222 // Send no certificate. |
8223 // TODO(davidben): Get temporary client cert import (with keys) working on | 8223 // TODO(davidben): Get temporary client cert import (with keys) working on |
8224 // all platforms so we can test sending a cert as well. | 8224 // all platforms so we can test sending a cert as well. |
8225 r->ContinueWithCertificate(NULL); | 8225 r->ContinueWithCertificate(nullptr, nullptr); |
8226 | 8226 |
8227 base::RunLoop().Run(); | 8227 base::RunLoop().Run(); |
8228 | 8228 |
8229 EXPECT_EQ(1, d.response_started_count()); | 8229 EXPECT_EQ(1, d.response_started_count()); |
8230 EXPECT_FALSE(d.received_data_before_response()); | 8230 EXPECT_FALSE(d.received_data_before_response()); |
8231 EXPECT_NE(0, d.bytes_received()); | 8231 EXPECT_NE(0, d.bytes_received()); |
8232 } | 8232 } |
8233 } | 8233 } |
8234 | 8234 |
8235 TEST_F(HTTPSRequestTest, ResumeTest) { | 8235 TEST_F(HTTPSRequestTest, ResumeTest) { |
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9716 | 9716 |
9717 req->Start(); | 9717 req->Start(); |
9718 req->Cancel(); | 9718 req->Cancel(); |
9719 job->DetachRequest(); | 9719 job->DetachRequest(); |
9720 base::RunLoop().RunUntilIdle(); | 9720 base::RunLoop().RunUntilIdle(); |
9721 EXPECT_EQ(URLRequestStatus::CANCELED, req->status().status()); | 9721 EXPECT_EQ(URLRequestStatus::CANCELED, req->status().status()); |
9722 EXPECT_EQ(0, d.received_redirect_count()); | 9722 EXPECT_EQ(0, d.received_redirect_count()); |
9723 } | 9723 } |
9724 | 9724 |
9725 } // namespace net | 9725 } // namespace net |
OLD | NEW |