| OLD | NEW |
| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 StringPiece(reinterpret_cast<const char*>(orbit_), sizeof(orbit_)), | 278 StringPiece(reinterpret_cast<const char*>(orbit_), sizeof(orbit_)), |
| 279 &nonce); | 279 &nonce); |
| 280 return nonce; | 280 return nonce; |
| 281 } | 281 } |
| 282 | 282 |
| 283 void CheckRejectReasons( | 283 void CheckRejectReasons( |
| 284 const HandshakeFailureReason* expected_handshake_failures, | 284 const HandshakeFailureReason* expected_handshake_failures, |
| 285 size_t expected_count) { | 285 size_t expected_count) { |
| 286 const uint32* reject_reasons; | 286 const uint32* reject_reasons; |
| 287 size_t num_reject_reasons; | 287 size_t num_reject_reasons; |
| 288 COMPILE_ASSERT(sizeof(QuicTag) == sizeof(uint32), header_out_of_sync); | 288 static_assert(sizeof(QuicTag) == sizeof(uint32), "header_out_of_sync"); |
| 289 QuicErrorCode error_code = | 289 QuicErrorCode error_code = |
| 290 out_.GetTaglist(kRREJ, &reject_reasons, &num_reject_reasons); | 290 out_.GetTaglist(kRREJ, &reject_reasons, &num_reject_reasons); |
| 291 ASSERT_EQ(QUIC_NO_ERROR, error_code); | 291 ASSERT_EQ(QUIC_NO_ERROR, error_code); |
| 292 | 292 |
| 293 if (FLAGS_use_early_return_when_verifying_chlo) { | 293 if (FLAGS_use_early_return_when_verifying_chlo) { |
| 294 EXPECT_EQ(1u, num_reject_reasons); | 294 EXPECT_EQ(1u, num_reject_reasons); |
| 295 } else { | 295 } else { |
| 296 EXPECT_EQ(expected_count, num_reject_reasons); | 296 EXPECT_EQ(expected_count, num_reject_reasons); |
| 297 } | 297 } |
| 298 for (size_t i = 0; i < num_reject_reasons; ++i) { | 298 for (size_t i = 0; i < num_reject_reasons; ++i) { |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 | 959 |
| 960 strike_register_client_->RunPendingVerifications(); | 960 strike_register_client_->RunPendingVerifications(); |
| 961 ASSERT_TRUE(called); | 961 ASSERT_TRUE(called); |
| 962 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); | 962 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); |
| 963 // The message should be rejected now. | 963 // The message should be rejected now. |
| 964 CheckRejectTag(); | 964 CheckRejectTag(); |
| 965 } | 965 } |
| 966 | 966 |
| 967 } // namespace test | 967 } // namespace test |
| 968 } // namespace net | 968 } // namespace net |
| OLD | NEW |