Chromium Code Reviews

Unified Diff: net/spdy/spdy_proxy_client_socket_unittest.cc

Issue 357513003: Stop using SpdySynStreamIR for SPDY 4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WebSocket test fix. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6bdbc663d6a3295e08c9c14b5938fa7cc6b153ea..2e7a35f90bc6da8e2f125d6277d48c044023f9a0 100644
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -71,7 +71,7 @@ class SpdyProxyClientSocketTest
protected:
void Initialize(MockRead* reads, size_t reads_count, MockWrite* writes,
size_t writes_count);
- void PopulateConnectRequestIR(SpdySynStreamIR* syn_ir);
+ void PopulateConnectRequestIR(SpdyHeaderBlock* syn_ir);
void PopulateConnectReplyIR(SpdyHeaderBlock* block, const char* status);
SpdyFrame* ConstructConnectRequestFrame();
SpdyFrame* ConstructConnectAuthRequestFrame();
@@ -311,13 +311,12 @@ void SpdyProxyClientSocketTest::AssertAsyncWriteWithReadsSucceeds(
}
void SpdyProxyClientSocketTest::PopulateConnectRequestIR(
- SpdySynStreamIR* syn_ir) {
- spdy_util_.SetPriority(LOWEST, syn_ir);
- syn_ir->SetHeader(spdy_util_.GetMethodKey(), "CONNECT");
- syn_ir->SetHeader(spdy_util_.GetPathKey(), kOriginHostPort);
- syn_ir->SetHeader(spdy_util_.GetHostKey(), kOriginHost);
- syn_ir->SetHeader("user-agent", kUserAgent);
- spdy_util_.MaybeAddVersionHeader(syn_ir);
+ SpdyHeaderBlock* block) {
+ (*block)[spdy_util_.GetMethodKey()] = "CONNECT";
+ (*block)[spdy_util_.GetPathKey()] = kOriginHostPort;
+ (*block)[spdy_util_.GetHostKey()] = kOriginHost;
+ (*block)["user-agent"] = kUserAgent;
+ spdy_util_.MaybeAddVersionHeader(block);
}
void SpdyProxyClientSocketTest::PopulateConnectReplyIR(SpdyHeaderBlock* block,
@@ -329,18 +328,18 @@ void SpdyProxyClientSocketTest::PopulateConnectReplyIR(SpdyHeaderBlock* block,
// Constructs a standard SPDY SYN_STREAM frame for a CONNECT request.
SpdyFrame*
SpdyProxyClientSocketTest::ConstructConnectRequestFrame() {
- SpdySynStreamIR syn_ir(kStreamId);
- PopulateConnectRequestIR(&syn_ir);
- return spdy_util_.CreateFramer(false)->SerializeFrame(syn_ir);
+ SpdyHeaderBlock block;
+ PopulateConnectRequestIR(&block);
+ return spdy_util_.ConstructSpdySyn(kStreamId, block, LOWEST, false, false);
}
// Constructs a SPDY SYN_STREAM frame for a CONNECT request which includes
// Proxy-Authorization headers.
SpdyFrame* SpdyProxyClientSocketTest::ConstructConnectAuthRequestFrame() {
- SpdySynStreamIR syn_ir(kStreamId);
- PopulateConnectRequestIR(&syn_ir);
- syn_ir.SetHeader("proxy-authorization", "Basic Zm9vOmJhcg==");
- return spdy_util_.CreateFramer(false)->SerializeFrame(syn_ir);
+ SpdyHeaderBlock block;
+ PopulateConnectRequestIR(&block);
+ block["proxy-authorization"] = "Basic Zm9vOmJhcg==";
+ return spdy_util_.ConstructSpdySyn(kStreamId, block, LOWEST, false, false);
}
// Constructs a standard SPDY SYN_REPLY frame to match the SPDY CONNECT.
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine