| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <cstdint> | 6 #include <cstdint> |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <ostream> | 8 #include <ostream> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 void SetUp() override { | 129 void SetUp() override { |
| 130 QuicCryptoServerConfig::ConfigOptions old_config_options; | 130 QuicCryptoServerConfig::ConfigOptions old_config_options; |
| 131 old_config_options.id = kOldConfigId; | 131 old_config_options.id = kOldConfigId; |
| 132 delete config_.AddDefaultConfig(rand_, &clock_, old_config_options); | 132 delete config_.AddDefaultConfig(rand_, &clock_, old_config_options); |
| 133 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1000)); | 133 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1000)); |
| 134 std::unique_ptr<QuicServerConfigProtobuf> primary_config( | 134 std::unique_ptr<QuicServerConfigProtobuf> primary_config( |
| 135 config_.GenerateConfig(rand_, &clock_, config_options_)); | 135 config_.GenerateConfig(rand_, &clock_, config_options_)); |
| 136 primary_config->set_primary_time(clock_.WallNow().ToUNIXSeconds()); | 136 primary_config->set_primary_time(clock_.WallNow().ToUNIXSeconds()); |
| 137 std::unique_ptr<CryptoHandshakeMessage> msg( | 137 std::unique_ptr<CryptoHandshakeMessage> msg( |
| 138 config_.AddConfig(primary_config.get(), clock_.WallNow())); | 138 config_.AddConfig(std::move(primary_config), clock_.WallNow())); |
| 139 | 139 |
| 140 StringPiece orbit; | 140 StringPiece orbit; |
| 141 CHECK(msg->GetStringPiece(kORBT, &orbit)); | 141 CHECK(msg->GetStringPiece(kORBT, &orbit)); |
| 142 CHECK_EQ(sizeof(orbit_), orbit.size()); | 142 CHECK_EQ(sizeof(orbit_), orbit.size()); |
| 143 memcpy(orbit_, orbit.data(), orbit.size()); | 143 memcpy(orbit_, orbit.data(), orbit.size()); |
| 144 | 144 |
| 145 char public_value[32]; | 145 char public_value[32]; |
| 146 memset(public_value, 42, sizeof(public_value)); | 146 memset(public_value, 42, sizeof(public_value)); |
| 147 | 147 |
| 148 nonce_hex_ = "#" + QuicUtils::HexEncode(GenerateNonce()); | 148 nonce_hex_ = "#" + QuicUtils::HexEncode(GenerateNonce()); |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); | 1279 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); |
| 1280 } else { | 1280 } else { |
| 1281 // version 33. | 1281 // version 33. |
| 1282 ASSERT_EQ(kSHLO, out_.tag()); | 1282 ASSERT_EQ(kSHLO, out_.tag()); |
| 1283 CheckServerHello(out_); | 1283 CheckServerHello(out_); |
| 1284 } | 1284 } |
| 1285 } | 1285 } |
| 1286 | 1286 |
| 1287 } // namespace test | 1287 } // namespace test |
| 1288 } // namespace net | 1288 } // namespace net |
| OLD | NEW |