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

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

Issue 242593002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Use uint32 instead of int Created 6 years, 8 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 | « net/quic/quic_http_stream_test.cc ('k') | 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 <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); 131 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
132 // Empty the current queue. 132 // Empty the current queue.
133 base::MessageLoop::current()->RunUntilIdle(); 133 base::MessageLoop::current()->RunUntilIdle();
134 PlatformTest::TearDown(); 134 PlatformTest::TearDown();
135 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); 135 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
136 base::MessageLoop::current()->RunUntilIdle(); 136 base::MessageLoop::current()->RunUntilIdle();
137 HttpStreamFactory::set_use_alternate_protocols(false); 137 HttpStreamFactory::set_use_alternate_protocols(false);
138 HttpStreamFactory::SetNextProtos(std::vector<NextProto>()); 138 HttpStreamFactory::SetNextProtos(std::vector<NextProto>());
139 } 139 }
140 140
141 scoped_ptr<QuicEncryptedPacket> ConstructRstPacket(
142 QuicPacketSequenceNumber num,
143 QuicStreamId stream_id) {
144 return maker_.MakeRstPacket(
145 num, false, stream_id, QUIC_STREAM_NO_ERROR);
146 }
147
148 scoped_ptr<QuicEncryptedPacket> ConstructConnectionClosePacket( 141 scoped_ptr<QuicEncryptedPacket> ConstructConnectionClosePacket(
149 QuicPacketSequenceNumber num) { 142 QuicPacketSequenceNumber num) {
150 return maker_.MakeConnectionClosePacket(num); 143 return maker_.MakeConnectionClosePacket(num);
151 } 144 }
152 145
153 scoped_ptr<QuicEncryptedPacket> ConstructAckPacket( 146 scoped_ptr<QuicEncryptedPacket> ConstructAckPacket(
154 QuicPacketSequenceNumber largest_received, 147 QuicPacketSequenceNumber largest_received,
155 QuicPacketSequenceNumber least_unacked) { 148 QuicPacketSequenceNumber least_unacked) {
156 return maker_.MakeAckPacket(2, largest_received, least_unacked, true); 149 return maker_.MakeAckPacket(2, largest_received, least_unacked, true);
157 } 150 }
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 NULL, 864 NULL,
872 net_log_.bound()); 865 net_log_.bound());
873 866
874 CreateSession(); 867 CreateSession();
875 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); 868 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
876 SendRequestAndExpectHttpResponse("hello world"); 869 SendRequestAndExpectHttpResponse("hello world");
877 } 870 }
878 871
879 } // namespace test 872 } // namespace test
880 } // namespace net 873 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_http_stream_test.cc ('k') | net/quic/quic_packet_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698