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

Unified Diff: net/http/http_pipelined_network_transaction_unittest.cc

Issue 9764003: Increase number of max sockets per group for WebSocket connections. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_network_transaction_spdy3_unittest.cc ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_pipelined_network_transaction_unittest.cc
diff --git a/net/http/http_pipelined_network_transaction_unittest.cc b/net/http/http_pipelined_network_transaction_unittest.cc
index 7ba24cc67e630507df66eb277415f2bda2268477..27ca29569d3af06ffd42a4d894cbcad78b265315 100644
--- a/net/http/http_pipelined_network_transaction_unittest.cc
+++ b/net/http/http_pipelined_network_transaction_unittest.cc
@@ -25,6 +25,7 @@
#include "net/proxy/proxy_service.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/client_socket_pool_histograms.h"
+#include "net/socket/client_socket_pool_manager.h"
#include "net/socket/socket_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -279,8 +280,10 @@ TEST_F(HttpPipelinedNetworkTransactionTest, ReusePipeline) {
}
TEST_F(HttpPipelinedNetworkTransactionTest, ReusesOnSpaceAvailable) {
- int old_max_sockets = ClientSocketPoolManager::max_sockets_per_group();
- ClientSocketPoolManager::set_max_sockets_per_group(1);
+ int old_max_sockets = ClientSocketPoolManager::max_sockets_per_group(
+ HttpNetworkSession::NORMAL_SOCKET_POOL);
+ ClientSocketPoolManager::set_max_sockets_per_group(
+ HttpNetworkSession::NORMAL_SOCKET_POOL, 1);
Initialize(false);
MockWrite writes[] = {
@@ -315,7 +318,8 @@ TEST_F(HttpPipelinedNetworkTransactionTest, ReusesOnSpaceAvailable) {
CompleteFourRequests();
- ClientSocketPoolManager::set_max_sockets_per_group(old_max_sockets);
+ ClientSocketPoolManager::set_max_sockets_per_group(
+ HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_sockets);
}
TEST_F(HttpPipelinedNetworkTransactionTest, UnknownSizeEvictsToNewPipeline) {
@@ -617,8 +621,10 @@ TEST_F(HttpPipelinedNetworkTransactionTest, PipelinesImmediatelyIfKnownGood) {
// 3rd request completes, we know pipelining is safe. After the first 4
// complete, the 5th and 6th should then be immediately sent pipelined on a
// new HttpPipelinedConnection.
- int old_max_sockets = ClientSocketPoolManager::max_sockets_per_group();
- ClientSocketPoolManager::set_max_sockets_per_group(1);
+ int old_max_sockets = ClientSocketPoolManager::max_sockets_per_group(
+ HttpNetworkSession::NORMAL_SOCKET_POOL);
+ ClientSocketPoolManager::set_max_sockets_per_group(
+ HttpNetworkSession::NORMAL_SOCKET_POOL, 1);
Initialize(false);
MockWrite writes[] = {
@@ -689,7 +695,8 @@ TEST_F(HttpPipelinedNetworkTransactionTest, PipelinesImmediatelyIfKnownGood) {
ExpectResponse("second-pipeline-two.html", second_two_transaction,
SYNCHRONOUS);
- ClientSocketPoolManager::set_max_sockets_per_group(old_max_sockets);
+ ClientSocketPoolManager::set_max_sockets_per_group(
+ HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_sockets);
}
class DataRunnerObserver : public MessageLoop::TaskObserver {
« no previous file with comments | « net/http/http_network_transaction_spdy3_unittest.cc ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698