| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 "net/quic/quartc/quartc_session.h" | 5 #include "net/quic/quartc/quartc_session.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 public: | 51 public: |
| 52 explicit FakeProofSource(bool success) : success_(success) {} | 52 explicit FakeProofSource(bool success) : success_(success) {} |
| 53 | 53 |
| 54 // ProofSource override. | 54 // ProofSource override. |
| 55 bool GetProof(const QuicSocketAddress& server_ip, | 55 bool GetProof(const QuicSocketAddress& server_ip, |
| 56 const std::string& hostname, | 56 const std::string& hostname, |
| 57 const std::string& server_config, | 57 const std::string& server_config, |
| 58 net::QuicVersion quic_version, | 58 net::QuicVersion quic_version, |
| 59 base::StringPiece chlo_hash, | 59 base::StringPiece chlo_hash, |
| 60 const net::QuicTagVector& connection_options, | 60 const net::QuicTagVector& connection_options, |
| 61 scoped_refptr<net::ProofSource::Chain>* out_certs, | 61 QuicReferenceCountedPointer<net::ProofSource::Chain>* out_certs, |
| 62 net::QuicCryptoProof* proof) override { | 62 net::QuicCryptoProof* proof) override { |
| 63 if (success_) { | 63 if (success_) { |
| 64 std::vector<std::string> certs; | 64 std::vector<std::string> certs; |
| 65 certs.push_back("Required to establish handshake"); | 65 certs.push_back("Required to establish handshake"); |
| 66 *out_certs = new ProofSource::Chain(certs); | 66 *out_certs = new ProofSource::Chain(certs); |
| 67 proof->signature = "Signature"; | 67 proof->signature = "Signature"; |
| 68 proof->leaf_cert_scts = "Time"; | 68 proof->leaf_cert_scts = "Time"; |
| 69 } | 69 } |
| 70 return success_; | 70 return success_; |
| 71 } | 71 } |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 EXPECT_FALSE(client_peer_->IsClosedStream(id)); | 501 EXPECT_FALSE(client_peer_->IsClosedStream(id)); |
| 502 stream->SetDelegate(client_peer_->stream_delegate()); | 502 stream->SetDelegate(client_peer_->stream_delegate()); |
| 503 stream->Close(); | 503 stream->Close(); |
| 504 RunLoopWithTimeout(); | 504 RunLoopWithTimeout(); |
| 505 EXPECT_TRUE(client_peer_->IsClosedStream(id)); | 505 EXPECT_TRUE(client_peer_->IsClosedStream(id)); |
| 506 } | 506 } |
| 507 | 507 |
| 508 } // namespace | 508 } // namespace |
| 509 } // namespace test | 509 } // namespace test |
| 510 } // namespace net | 510 } // namespace net |
| OLD | NEW |