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

Side by Side Diff: net/quic/crypto/crypto_server_test.cc

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/congestion_control/cubic.cc ('k') | net/quic/crypto/proof_source.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <ostream> 5 #include <ostream>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "crypto/secure_hash.h" 10 #include "crypto/secure_hash.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 bool* called) { 220 bool* called) {
221 config_.ValidateClientHello( 221 config_.ValidateClientHello(
222 message, client_address_, &clock_, 222 message, client_address_, &clock_,
223 new ValidateCallback(this, false, error_substr, called)); 223 new ValidateCallback(this, false, error_substr, called));
224 } 224 }
225 225
226 void ProcessValidationResult(const CryptoHandshakeMessage& message, 226 void ProcessValidationResult(const CryptoHandshakeMessage& message,
227 const ValidateCallback::Result& result, 227 const ValidateCallback::Result& result,
228 bool should_succeed, 228 bool should_succeed,
229 const char* error_substr) { 229 const char* error_substr) {
230 IPEndPoint server_ip;
230 string error_details; 231 string error_details;
231 QuicErrorCode error = config_.ProcessClientHello( 232 QuicErrorCode error = config_.ProcessClientHello(
232 result, 1 /* ConnectionId */, client_address_, 233 result, 1 /* ConnectionId */, server_ip, client_address_,
233 supported_versions_.front(), supported_versions_, &clock_, rand_, 234 supported_versions_.front(), supported_versions_, &clock_, rand_,
234 &params_, &out_, &error_details); 235 &params_, &out_, &error_details);
235 236
236 if (should_succeed) { 237 if (should_succeed) {
237 ASSERT_EQ(error, QUIC_NO_ERROR) 238 ASSERT_EQ(error, QUIC_NO_ERROR)
238 << "Message failed with error " << error_details << ": " 239 << "Message failed with error " << error_details << ": "
239 << message.DebugString(); 240 << message.DebugString();
240 } else { 241 } else {
241 ASSERT_NE(error, QUIC_NO_ERROR) 242 ASSERT_NE(error, QUIC_NO_ERROR)
242 << "Message didn't fail: " << message.DebugString(); 243 << "Message didn't fail: " << message.DebugString();
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 719
719 strike_register_client_->RunPendingVerifications(); 720 strike_register_client_->RunPendingVerifications();
720 ASSERT_TRUE(called); 721 ASSERT_TRUE(called);
721 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); 722 EXPECT_EQ(0, strike_register_client_->PendingVerifications());
722 // The message should be rejected now. 723 // The message should be rejected now.
723 EXPECT_EQ(kREJ, out_.tag()); 724 EXPECT_EQ(kREJ, out_.tag());
724 } 725 }
725 726
726 } // namespace test 727 } // namespace test
727 } // namespace net 728 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/cubic.cc ('k') | net/quic/crypto/proof_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698