| 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 14 matching lines...) Expand all Loading... |
| 25 #include "net/quic/test_tools/quic_test_utils.h" | 25 #include "net/quic/test_tools/quic_test_utils.h" |
| 26 #include "testing/gmock/include/gmock/gmock.h" | 26 #include "testing/gmock/include/gmock/gmock.h" |
| 27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
| 28 | 28 |
| 29 namespace net { | 29 namespace net { |
| 30 class QuicConnection; | 30 class QuicConnection; |
| 31 class ReliableQuicStream; | 31 class ReliableQuicStream; |
| 32 } // namespace net | 32 } // namespace net |
| 33 | 33 |
| 34 using std::pair; | 34 using std::pair; |
| 35 using std::string; |
| 35 using testing::_; | 36 using testing::_; |
| 36 | 37 |
| 37 namespace net { | 38 namespace net { |
| 38 namespace test { | 39 namespace test { |
| 39 | 40 |
| 40 class QuicCryptoServerConfigPeer { | 41 class QuicCryptoServerConfigPeer { |
| 41 public: | 42 public: |
| 42 static string GetPrimaryOrbit(const QuicCryptoServerConfig& config) { | 43 static string GetPrimaryOrbit(const QuicCryptoServerConfig& config) { |
| 43 base::AutoLock lock(config.configs_lock_); | 44 base::AutoLock lock(config.configs_lock_); |
| 44 CHECK(config.primary_config_.get() != nullptr); | 45 CHECK(config.primary_config_.get() != nullptr); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 272 |
| 272 TEST_P(QuicCryptoServerStreamTest, OnlySendSCUPAfterHandshakeComplete) { | 273 TEST_P(QuicCryptoServerStreamTest, OnlySendSCUPAfterHandshakeComplete) { |
| 273 // An attempt to send a SCUP before completing handshake should fail. | 274 // An attempt to send a SCUP before completing handshake should fail. |
| 274 stream_.SendServerConfigUpdate(nullptr); | 275 stream_.SendServerConfigUpdate(nullptr); |
| 275 EXPECT_EQ(0, stream_.num_server_config_update_messages_sent()); | 276 EXPECT_EQ(0, stream_.num_server_config_update_messages_sent()); |
| 276 } | 277 } |
| 277 | 278 |
| 278 } // namespace | 279 } // namespace |
| 279 } // namespace test | 280 } // namespace test |
| 280 } // namespace net | 281 } // namespace net |
| OLD | NEW |