Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(915)

Side by Side Diff: net/spdy/spdy_stream_unittest.cc

Issue 3197018: Refactor: change the spdy session pool key to take a ProxyServer instead of a stri... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_session_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_stream.h" 5 #include "net/spdy/spdy_stream.h"
6 #include "base/ref_counted.h" 6 #include "base/ref_counted.h"
7 #include "net/spdy/spdy_session.h" 7 #include "net/spdy/spdy_session.h"
8 #include "net/spdy/spdy_test_util.h" 8 #include "net/spdy/spdy_test_util.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } // anonymous namespace 112 } // anonymous namespace
113 113
114 class SpdyStreamTest : public testing::Test { 114 class SpdyStreamTest : public testing::Test {
115 protected: 115 protected:
116 SpdyStreamTest() { 116 SpdyStreamTest() {
117 } 117 }
118 118
119 scoped_refptr<SpdySession> CreateSpdySession() { 119 scoped_refptr<SpdySession> CreateSpdySession() {
120 spdy::SpdyFramer::set_enable_compression_default(false); 120 spdy::SpdyFramer::set_enable_compression_default(false);
121 HostPortPair host_port_pair("www.google.com", 80); 121 HostPortPair host_port_pair("www.google.com", 80);
122 HostPortProxyPair pair(host_port_pair, ""); 122 HostPortProxyPair pair(host_port_pair, ProxyServer::Direct());
123 scoped_refptr<SpdySession> session( 123 scoped_refptr<SpdySession> session(
124 session_->spdy_session_pool()->Get(pair, session_, BoundNetLog())); 124 session_->spdy_session_pool()->Get(pair, session_, BoundNetLog()));
125 return session; 125 return session;
126 } 126 }
127 127
128 virtual void TearDown() { 128 virtual void TearDown() {
129 MessageLoop::current()->RunAllPending(); 129 MessageLoop::current()->RunAllPending();
130 } 130 }
131 131
132 scoped_refptr<HttpNetworkSession> session_; 132 scoped_refptr<HttpNetworkSession> session_;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 EXPECT_TRUE(delegate->send_headers_completed()); 225 EXPECT_TRUE(delegate->send_headers_completed());
226 EXPECT_EQ("200", (*delegate->response())["status"]); 226 EXPECT_EQ("200", (*delegate->response())["status"]);
227 EXPECT_EQ("HTTP/1.1", (*delegate->response())["version"]); 227 EXPECT_EQ("HTTP/1.1", (*delegate->response())["version"]);
228 EXPECT_EQ(std::string("\0hello!\xff", 8), delegate->received_data()); 228 EXPECT_EQ(std::string("\0hello!\xff", 8), delegate->received_data());
229 EXPECT_EQ(8, delegate->data_sent()); 229 EXPECT_EQ(8, delegate->data_sent());
230 EXPECT_TRUE(delegate->closed()); 230 EXPECT_TRUE(delegate->closed());
231 } 231 }
232 232
233 } // namespace net 233 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698