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 <stddef.h> | 5 #include <stddef.h> |
6 #include <string> | 6 #include <string> |
7 #include <sys/epoll.h> | 7 #include <sys/epoll.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 ASSERT_TRUE(Initialize()); | 1044 ASSERT_TRUE(Initialize()); |
1045 client_->client()->WaitForCryptoHandshakeConfirmed(); | 1045 client_->client()->WaitForCryptoHandshakeConfirmed(); |
1046 | 1046 |
1047 string body; | 1047 string body; |
1048 GenerateBody(&body, kMaxPacketSize); | 1048 GenerateBody(&body, kMaxPacketSize); |
1049 | 1049 |
1050 HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo"); | 1050 HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo"); |
1051 request.AddBody(body, true); | 1051 request.AddBody(body, true); |
1052 // Force the client to write with a stream ID belonging to a nonexistent | 1052 // Force the client to write with a stream ID belonging to a nonexistent |
1053 // server-side stream. | 1053 // server-side stream. |
1054 QuicSessionPeer::SetNextStreamId(client_->client()->session(), 2); | 1054 QuicSessionPeer::SetNextOutgoingStreamId(client_->client()->session(), 2); |
1055 | 1055 |
1056 client_->SendCustomSynchronousRequest(request); | 1056 client_->SendCustomSynchronousRequest(request); |
1057 // EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error()); | 1057 // EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error()); |
1058 EXPECT_EQ(QUIC_PACKET_FOR_NONEXISTENT_STREAM, client_->connection_error()); | 1058 EXPECT_EQ(QUIC_PACKET_FOR_NONEXISTENT_STREAM, client_->connection_error()); |
1059 } | 1059 } |
1060 | 1060 |
1061 // TODO(rch): this test seems to cause net_unittests timeouts :| | 1061 // TODO(rch): this test seems to cause net_unittests timeouts :| |
1062 TEST_P(EndToEndTest, DISABLED_MultipleTermination) { | 1062 TEST_P(EndToEndTest, DISABLED_MultipleTermination) { |
1063 ASSERT_TRUE(Initialize()); | 1063 ASSERT_TRUE(Initialize()); |
1064 | 1064 |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2091 // There will be buffered data to write in the client's stream. | 2091 // There will be buffered data to write in the client's stream. |
2092 ReliableQuicStream* stream = client_->client()->session()->GetStream(5); | 2092 ReliableQuicStream* stream = client_->client()->session()->GetStream(5); |
2093 EXPECT_TRUE(stream != nullptr && stream->HasBufferedData()); | 2093 EXPECT_TRUE(stream != nullptr && stream->HasBufferedData()); |
2094 } | 2094 } |
2095 } | 2095 } |
2096 | 2096 |
2097 } // namespace | 2097 } // namespace |
2098 } // namespace test | 2098 } // namespace test |
2099 } // namespace tools | 2099 } // namespace tools |
2100 } // namespace net | 2100 } // namespace net |
OLD | NEW |