Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: trunk/src/net/quic/quic_http_stream_test.cc

Issue 16374004: Revert 204046 "Land Recent QUIC changes." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/src/net/quic/quic_framer_test.cc ('k') | trunk/src/net/quic/quic_packet_creator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_http_stream.h" 5 #include "net/quic/quic_http_stream.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 stream_->ReadResponseBody(read_buffer_.get(), read_buffer_->size(), 521 stream_->ReadResponseBody(read_buffer_.get(), read_buffer_->size(),
522 callback_.callback())); 522 callback_.callback()));
523 523
524 EXPECT_TRUE(stream_->IsResponseBodyComplete()); 524 EXPECT_TRUE(stream_->IsResponseBodyComplete());
525 EXPECT_TRUE(AtEof()); 525 EXPECT_TRUE(AtEof());
526 } 526 }
527 527
528 TEST_F(QuicHttpStreamTest, DestroyedEarly) { 528 TEST_F(QuicHttpStreamTest, DestroyedEarly) {
529 SetRequestString("GET", "/"); 529 SetRequestString("GET", "/");
530 AddWrite(SYNCHRONOUS, ConstructDataPacket(1, true, kFin, 0, request_data_)); 530 AddWrite(SYNCHRONOUS, ConstructDataPacket(1, true, kFin, 0, request_data_));
531 AddWrite(SYNCHRONOUS, ConstructAckPacket(2, 2, 1)); 531 AddWrite(SYNCHRONOUS, ConstructRstPacket(2, 3));
532 AddWrite(SYNCHRONOUS, ConstructAckPacket(3, 2, 1));
532 use_closing_stream_ = true; 533 use_closing_stream_ = true;
533 Initialize(); 534 Initialize();
534 535
535 request_.method = "GET"; 536 request_.method = "GET";
536 request_.url = GURL("http://www.google.com/"); 537 request_.url = GURL("http://www.google.com/");
537 538
538 EXPECT_EQ(OK, stream_->InitializeStream(&request_, DEFAULT_PRIORITY, 539 EXPECT_EQ(OK, stream_->InitializeStream(&request_, DEFAULT_PRIORITY,
539 net_log_, callback_.callback())); 540 net_log_, callback_.callback()));
540 EXPECT_EQ(OK, stream_->SendRequest(headers_, &response_, 541 EXPECT_EQ(OK, stream_->SendRequest(headers_, &response_,
541 callback_.callback())); 542 callback_.callback()));
(...skipping 12 matching lines...) Expand all
554 555
555 // In the course of processing this packet, the QuicHttpStream close itself. 556 // In the course of processing this packet, the QuicHttpStream close itself.
556 ProcessPacket(*resp); 557 ProcessPacket(*resp);
557 558
558 EXPECT_TRUE(AtEof()); 559 EXPECT_TRUE(AtEof());
559 } 560 }
560 561
561 } // namespace test 562 } // namespace test
562 563
563 } // namespace net 564 } // namespace net
OLDNEW
« no previous file with comments | « trunk/src/net/quic/quic_framer_test.cc ('k') | trunk/src/net/quic/quic_packet_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698