Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1277)

Side by Side Diff: net/quic/quic_crypto_server_stream_test.cc

Issue 2097123002: QUIC - Race Cert Verification with host resolution if certs are (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Race cert verification. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_crypto_client_stream.cc ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "net/quic/quic_crypto_server_stream.h" 5 #include "net/quic/quic_crypto_server_stream.h"
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 server_stream(), server_id_, client_options_); 158 server_stream(), server_id_, client_options_);
159 } 159 }
160 160
161 // Performs a single round of handshake message-exchange between the 161 // Performs a single round of handshake message-exchange between the
162 // client and server. 162 // client and server.
163 void AdvanceHandshakeWithFakeClient() { 163 void AdvanceHandshakeWithFakeClient() {
164 CHECK(server_connection_); 164 CHECK(server_connection_);
165 CHECK(client_session_ != nullptr); 165 CHECK(client_session_ != nullptr);
166 166
167 EXPECT_CALL(*client_session_, OnProofValid(_)).Times(testing::AnyNumber()); 167 EXPECT_CALL(*client_session_, OnProofValid(_)).Times(testing::AnyNumber());
168 EXPECT_CALL(*client_session_, OnChannelValid()).Times(testing::AnyNumber());
168 client_stream()->CryptoConnect(); 169 client_stream()->CryptoConnect();
169 CryptoTestUtils::AdvanceHandshake(client_connection_, client_stream(), 0, 170 CryptoTestUtils::AdvanceHandshake(client_connection_, client_stream(), 0,
170 server_connection_, server_stream(), 0); 171 server_connection_, server_stream(), 0);
171 } 172 }
172 173
173 protected: 174 protected:
174 // Every connection gets its own MockQuicConnectionHelper and 175 // Every connection gets its own MockQuicConnectionHelper and
175 // MockAlarmFactory, 176 // MockAlarmFactory,
176 // tracked separately from 177 // tracked separately from
177 // the server and client state so their lifetimes persist through the whole 178 // the server and client state so their lifetimes persist through the whole
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 QUIC_NO_ERROR, "", ConnectionCloseBehavior::SILENT_CLOSE); 602 QUIC_NO_ERROR, "", ConnectionCloseBehavior::SILENT_CLOSE);
602 603
603 // The outstanding nonce verification RPC now completes. 604 // The outstanding nonce verification RPC now completes.
604 strike_register_client_->RunPendingVerifications(); 605 strike_register_client_->RunPendingVerifications();
605 } 606 }
606 607
607 } // namespace 608 } // namespace
608 609
609 } // namespace test 610 } // namespace test
610 } // namespace net 611 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_client_stream.cc ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698