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 7946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7957 | 7957 |
7958 base::RunLoop().Run(); | 7958 base::RunLoop().Run(); |
7959 | 7959 |
7960 EXPECT_EQ(1, d.on_certificate_requested_count()); | 7960 EXPECT_EQ(1, d.on_certificate_requested_count()); |
7961 EXPECT_FALSE(d.received_data_before_response()); | 7961 EXPECT_FALSE(d.received_data_before_response()); |
7962 EXPECT_EQ(0, d.bytes_received()); | 7962 EXPECT_EQ(0, d.bytes_received()); |
7963 | 7963 |
7964 // Send no certificate. | 7964 // Send no certificate. |
7965 // TODO(davidben): Get temporary client cert import (with keys) working on | 7965 // TODO(davidben): Get temporary client cert import (with keys) working on |
7966 // all platforms so we can test sending a cert as well. | 7966 // all platforms so we can test sending a cert as well. |
7967 r->ContinueWithCertificate(NULL); | 7967 r->ContinueWithCertificate(nullptr, nullptr); |
7968 | 7968 |
7969 base::RunLoop().Run(); | 7969 base::RunLoop().Run(); |
7970 | 7970 |
7971 EXPECT_EQ(1, d.response_started_count()); | 7971 EXPECT_EQ(1, d.response_started_count()); |
7972 EXPECT_FALSE(d.received_data_before_response()); | 7972 EXPECT_FALSE(d.received_data_before_response()); |
7973 EXPECT_NE(0, d.bytes_received()); | 7973 EXPECT_NE(0, d.bytes_received()); |
7974 } | 7974 } |
7975 } | 7975 } |
7976 | 7976 |
7977 TEST_F(HTTPSRequestTest, ResumeTest) { | 7977 TEST_F(HTTPSRequestTest, ResumeTest) { |
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9473 | 9473 |
9474 req->Start(); | 9474 req->Start(); |
9475 req->Cancel(); | 9475 req->Cancel(); |
9476 job->DetachRequest(); | 9476 job->DetachRequest(); |
9477 base::RunLoop().RunUntilIdle(); | 9477 base::RunLoop().RunUntilIdle(); |
9478 EXPECT_EQ(URLRequestStatus::CANCELED, req->status().status()); | 9478 EXPECT_EQ(URLRequestStatus::CANCELED, req->status().status()); |
9479 EXPECT_EQ(0, d.received_redirect_count()); | 9479 EXPECT_EQ(0, d.received_redirect_count()); |
9480 } | 9480 } |
9481 | 9481 |
9482 } // namespace net | 9482 } // namespace net |
OLD | NEW |