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

Side by Side Diff: net/spdy/spdy_stream_unittest.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/spdy/spdy_session_unittest.cc ('k') | net/spdy/spdy_test_util_common.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <cstddef> 5 #include <cstddef>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 OrderedSocketData data(GetReads(), GetNumReads(), 179 OrderedSocketData data(GetReads(), GetNumReads(),
180 GetWrites(), GetNumWrites()); 180 GetWrites(), GetNumWrites());
181 MockConnect connect_data(SYNCHRONOUS, OK); 181 MockConnect connect_data(SYNCHRONOUS, OK);
182 data.set_connect_data(connect_data); 182 data.set_connect_data(connect_data);
183 183
184 session_deps_.socket_factory->AddSocketDataProvider(&data); 184 session_deps_.socket_factory->AddSocketDataProvider(&data);
185 185
186 base::WeakPtr<SpdySession> spdy_session(CreateDefaultSpdySession()); 186 base::WeakPtr<SpdySession> spdy_session(CreateDefaultSpdySession());
187 187
188 // Conjure up a stream. 188 // Conjure up a stream.
189 SpdyStream stream(SPDY_PUSH_STREAM, 189 SpdyStream stream(SPDY_PUSH_STREAM, spdy_session, GURL(), DEFAULT_PRIORITY,
190 spdy_session, 190 SpdySession::GetInitialWindowSize(kProtoSPDY31),
191 GURL(), 191 SpdySession::GetInitialWindowSize(kProtoSPDY31),
192 DEFAULT_PRIORITY,
193 kSpdyStreamInitialWindowSize,
194 kSpdyStreamInitialWindowSize,
195 BoundNetLog()); 192 BoundNetLog());
196 stream.set_stream_id(2); 193 stream.set_stream_id(2);
197 EXPECT_FALSE(stream.HasUrlFromHeaders()); 194 EXPECT_FALSE(stream.HasUrlFromHeaders());
198 195
199 // Set required request headers. 196 // Set required request headers.
200 SpdyHeaderBlock request_headers; 197 SpdyHeaderBlock request_headers;
201 spdy_util_.AddUrlToHeaderBlock(kStreamUrl, &request_headers); 198 spdy_util_.AddUrlToHeaderBlock(kStreamUrl, &request_headers);
202 stream.OnPushPromiseHeadersReceived(request_headers); 199 stream.OnPushPromiseHeadersReceived(request_headers);
203 200
204 // Send some basic response headers. 201 // Send some basic response headers.
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 data.RunFor(1); // FIN 1031 data.RunFor(1); // FIN
1035 1032
1036 EXPECT_EQ(ERR_CONNECTION_CLOSED, delegate.WaitForClose()); 1033 EXPECT_EQ(ERR_CONNECTION_CLOSED, delegate.WaitForClose());
1037 } 1034 }
1038 1035
1039 } // namespace 1036 } // namespace
1040 1037
1041 } // namespace test 1038 } // namespace test
1042 1039
1043 } // namespace net 1040 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_unittest.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698