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

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

Issue 1779733003: Fix bug in net::RequestPriority -> HTTP/2 dependency conversion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make bi-directional stream unittests enable priority->dependency setting. Created 4 years, 9 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
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/spdy/spdy_session.h » ('j') | 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) 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_proxy_client_socket.h" 5 #include "net/spdy/spdy_proxy_client_socket.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 framer_(spdy_util_.spdy_version()), 172 framer_(spdy_util_.spdy_version()),
173 user_agent_(kUserAgent), 173 user_agent_(kUserAgent),
174 url_(kRequestUrl), 174 url_(kRequestUrl),
175 proxy_host_port_(kProxyHost, kProxyPort), 175 proxy_host_port_(kProxyHost, kProxyPort),
176 endpoint_host_port_pair_(kOriginHost, kOriginPort), 176 endpoint_host_port_pair_(kOriginHost, kOriginPort),
177 proxy_(ProxyServer::SCHEME_HTTPS, proxy_host_port_), 177 proxy_(ProxyServer::SCHEME_HTTPS, proxy_host_port_),
178 endpoint_spdy_session_key_(endpoint_host_port_pair_, 178 endpoint_spdy_session_key_(endpoint_host_port_pair_,
179 proxy_, 179 proxy_,
180 PRIVACY_MODE_DISABLED) { 180 PRIVACY_MODE_DISABLED) {
181 session_deps_.net_log = net_log_.bound().net_log(); 181 session_deps_.net_log = net_log_.bound().net_log();
182 SpdySession::SetPriorityDependencyDefaultForTesting( 182 session_deps_.enable_priority_dependencies = GetDependenciesFromPriority();
183 GetDependenciesFromPriority());
184 } 183 }
185 184
186 SpdyProxyClientSocketTest::~SpdyProxyClientSocketTest() { 185 SpdyProxyClientSocketTest::~SpdyProxyClientSocketTest() {
187 EXPECT_TRUE(data_->AllWriteDataConsumed()); 186 EXPECT_TRUE(data_->AllWriteDataConsumed());
188 EXPECT_TRUE(data_->AllReadDataConsumed()); 187 EXPECT_TRUE(data_->AllReadDataConsumed());
189 SpdySession::SetPriorityDependencyDefaultForTesting(false);
190 } 188 }
191 189
192 void SpdyProxyClientSocketTest::TearDown() { 190 void SpdyProxyClientSocketTest::TearDown() {
193 if (session_.get() != NULL) 191 if (session_.get() != NULL)
194 session_->spdy_session_pool()->CloseAllSessions(); 192 session_->spdy_session_pool()->CloseAllSessions();
195 193
196 // Empty the current queue. 194 // Empty the current queue.
197 base::MessageLoop::current()->RunUntilIdle(); 195 base::MessageLoop::current()->RunUntilIdle();
198 PlatformTest::TearDown(); 196 PlatformTest::TearDown();
199 } 197 }
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 1379
1382 EXPECT_FALSE(sock_.get()); 1380 EXPECT_FALSE(sock_.get());
1383 EXPECT_TRUE(read_callback.have_result()); 1381 EXPECT_TRUE(read_callback.have_result());
1384 EXPECT_FALSE(write_callback_.have_result()); 1382 EXPECT_FALSE(write_callback_.have_result());
1385 1383
1386 // Let the RST_STREAM write while |rst| is in-scope. 1384 // Let the RST_STREAM write while |rst| is in-scope.
1387 base::MessageLoop::current()->RunUntilIdle(); 1385 base::MessageLoop::current()->RunUntilIdle();
1388 } 1386 }
1389 1387
1390 } // namespace net 1388 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698