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_client_session.h" | 5 #include "net/quic/quic_client_session.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "net/base/capturing_net_log.h" | 10 #include "net/base/capturing_net_log.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 92 } |
93 | 93 |
94 CompleteCryptoHandshake(); | 94 CompleteCryptoHandshake(); |
95 | 95 |
96 // After receiving a GoAway, I should no longer be able to create outgoing | 96 // After receiving a GoAway, I should no longer be able to create outgoing |
97 // streams. | 97 // streams. |
98 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); | 98 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); |
99 EXPECT_EQ(NULL, session_.CreateOutgoingReliableStream()); | 99 EXPECT_EQ(NULL, session_.CreateOutgoingReliableStream()); |
100 } | 100 } |
101 | 101 |
102 TEST_F(QuicClientSessionTest, Logging) { | 102 TEST_F(QuicClientSessionTest, DISABLED_Logging) { |
103 if (!Aes128GcmEncrypter::IsSupported()) { | 103 if (!Aes128GcmEncrypter::IsSupported()) { |
104 LOG(INFO) << "AES GCM not supported. Test skipped."; | 104 LOG(INFO) << "AES GCM not supported. Test skipped."; |
105 return; | 105 return; |
106 } | 106 } |
107 | 107 |
108 CompleteCryptoHandshake(); | 108 CompleteCryptoHandshake(); |
109 | 109 |
110 // TODO(rch): Add some helper methods to simplify packet creation in tests. | 110 // TODO(rch): Add some helper methods to simplify packet creation in tests. |
111 // Receive a packet, and verify that it was logged. | 111 // Receive a packet, and verify that it was logged. |
112 QuicFramer framer(kQuicVersion1, QuicTime::Zero(), false); | 112 QuicFramer framer(kQuicVersion1, QuicTime::Zero(), false); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 ASSERT_TRUE(entries[pos].GetIntegerValue("error_code", &error_code)); | 163 ASSERT_TRUE(entries[pos].GetIntegerValue("error_code", &error_code)); |
164 EXPECT_EQ(frame.error_code, static_cast<QuicRstStreamErrorCode>(error_code)); | 164 EXPECT_EQ(frame.error_code, static_cast<QuicRstStreamErrorCode>(error_code)); |
165 std::string details; | 165 std::string details; |
166 ASSERT_TRUE(entries[pos].GetStringValue("details", &details)); | 166 ASSERT_TRUE(entries[pos].GetStringValue("details", &details)); |
167 EXPECT_EQ(frame.error_details, details); | 167 EXPECT_EQ(frame.error_details, details); |
168 } | 168 } |
169 | 169 |
170 } // namespace | 170 } // namespace |
171 } // namespace test | 171 } // namespace test |
172 } // namespace net | 172 } // namespace net |
OLD | NEW |