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/spdy/spdy_http_stream.h" | 5 #include "net/spdy/spdy_http_stream.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 EXPECT_FALSE(http_session_->spdy_session_pool()->HasSession(pair)); | 387 EXPECT_FALSE(http_session_->spdy_session_pool()->HasSession(pair)); |
388 EXPECT_TRUE(data()->at_read_eof()); | 388 EXPECT_TRUE(data()->at_read_eof()); |
389 EXPECT_TRUE(data()->at_write_eof()); | 389 EXPECT_TRUE(data()->at_write_eof()); |
390 } | 390 } |
391 | 391 |
392 TEST_F(SpdyHttpStreamSpdy3Test, SendChunkedPost) { | 392 TEST_F(SpdyHttpStreamSpdy3Test, SendChunkedPost) { |
393 RunSendChunkedPostTest(kSpdyVersion3); | 393 RunSendChunkedPostTest(kSpdyVersion3); |
394 } | 394 } |
395 | 395 |
396 TEST_F(SpdyHttpStreamSpdy3Test, SendChunkedPost4) { | 396 TEST_F(SpdyHttpStreamSpdy3Test, SendChunkedPost4) { |
397 session_deps_.protocol = kProtoSPDY4a1; | 397 session_deps_.protocol = kProtoSPDY4a2; |
398 RunSendChunkedPostTest(kSpdyVersion4); | 398 RunSendChunkedPostTest(kSpdyVersion4); |
399 } | 399 } |
400 | 400 |
401 // Test to ensure the SpdyStream state machine does not get confused when a | 401 // Test to ensure the SpdyStream state machine does not get confused when a |
402 // chunk becomes available while a write is pending. | 402 // chunk becomes available while a write is pending. |
403 TEST_F(SpdyHttpStreamSpdy3Test, DelayedSendChunkedPost) { | 403 TEST_F(SpdyHttpStreamSpdy3Test, DelayedSendChunkedPost) { |
404 const char kUploadData1[] = "12345678"; | 404 const char kUploadData1[] = "12345678"; |
405 const int kUploadData1Size = arraysize(kUploadData1)-1; | 405 const int kUploadData1Size = arraysize(kUploadData1)-1; |
406 scoped_ptr<SpdyFrame> req(ConstructChunkedSpdyPost(NULL, 0)); | 406 scoped_ptr<SpdyFrame> req(ConstructChunkedSpdyPost(NULL, 0)); |
407 scoped_ptr<SpdyFrame> chunk1(ConstructSpdyBodyFrame(1, false)); | 407 scoped_ptr<SpdyFrame> chunk1(ConstructSpdyBodyFrame(1, false)); |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 data.RunFor(1); | 1032 data.RunFor(1); |
1033 sequenced_worker_pool->Shutdown(); | 1033 sequenced_worker_pool->Shutdown(); |
1034 } | 1034 } |
1035 | 1035 |
1036 #endif // !defined(USE_OPENSSL) | 1036 #endif // !defined(USE_OPENSSL) |
1037 | 1037 |
1038 // TODO(willchan): Write a longer test for SpdyStream that exercises all | 1038 // TODO(willchan): Write a longer test for SpdyStream that exercises all |
1039 // methods. | 1039 // methods. |
1040 | 1040 |
1041 } // namespace net | 1041 } // namespace net |
OLD | NEW |