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

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: Updated tests. 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
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..c789b6c750b1eeb11e1d2f2db6b593cc126a2d48 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;
@@ -173,14 +176,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 +330,15 @@ 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)));
Bence 2015/11/11 18:47:14 Why is (SPDY, kProtoHTTP2, true) not included here
Randy Smith (Not in Mondays) 2015/11/11 23:25:59 Actually, it not being there was me just spacing.
TEST_P(HttpProxyClientSocketPoolTest, NoTunnel) {
Initialize(NULL, 0, NULL, 0, NULL, 0, NULL, 0);

Powered by Google App Engine
This is Rietveld 408576698