OLD | NEW |
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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 using std::pair; | 34 using std::pair; |
35 using testing::_; | 35 using testing::_; |
36 | 36 |
37 namespace net { | 37 namespace net { |
38 namespace test { | 38 namespace test { |
39 | 39 |
40 class QuicCryptoServerConfigPeer { | 40 class QuicCryptoServerConfigPeer { |
41 public: | 41 public: |
42 static string GetPrimaryOrbit(const QuicCryptoServerConfig& config) { | 42 static string GetPrimaryOrbit(const QuicCryptoServerConfig& config) { |
43 base::AutoLock lock(config.configs_lock_); | 43 base::AutoLock lock(config.configs_lock_); |
44 CHECK(config.primary_config_ != NULL); | 44 CHECK(config.primary_config_.get() != NULL); |
45 return string(reinterpret_cast<const char*>(config.primary_config_->orbit), | 45 return string(reinterpret_cast<const char*>(config.primary_config_->orbit), |
46 kOrbitSize); | 46 kOrbitSize); |
47 } | 47 } |
48 }; | 48 }; |
49 | 49 |
50 namespace { | 50 namespace { |
51 | 51 |
52 const char kServerHostname[] = "test.example.com"; | 52 const char kServerHostname[] = "test.example.com"; |
53 const uint16 kServerPort = 80; | 53 const uint16 kServerPort = 80; |
54 | 54 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 // CompleteCryptoHandshake verifies | 271 // CompleteCryptoHandshake verifies |
272 // stream_.crypto_negotiated_params().channel_id is correct. | 272 // stream_.crypto_negotiated_params().channel_id is correct. |
273 EXPECT_EQ(2, CompleteCryptoHandshake()); | 273 EXPECT_EQ(2, CompleteCryptoHandshake()); |
274 EXPECT_TRUE(stream_.encryption_established()); | 274 EXPECT_TRUE(stream_.encryption_established()); |
275 EXPECT_TRUE(stream_.handshake_confirmed()); | 275 EXPECT_TRUE(stream_.handshake_confirmed()); |
276 } | 276 } |
277 | 277 |
278 } // namespace | 278 } // namespace |
279 } // namespace test | 279 } // namespace test |
280 } // namespace net | 280 } // namespace net |
OLD | NEW |