| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |