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

Side by Side Diff: net/tools/quic/quic_client_session_test.cc

Issue 1765603002: Add QUIC 31 in which the server's proof covers both the static server config as well as a hash of t… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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
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/tools/quic/quic_client_session.h" 5 #include "net/tools/quic/quic_client_session.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 // Now create a second session using the same crypto config. 144 // Now create a second session using the same crypto config.
145 Initialize(); 145 Initialize();
146 146
147 // Starting the handshake should move immediately to encryption 147 // Starting the handshake should move immediately to encryption
148 // established and will allow streams to be created. 148 // established and will allow streams to be created.
149 session_->CryptoConnect(); 149 session_->CryptoConnect();
150 EXPECT_TRUE(session_->IsEncryptionEstablished()); 150 EXPECT_TRUE(session_->IsEncryptionEstablished());
151 QuicSpdyClientStream* stream = 151 QuicSpdyClientStream* stream =
152 session_->CreateOutgoingDynamicStream(kDefaultPriority); 152 session_->CreateOutgoingDynamicStream(kDefaultPriority);
153 DCHECK_NE(kCryptoStreamId, stream->id()); 153 ASSERT_TRUE(stream != nullptr);
154 EXPECT_TRUE(stream != nullptr); 154 EXPECT_NE(kCryptoStreamId, stream->id());
155 155
156 // Process an "inchoate" REJ from the server which will cause 156 // Process an "inchoate" REJ from the server which will cause
157 // an inchoate CHLO to be sent and will leave the encryption level 157 // an inchoate CHLO to be sent and will leave the encryption level
158 // at NONE. 158 // at NONE.
159 CryptoHandshakeMessage rej; 159 CryptoHandshakeMessage rej;
160 CryptoTestUtils::FillInDummyReject(&rej, /* stateless */ false); 160 CryptoTestUtils::FillInDummyReject(&rej, /* stateless */ false);
161 EXPECT_TRUE(session_->IsEncryptionEstablished()); 161 EXPECT_TRUE(session_->IsEncryptionEstablished());
162 session_->GetCryptoStream()->OnHandshakeMessage(rej); 162 session_->GetCryptoStream()->OnHandshakeMessage(rej);
163 EXPECT_FALSE(session_->IsEncryptionEstablished()); 163 EXPECT_FALSE(session_->IsEncryptionEstablished());
164 EXPECT_EQ(ENCRYPTION_NONE, 164 EXPECT_EQ(ENCRYPTION_NONE,
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 QuicClientPromisedInfo* promised = 492 QuicClientPromisedInfo* promised =
493 session_->GetPromisedById(promised_stream_id_); 493 session_->GetPromisedById(promised_stream_id_);
494 EXPECT_NE(promised, nullptr); 494 EXPECT_NE(promised, nullptr);
495 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr); 495 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr);
496 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr); 496 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr);
497 } 497 }
498 498
499 } // namespace 499 } // namespace
500 } // namespace test 500 } // namespace test
501 } // namespace net 501 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_stream_factory_peer.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698