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

Unified Diff: net/http/http_proxy_client_socket_pool_unittest.cc

Issue 1411383005: Initial implementation of RequestPriority-based HTTP/2 dependencies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final round of comments. Created 5 years, 1 month 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_unittest.cc ('k') | net/spdy/spdy_http_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_proxy_client_socket_pool_unittest.cc
diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc
index bcc6299db849021e1e70b8afc4e0134a1aa34039..f2f04198528075dcf6f4104c17640ce5a2c41f73 100644
--- a/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -41,16 +41,19 @@ enum HttpProxyType {
struct HttpProxyClientSocketPoolTestParams {
HttpProxyClientSocketPoolTestParams()
: proxy_type(HTTP),
- protocol(kProtoSPDY31) {}
+ protocol(kProtoSPDY31),
+ priority_to_dependency(false) {}
- HttpProxyClientSocketPoolTestParams(
- HttpProxyType proxy_type,
- NextProto protocol)
+ HttpProxyClientSocketPoolTestParams(HttpProxyType proxy_type,
+ NextProto protocol,
+ bool priority_to_dependency)
: proxy_type(proxy_type),
- protocol(protocol) {}
+ protocol(protocol),
+ priority_to_dependency(priority_to_dependency) {}
HttpProxyType proxy_type;
NextProto protocol;
+ bool priority_to_dependency;
};
typedef ::testing::TestWithParam<HttpProxyType> TestWithHttpParam;
@@ -149,6 +152,7 @@ class TestProxyDelegate : public ProxyDelegate {
std::string on_tunnel_headers_received_status_line_;
};
+} // namespace
class HttpProxyClientSocketPoolTest
: public ::testing::TestWithParam<HttpProxyClientSocketPoolTestParams> {
@@ -173,14 +177,18 @@ class HttpProxyClientSocketPoolTest
session_deps_.ssl_config_service.get(),
BoundNetLog().net_log()),
session_(CreateNetworkSession()),
- spdy_util_(GetParam().protocol),
+ spdy_util_(GetParam().protocol, GetParam().priority_to_dependency),
pool_(kMaxSockets,
kMaxSocketsPerGroup,
&transport_socket_pool_,
&ssl_socket_pool_,
- NULL) {}
+ NULL) {
+ SpdySession::SetPriorityDependencyDefaultForTesting(
+ GetParam().priority_to_dependency);
+ }
virtual ~HttpProxyClientSocketPoolTest() {
+ SpdySession::SetPriorityDependencyDefaultForTesting(false);
}
void AddAuthToCache() {
@@ -323,12 +331,16 @@ class HttpProxyClientSocketPoolTest
INSTANTIATE_TEST_CASE_P(
HttpProxyClientSocketPoolTests,
HttpProxyClientSocketPoolTest,
- ::testing::Values(HttpProxyClientSocketPoolTestParams(HTTP, kProtoSPDY31),
- HttpProxyClientSocketPoolTestParams(HTTPS, kProtoSPDY31),
- HttpProxyClientSocketPoolTestParams(SPDY, kProtoSPDY31),
- HttpProxyClientSocketPoolTestParams(HTTP, kProtoHTTP2),
- HttpProxyClientSocketPoolTestParams(HTTPS, kProtoHTTP2),
- HttpProxyClientSocketPoolTestParams(SPDY, kProtoHTTP2)));
+ ::testing::Values(
+ HttpProxyClientSocketPoolTestParams(HTTP, kProtoSPDY31, false),
+ HttpProxyClientSocketPoolTestParams(HTTPS, kProtoSPDY31, false),
+ HttpProxyClientSocketPoolTestParams(SPDY, kProtoSPDY31, false),
+ HttpProxyClientSocketPoolTestParams(HTTP, kProtoHTTP2, false),
+ HttpProxyClientSocketPoolTestParams(HTTP, kProtoHTTP2, true),
+ HttpProxyClientSocketPoolTestParams(HTTPS, kProtoHTTP2, false),
+ HttpProxyClientSocketPoolTestParams(HTTPS, kProtoHTTP2, true),
+ HttpProxyClientSocketPoolTestParams(SPDY, kProtoHTTP2, false),
+ HttpProxyClientSocketPoolTestParams(SPDY, kProtoHTTP2, true)));
TEST_P(HttpProxyClientSocketPoolTest, NoTunnel) {
Initialize(NULL, 0, NULL, 0, NULL, 0, NULL, 0);
@@ -812,6 +824,4 @@ TEST_P(HttpProxyClientSocketPoolTest, TunnelSetupRedirect) {
// It would be nice to also test the timeouts in HttpProxyClientSocketPool.
-} // namespace
-
} // namespace net
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/spdy/spdy_http_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698