Index: net/http/http_network_transaction_unittest.cc |
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc |
index 3b15926e75f80073e5fd185847cf6dca8ba1e07f..6a7da00b69694f0640ff18f5cd2716c06cae367e 100644 |
--- a/net/http/http_network_transaction_unittest.cc |
+++ b/net/http/http_network_transaction_unittest.cc |
@@ -3485,14 +3485,13 @@ TEST_P(HttpNetworkTransactionTest, |
spdy_util_.ConstructSpdyWindowUpdate(1, wrapped_get_resp1->size())); |
// CONNECT to news.google.com:443 via SPDY. |
- SpdySynStreamIR connect2_ir(3); |
- spdy_util_.SetPriority(LOWEST, &connect2_ir); |
- connect2_ir.SetHeader(spdy_util_.GetMethodKey(), "CONNECT"); |
- connect2_ir.SetHeader(spdy_util_.GetPathKey(), "news.google.com:443"); |
- connect2_ir.SetHeader(spdy_util_.GetHostKey(), "news.google.com"); |
- spdy_util_.MaybeAddVersionHeader(&connect2_ir); |
+ SpdyHeaderBlock connect2_block; |
+ connect2_block[spdy_util_.GetMethodKey()] = "CONNECT"; |
+ connect2_block[spdy_util_.GetPathKey()] = "news.google.com:443"; |
+ connect2_block[spdy_util_.GetHostKey()] = "news.google.com"; |
+ spdy_util_.MaybeAddVersionHeader(&connect2_block); |
scoped_ptr<SpdyFrame> connect2( |
- spdy_util_.CreateFramer(false)->SerializeFrame(connect2_ir)); |
+ spdy_util_.ConstructSpdySyn(3, connect2_block, LOWEST, false, false)); |
scoped_ptr<SpdyFrame> conn_resp2( |
spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3)); |
@@ -3748,8 +3747,8 @@ TEST_P(HttpNetworkTransactionTest, |
// http://www.google.com/ |
scoped_ptr<SpdyHeaderBlock> headers( |
spdy_util_.ConstructGetHeaderBlockForProxy("http://www.google.com/")); |
- scoped_ptr<SpdyFrame> get1(spdy_util_.ConstructSpdyControlFrame( |
- headers.Pass(), false, 1, LOWEST, SYN_STREAM, CONTROL_FLAG_FIN, 0)); |
+ scoped_ptr<SpdyFrame> get1( |
+ spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, false, true)); |
scoped_ptr<SpdyFrame> get_resp1( |
spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1)); |
scoped_ptr<SpdyFrame> body1( |
@@ -3758,8 +3757,8 @@ TEST_P(HttpNetworkTransactionTest, |
// http://news.google.com/ |
scoped_ptr<SpdyHeaderBlock> headers2( |
spdy_util_.ConstructGetHeaderBlockForProxy("http://news.google.com/")); |
- scoped_ptr<SpdyFrame> get2(spdy_util_.ConstructSpdyControlFrame( |
- headers2.Pass(), false, 3, LOWEST, SYN_STREAM, CONTROL_FLAG_FIN, 0)); |
+ scoped_ptr<SpdyFrame> get2( |
+ spdy_util_.ConstructSpdySyn(3, *headers2, LOWEST, false, true)); |
scoped_ptr<SpdyFrame> get_resp2( |
spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3)); |
scoped_ptr<SpdyFrame> body2( |
@@ -11370,17 +11369,15 @@ TEST_P(HttpNetworkTransactionTest, DoNotUseSpdySessionForHttpOverTunnel) { |
spdy_util_.ConstructWrappedSpdyFrame(req1, 1)); |
// SPDY GET for HTTP URL (through the proxy, but not the tunnel). |
- SpdySynStreamIR req2_ir(3); |
- spdy_util_.SetPriority(MEDIUM, &req2_ir); |
- req2_ir.set_fin(true); |
- req2_ir.SetHeader(spdy_util_.GetMethodKey(), "GET"); |
- req2_ir.SetHeader(spdy_util_.GetPathKey(), |
- spdy_util_.is_spdy2() ? http_url.c_str() : "/"); |
- req2_ir.SetHeader(spdy_util_.GetHostKey(), "www.google.com:443"); |
- req2_ir.SetHeader(spdy_util_.GetSchemeKey(), "http"); |
- spdy_util_.MaybeAddVersionHeader(&req2_ir); |
+ SpdyHeaderBlock req2_block; |
+ req2_block[spdy_util_.GetMethodKey()] = "GET"; |
+ req2_block[spdy_util_.GetPathKey()] = |
+ spdy_util_.is_spdy2() ? http_url.c_str() : "/"; |
+ req2_block[spdy_util_.GetHostKey()] = "www.google.com:443"; |
+ req2_block[spdy_util_.GetSchemeKey()] = "http"; |
+ spdy_util_.MaybeAddVersionHeader(&req2_block); |
scoped_ptr<SpdyFrame> req2( |
- spdy_util_.CreateFramer(false)->SerializeFrame(req2_ir)); |
+ spdy_util_.ConstructSpdySyn(3, req2_block, MEDIUM, false, true)); |
MockWrite writes1[] = { |
CreateMockWrite(*connect, 0), |
@@ -11551,8 +11548,8 @@ TEST_P(HttpNetworkTransactionTest, DoNotUseSpdySessionIfCertDoesNotMatch) { |
// SPDY GET for HTTP URL (through SPDY proxy) |
scoped_ptr<SpdyHeaderBlock> headers( |
spdy_util_.ConstructGetHeaderBlockForProxy("http://www.google.com/")); |
- scoped_ptr<SpdyFrame> req1(spdy_util_.ConstructSpdyControlFrame( |
- headers.Pass(), false, 1, LOWEST, SYN_STREAM, CONTROL_FLAG_FIN, 0)); |
+ scoped_ptr<SpdyFrame> req1( |
+ spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, false, true)); |
MockWrite writes1[] = { |
CreateMockWrite(*req1, 0), |