OLD | NEW |
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/spdy/spdy_http_stream.h" | 5 #include "net/spdy/spdy_http_stream.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 MockRead reads[] = { | 179 MockRead reads[] = { |
180 MockRead(ASYNC, 0, 0) // EOF | 180 MockRead(ASYNC, 0, 0) // EOF |
181 }; | 181 }; |
182 | 182 |
183 HostPortPair host_port_pair("www.google.com", 80); | 183 HostPortPair host_port_pair("www.google.com", 80); |
184 SpdySessionKey key(host_port_pair, ProxyServer::Direct(), | 184 SpdySessionKey key(host_port_pair, ProxyServer::Direct(), |
185 kPrivacyModeDisabled); | 185 kPrivacyModeDisabled); |
186 EXPECT_EQ(OK, InitSession(reads, arraysize(reads), NULL, 0, host_port_pair)); | 186 EXPECT_EQ(OK, InitSession(reads, arraysize(reads), NULL, 0, host_port_pair)); |
187 | 187 |
188 SpdyHttpStream stream(session_, false); | 188 SpdyHttpStream stream(session_.get(), false); |
189 UploadProgress progress = stream.GetUploadProgress(); | 189 UploadProgress progress = stream.GetUploadProgress(); |
190 EXPECT_EQ(0u, progress.size()); | 190 EXPECT_EQ(0u, progress.size()); |
191 EXPECT_EQ(0u, progress.position()); | 191 EXPECT_EQ(0u, progress.position()); |
192 } | 192 } |
193 | 193 |
194 TEST_P(SpdyHttpStreamTest, SendRequest) { | 194 TEST_P(SpdyHttpStreamTest, SendRequest) { |
195 if (GetParam() > kProtoSPDY3) | 195 if (GetParam() > kProtoSPDY3) |
196 return; | 196 return; |
197 | 197 |
198 scoped_ptr<SpdyFrame> req( | 198 scoped_ptr<SpdyFrame> req( |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 data.RunFor(1); | 1056 data.RunFor(1); |
1057 sequenced_worker_pool->Shutdown(); | 1057 sequenced_worker_pool->Shutdown(); |
1058 } | 1058 } |
1059 | 1059 |
1060 #endif // !defined(USE_OPENSSL) | 1060 #endif // !defined(USE_OPENSSL) |
1061 | 1061 |
1062 // TODO(willchan): Write a longer test for SpdyStream that exercises all | 1062 // TODO(willchan): Write a longer test for SpdyStream that exercises all |
1063 // methods. | 1063 // methods. |
1064 | 1064 |
1065 } // namespace net | 1065 } // namespace net |
OLD | NEW |