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 "crypto/ec_private_key.h" | 7 #include "crypto/ec_private_key.h" |
8 #include "crypto/ec_signature_creator.h" | 8 #include "crypto/ec_signature_creator.h" |
9 #include "crypto/signature_creator.h" | 9 #include "crypto/signature_creator.h" |
10 #include "net/base/asn1_util.h" | 10 #include "net/base/asn1_util.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 ASSERT_EQ( | 220 ASSERT_EQ( |
221 OK, | 221 OK, |
222 http_stream->InitializeStream(&request, net_log, CompletionCallback())); | 222 http_stream->InitializeStream(&request, net_log, CompletionCallback())); |
223 | 223 |
224 EXPECT_EQ(ERR_IO_PENDING, http_stream->SendRequest(headers, NULL, &response, | 224 EXPECT_EQ(ERR_IO_PENDING, http_stream->SendRequest(headers, NULL, &response, |
225 callback.callback())); | 225 callback.callback())); |
226 | 226 |
227 spdy::SpdyHeaderBlock* spdy_header = | 227 spdy::SpdyHeaderBlock* spdy_header = |
228 http_stream->stream()->spdy_headers().get(); | 228 http_stream->stream()->spdy_headers().get(); |
229 EXPECT_TRUE(spdy_header != NULL); | 229 EXPECT_TRUE(spdy_header != NULL); |
230 if (spdy_header->find("url") != spdy_header->end()) | 230 if (spdy_header->find(":path") != spdy_header->end()) |
231 EXPECT_EQ("/foo?query=what", spdy_header->find("url")->second); | 231 EXPECT_EQ("/foo?query=what", spdy_header->find(":path")->second); |
232 else | 232 else |
233 FAIL() << "No url is set in spdy_header!"; | 233 FAIL() << "No url is set in spdy_header!"; |
234 | 234 |
235 // This triggers the MockWrite and read 2 | 235 // This triggers the MockWrite and read 2 |
236 callback.WaitForResult(); | 236 callback.WaitForResult(); |
237 | 237 |
238 // This triggers read 3. The empty read causes the session to shut down. | 238 // This triggers read 3. The empty read causes the session to shut down. |
239 data()->CompleteRead(); | 239 data()->CompleteRead(); |
240 | 240 |
241 // Because we abandoned the stream, we don't expect to find a session in the | 241 // Because we abandoned the stream, we don't expect to find a session in the |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 | 467 |
468 TestSendCredentials(obc_service.get(), cert, proof, CLIENT_CERT_ECDSA_SIGN); | 468 TestSendCredentials(obc_service.get(), cert, proof, CLIENT_CERT_ECDSA_SIGN); |
469 } | 469 } |
470 | 470 |
471 #endif // !defined(USE_OPENSSL) | 471 #endif // !defined(USE_OPENSSL) |
472 | 472 |
473 // TODO(willchan): Write a longer test for SpdyStream that exercises all | 473 // TODO(willchan): Write a longer test for SpdyStream that exercises all |
474 // methods. | 474 // methods. |
475 | 475 |
476 } // namespace net | 476 } // namespace net |
OLD | NEW |