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

Side by Side Diff: net/quic/quic_stream_sequencer_test.cc

Issue 1227353005: Cleanup changes: Rename QuicSession::MarkWriteBlocked to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/reliable_quic_stream.cc » ('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_stream_sequencer.h" 5 #include "net/quic/quic_stream_sequencer.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 bool VerifyIovec(const iovec& iovec, StringPiece expected) { 93 bool VerifyIovec(const iovec& iovec, StringPiece expected) {
94 if (iovec.iov_len != expected.length()) { 94 if (iovec.iov_len != expected.length()) {
95 LOG(ERROR) << "Invalid length: " << iovec.iov_len 95 LOG(ERROR) << "Invalid length: " << iovec.iov_len
96 << " vs " << expected.length(); 96 << " vs " << expected.length();
97 return false; 97 return false;
98 } 98 }
99 if (memcmp(iovec.iov_base, expected.data(), expected.length()) != 0) { 99 if (memcmp(iovec.iov_base, expected.data(), expected.length()) != 0) {
100 LOG(ERROR) << "Invalid data: " << static_cast<char*>(iovec.iov_base) 100 LOG(ERROR) << "Invalid data: " << static_cast<char*>(iovec.iov_base)
101 << " vs " << expected.data(); 101 << " vs " << expected;
102 return false; 102 return false;
103 } 103 }
104 return true; 104 return true;
105 } 105 }
106 106
107 void OnFinFrame(QuicStreamOffset byte_offset, const char* data) { 107 void OnFinFrame(QuicStreamOffset byte_offset, const char* data) {
108 QuicStreamFrame frame; 108 QuicStreamFrame frame;
109 frame.stream_id = 1; 109 frame.stream_id = 1;
110 frame.offset = byte_offset; 110 frame.offset = byte_offset;
111 frame.data = StringPiece(data); 111 frame.data = StringPiece(data);
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 QuicStreamFrame frame2(kClientDataStreamId1, false, 2, StringPiece("hello")); 506 QuicStreamFrame frame2(kClientDataStreamId1, false, 2, StringPiece("hello"));
507 EXPECT_TRUE(FrameOverlapsBufferedData(frame2)); 507 EXPECT_TRUE(FrameOverlapsBufferedData(frame2));
508 EXPECT_CALL(stream_, CloseConnectionWithDetails(QUIC_INVALID_STREAM_FRAME, _)) 508 EXPECT_CALL(stream_, CloseConnectionWithDetails(QUIC_INVALID_STREAM_FRAME, _))
509 .Times(1); 509 .Times(1);
510 sequencer_->OnStreamFrame(frame2); 510 sequencer_->OnStreamFrame(frame2);
511 } 511 }
512 512
513 } // namespace 513 } // namespace
514 } // namespace test 514 } // namespace test
515 } // namespace net 515 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/reliable_quic_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698