Index: net/spdy/spdy_proxy_client_socket_unittest.cc |
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc |
index 1f9747d2f551d928832c573b63a6a29ababbd0b8..6bdbc663d6a3295e08c9c14b5938fa7cc6b153ea 100644 |
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc |
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc |
@@ -72,7 +72,7 @@ class SpdyProxyClientSocketTest |
void Initialize(MockRead* reads, size_t reads_count, MockWrite* writes, |
size_t writes_count); |
void PopulateConnectRequestIR(SpdySynStreamIR* syn_ir); |
- void PopulateConnectReplyIR(SpdySynReplyIR* reply_ir, const char* status); |
+ void PopulateConnectReplyIR(SpdyHeaderBlock* block, const char* status); |
SpdyFrame* ConstructConnectRequestFrame(); |
SpdyFrame* ConstructConnectAuthRequestFrame(); |
SpdyFrame* ConstructConnectReplyFrame(); |
@@ -320,10 +320,10 @@ void SpdyProxyClientSocketTest::PopulateConnectRequestIR( |
spdy_util_.MaybeAddVersionHeader(syn_ir); |
} |
-void SpdyProxyClientSocketTest::PopulateConnectReplyIR(SpdySynReplyIR* reply_ir, |
+void SpdyProxyClientSocketTest::PopulateConnectReplyIR(SpdyHeaderBlock* block, |
const char* status) { |
- reply_ir->SetHeader(spdy_util_.GetStatusKey(), status); |
- spdy_util_.MaybeAddVersionHeader(reply_ir); |
+ (*block)[spdy_util_.GetStatusKey()] = status; |
+ spdy_util_.MaybeAddVersionHeader(block); |
} |
// Constructs a standard SPDY SYN_STREAM frame for a CONNECT request. |
@@ -345,34 +345,35 @@ SpdyFrame* SpdyProxyClientSocketTest::ConstructConnectAuthRequestFrame() { |
// Constructs a standard SPDY SYN_REPLY frame to match the SPDY CONNECT. |
SpdyFrame* SpdyProxyClientSocketTest::ConstructConnectReplyFrame() { |
+ SpdyHeaderBlock block; |
+ PopulateConnectReplyIR(&block, "200"); |
SpdySynReplyIR reply_ir(kStreamId); |
- PopulateConnectReplyIR(&reply_ir, "200"); |
- return spdy_util_.CreateFramer(false)->SerializeFrame(reply_ir); |
+ return spdy_util_.ConstructSpdyReply(kStreamId, block); |
} |
// Constructs a standard SPDY SYN_REPLY frame to match the SPDY CONNECT, |
// including Proxy-Authenticate headers. |
SpdyFrame* SpdyProxyClientSocketTest::ConstructConnectAuthReplyFrame() { |
- SpdySynReplyIR reply_ir(kStreamId); |
- PopulateConnectReplyIR(&reply_ir, "407"); |
- reply_ir.SetHeader("proxy-authenticate", "Basic realm=\"MyRealm1\""); |
- return framer_.SerializeFrame(reply_ir); |
+ SpdyHeaderBlock block; |
+ PopulateConnectReplyIR(&block, "407"); |
+ block["proxy-authenticate"] = "Basic realm=\"MyRealm1\""; |
+ return spdy_util_.ConstructSpdyReply(kStreamId, block); |
} |
// Constructs a SPDY SYN_REPLY frame with an HTTP 302 redirect. |
SpdyFrame* SpdyProxyClientSocketTest::ConstructConnectRedirectReplyFrame() { |
- SpdySynReplyIR reply_ir(kStreamId); |
- PopulateConnectReplyIR(&reply_ir, "302"); |
- reply_ir.SetHeader("location", kRedirectUrl); |
- reply_ir.SetHeader("set-cookie", "foo=bar"); |
- return framer_.SerializeFrame(reply_ir); |
+ SpdyHeaderBlock block; |
+ PopulateConnectReplyIR(&block, "302"); |
+ block["location"] = kRedirectUrl; |
+ block["set-cookie"] = "foo=bar"; |
+ return spdy_util_.ConstructSpdyReply(kStreamId, block); |
} |
// Constructs a SPDY SYN_REPLY frame with an HTTP 500 error. |
SpdyFrame* SpdyProxyClientSocketTest::ConstructConnectErrorReplyFrame() { |
- SpdySynReplyIR reply_ir(kStreamId); |
- PopulateConnectReplyIR(&reply_ir, "500"); |
- return framer_.SerializeFrame(reply_ir); |
+ SpdyHeaderBlock block; |
+ PopulateConnectReplyIR(&block, "500"); |
+ return spdy_util_.ConstructSpdyReply(kStreamId, block); |
} |
SpdyFrame* SpdyProxyClientSocketTest::ConstructBodyFrame( |