| OLD | NEW |
| 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 const char kRequestUrl[] = "http://www.google.com/"; | 42 const char kRequestUrl[] = "http://www.google.com/"; |
| 43 | 43 |
| 44 enum SpdyNetworkTransactionTestSSLType { | 44 enum SpdyNetworkTransactionTestSSLType { |
| 45 SPDYNPN, | 45 SPDYNPN, |
| 46 SPDYNOSSL, | 46 SPDYNOSSL, |
| 47 SPDYSSL, | 47 SPDYSSL, |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 struct SpdyNetworkTransactionTestParams { | 50 struct SpdyNetworkTransactionTestParams { |
| 51 SpdyNetworkTransactionTestParams() | 51 SpdyNetworkTransactionTestParams() |
| 52 : protocol(kProtoSPDY2), | 52 : protocol(kProtoSPDY3), |
| 53 ssl_type(SPDYNPN) {} | 53 ssl_type(SPDYNPN) {} |
| 54 | 54 |
| 55 SpdyNetworkTransactionTestParams( | 55 SpdyNetworkTransactionTestParams( |
| 56 NextProto protocol, | 56 NextProto protocol, |
| 57 SpdyNetworkTransactionTestSSLType ssl_type) | 57 SpdyNetworkTransactionTestSSLType ssl_type) |
| 58 : protocol(protocol), | 58 : protocol(protocol), |
| 59 ssl_type(ssl_type) {} | 59 ssl_type(ssl_type) {} |
| 60 | 60 |
| 61 NextProto protocol; | 61 NextProto protocol; |
| 62 SpdyNetworkTransactionTestSSLType ssl_type; | 62 SpdyNetworkTransactionTestSSLType ssl_type; |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 //----------------------------------------------------------------------------- | 646 //----------------------------------------------------------------------------- |
| 647 // All tests are run with three different connection types: SPDY after NPN | 647 // All tests are run with three different connection types: SPDY after NPN |
| 648 // negotiation, SPDY without SSL, and SPDY with SSL. | 648 // negotiation, SPDY without SSL, and SPDY with SSL. |
| 649 // | 649 // |
| 650 // TODO(akalin): Use ::testing::Combine() when we are able to use | 650 // TODO(akalin): Use ::testing::Combine() when we are able to use |
| 651 // <tr1/tuple>. | 651 // <tr1/tuple>. |
| 652 INSTANTIATE_TEST_CASE_P( | 652 INSTANTIATE_TEST_CASE_P( |
| 653 Spdy, | 653 Spdy, |
| 654 SpdyNetworkTransactionTest, | 654 SpdyNetworkTransactionTest, |
| 655 ::testing::Values( | 655 ::testing::Values( |
| 656 SpdyNetworkTransactionTestParams(kProtoSPDY2, SPDYNOSSL), | 656 SpdyNetworkTransactionTestParams(kProtoDeprecatedSPDY2, SPDYNOSSL), |
| 657 SpdyNetworkTransactionTestParams(kProtoSPDY2, SPDYSSL), | 657 SpdyNetworkTransactionTestParams(kProtoDeprecatedSPDY2, SPDYSSL), |
| 658 SpdyNetworkTransactionTestParams(kProtoSPDY2, SPDYNPN), | 658 SpdyNetworkTransactionTestParams(kProtoDeprecatedSPDY2, SPDYNPN), |
| 659 SpdyNetworkTransactionTestParams(kProtoSPDY3, SPDYNOSSL), | 659 SpdyNetworkTransactionTestParams(kProtoSPDY3, SPDYNOSSL), |
| 660 SpdyNetworkTransactionTestParams(kProtoSPDY3, SPDYSSL), | 660 SpdyNetworkTransactionTestParams(kProtoSPDY3, SPDYSSL), |
| 661 SpdyNetworkTransactionTestParams(kProtoSPDY3, SPDYNPN), | 661 SpdyNetworkTransactionTestParams(kProtoSPDY3, SPDYNPN), |
| 662 SpdyNetworkTransactionTestParams(kProtoSPDY31, SPDYNOSSL), | 662 SpdyNetworkTransactionTestParams(kProtoSPDY31, SPDYNOSSL), |
| 663 SpdyNetworkTransactionTestParams(kProtoSPDY31, SPDYSSL), | 663 SpdyNetworkTransactionTestParams(kProtoSPDY31, SPDYSSL), |
| 664 SpdyNetworkTransactionTestParams(kProtoSPDY31, SPDYNPN), | 664 SpdyNetworkTransactionTestParams(kProtoSPDY31, SPDYNPN), |
| 665 SpdyNetworkTransactionTestParams(kProtoSPDY4a2, SPDYNOSSL), | 665 SpdyNetworkTransactionTestParams(kProtoSPDY4a2, SPDYNOSSL), |
| 666 SpdyNetworkTransactionTestParams(kProtoSPDY4a2, SPDYSSL), | 666 SpdyNetworkTransactionTestParams(kProtoSPDY4a2, SPDYSSL), |
| 667 SpdyNetworkTransactionTestParams(kProtoSPDY4a2, SPDYNPN), | 667 SpdyNetworkTransactionTestParams(kProtoSPDY4a2, SPDYNPN), |
| 668 SpdyNetworkTransactionTestParams(kProtoHTTP2Draft04, SPDYNOSSL), | 668 SpdyNetworkTransactionTestParams(kProtoHTTP2Draft04, SPDYNOSSL), |
| (...skipping 5730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6399 // since we're send-stalled. | 6399 // since we're send-stalled. |
| 6400 EXPECT_TRUE(stream->stream()->send_stalled_by_flow_control()); | 6400 EXPECT_TRUE(stream->stream()->send_stalled_by_flow_control()); |
| 6401 | 6401 |
| 6402 // Read in WINDOW_UPDATE or SETTINGS frame. | 6402 // Read in WINDOW_UPDATE or SETTINGS frame. |
| 6403 data.RunFor((GetParam().protocol >= kProtoSPDY31) ? 8 : 7); | 6403 data.RunFor((GetParam().protocol >= kProtoSPDY31) ? 8 : 7); |
| 6404 rv = callback.WaitForResult(); | 6404 rv = callback.WaitForResult(); |
| 6405 helper.VerifyDataConsumed(); | 6405 helper.VerifyDataConsumed(); |
| 6406 } | 6406 } |
| 6407 | 6407 |
| 6408 } // namespace net | 6408 } // namespace net |
| OLD | NEW |