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

Side by Side Diff: net/http/http_proxy_client_socket_pool_unittest.cc

Issue 710713002: Remove SPDY2 and SPDY/3.0 from tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
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/http/http_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 24 matching lines...) Expand all
35 35
36 enum HttpProxyType { 36 enum HttpProxyType {
37 HTTP, 37 HTTP,
38 HTTPS, 38 HTTPS,
39 SPDY 39 SPDY
40 }; 40 };
41 41
42 struct HttpProxyClientSocketPoolTestParams { 42 struct HttpProxyClientSocketPoolTestParams {
43 HttpProxyClientSocketPoolTestParams() 43 HttpProxyClientSocketPoolTestParams()
44 : proxy_type(HTTP), 44 : proxy_type(HTTP),
45 protocol(kProtoSPDY3) {} 45 protocol(kProtoSPDY31) {}
46 46
47 HttpProxyClientSocketPoolTestParams( 47 HttpProxyClientSocketPoolTestParams(
48 HttpProxyType proxy_type, 48 HttpProxyType proxy_type,
49 NextProto protocol) 49 NextProto protocol)
50 : proxy_type(proxy_type), 50 : proxy_type(proxy_type),
51 protocol(protocol) {} 51 protocol(protocol) {}
52 52
53 HttpProxyType proxy_type; 53 HttpProxyType proxy_type;
54 NextProto protocol; 54 NextProto protocol;
55 }; 55 };
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 //----------------------------------------------------------------------------- 335 //-----------------------------------------------------------------------------
336 // All tests are run with three different proxy types: HTTP, HTTPS (non-SPDY) 336 // All tests are run with three different proxy types: HTTP, HTTPS (non-SPDY)
337 // and SPDY. 337 // and SPDY.
338 // 338 //
339 // TODO(akalin): Use ::testing::Combine() when we are able to use 339 // TODO(akalin): Use ::testing::Combine() when we are able to use
340 // <tr1/tuple>. 340 // <tr1/tuple>.
341 INSTANTIATE_TEST_CASE_P( 341 INSTANTIATE_TEST_CASE_P(
342 HttpProxyClientSocketPoolTests, 342 HttpProxyClientSocketPoolTests,
343 HttpProxyClientSocketPoolTest, 343 HttpProxyClientSocketPoolTest,
344 ::testing::Values( 344 ::testing::Values(
345 HttpProxyClientSocketPoolTestParams(HTTP, kProtoDeprecatedSPDY2),
346 HttpProxyClientSocketPoolTestParams(HTTPS, kProtoDeprecatedSPDY2),
347 HttpProxyClientSocketPoolTestParams(SPDY, kProtoDeprecatedSPDY2),
348 HttpProxyClientSocketPoolTestParams(HTTP, kProtoSPDY3),
349 HttpProxyClientSocketPoolTestParams(HTTPS, kProtoSPDY3),
350 HttpProxyClientSocketPoolTestParams(SPDY, kProtoSPDY3),
351 HttpProxyClientSocketPoolTestParams(HTTP, kProtoSPDY31), 345 HttpProxyClientSocketPoolTestParams(HTTP, kProtoSPDY31),
352 HttpProxyClientSocketPoolTestParams(HTTPS, kProtoSPDY31), 346 HttpProxyClientSocketPoolTestParams(HTTPS, kProtoSPDY31),
353 HttpProxyClientSocketPoolTestParams(SPDY, kProtoSPDY31), 347 HttpProxyClientSocketPoolTestParams(SPDY, kProtoSPDY31),
354 HttpProxyClientSocketPoolTestParams(HTTP, kProtoSPDY4), 348 HttpProxyClientSocketPoolTestParams(HTTP, kProtoSPDY4),
355 HttpProxyClientSocketPoolTestParams(HTTPS, kProtoSPDY4), 349 HttpProxyClientSocketPoolTestParams(HTTPS, kProtoSPDY4),
356 HttpProxyClientSocketPoolTestParams(SPDY, kProtoSPDY4))); 350 HttpProxyClientSocketPoolTestParams(SPDY, kProtoSPDY4)));
357 351
358 TEST_P(HttpProxyClientSocketPoolTest, NoTunnel) { 352 TEST_P(HttpProxyClientSocketPoolTest, NoTunnel) {
359 Initialize(NULL, 0, NULL, 0, NULL, 0, NULL, 0); 353 Initialize(NULL, 0, NULL, 0, NULL, 0, NULL, 0);
360 354
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 EXPECT_TRUE(headers->IsRedirect(&location)); 838 EXPECT_TRUE(headers->IsRedirect(&location));
845 EXPECT_EQ(location, redirectTarget); 839 EXPECT_EQ(location, redirectTarget);
846 } 840 }
847 } 841 }
848 842
849 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. 843 // It would be nice to also test the timeouts in HttpProxyClientSocketPool.
850 844
851 } // namespace 845 } // namespace
852 846
853 } // namespace net 847 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698