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 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 GenerateBody(&body, kMaxPacketSize); | 1066 GenerateBody(&body, kMaxPacketSize); |
1067 | 1067 |
1068 HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo"); | 1068 HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo"); |
1069 request.AddBody(body, true); | 1069 request.AddBody(body, true); |
1070 // Force the client to write with a stream ID belonging to a nonexistent | 1070 // Force the client to write with a stream ID belonging to a nonexistent |
1071 // server-side stream. | 1071 // server-side stream. |
1072 QuicSessionPeer::SetNextOutgoingStreamId(client_->client()->session(), 2); | 1072 QuicSessionPeer::SetNextOutgoingStreamId(client_->client()->session(), 2); |
1073 | 1073 |
1074 client_->SendCustomSynchronousRequest(request); | 1074 client_->SendCustomSynchronousRequest(request); |
1075 // EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error()); | 1075 // EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error()); |
1076 EXPECT_EQ(QUIC_PACKET_FOR_NONEXISTENT_STREAM, client_->connection_error()); | 1076 EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error()); |
| 1077 EXPECT_EQ(QUIC_INVALID_STREAM_ID, client_->connection_error()); |
1077 } | 1078 } |
1078 | 1079 |
1079 // TODO(rch): this test seems to cause net_unittests timeouts :| | 1080 // TODO(rch): this test seems to cause net_unittests timeouts :| |
1080 TEST_P(EndToEndTest, DISABLED_MultipleTermination) { | 1081 TEST_P(EndToEndTest, DISABLED_MultipleTermination) { |
1081 ASSERT_TRUE(Initialize()); | 1082 ASSERT_TRUE(Initialize()); |
1082 | 1083 |
1083 HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo"); | 1084 HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo"); |
1084 request.AddHeader("content-length", "3"); | 1085 request.AddHeader("content-length", "3"); |
1085 request.set_has_complete_message(false); | 1086 request.set_has_complete_message(false); |
1086 | 1087 |
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2109 // There will be buffered data to write in the client's stream. | 2110 // There will be buffered data to write in the client's stream. |
2110 ReliableQuicStream* stream = client_->client()->session()->GetStream(5); | 2111 ReliableQuicStream* stream = client_->client()->session()->GetStream(5); |
2111 EXPECT_TRUE(stream != nullptr && stream->HasBufferedData()); | 2112 EXPECT_TRUE(stream != nullptr && stream->HasBufferedData()); |
2112 } | 2113 } |
2113 } | 2114 } |
2114 | 2115 |
2115 } // namespace | 2116 } // namespace |
2116 } // namespace test | 2117 } // namespace test |
2117 } // namespace tools | 2118 } // namespace tools |
2118 } // namespace net | 2119 } // namespace net |
OLD | NEW |