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 "net/spdy/spdy_session.h" | 5 #include "net/spdy/spdy_session.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1569 writes.push_back(CreateMockWrite(*initial_window_update)); | 1569 writes.push_back(CreateMockWrite(*initial_window_update)); |
1570 }; | 1570 }; |
1571 | 1571 |
1572 SettingsMap server_settings; | 1572 SettingsMap server_settings; |
1573 const uint32 initial_max_concurrent_streams = 1; | 1573 const uint32 initial_max_concurrent_streams = 1; |
1574 server_settings[SETTINGS_MAX_CONCURRENT_STREAMS] = | 1574 server_settings[SETTINGS_MAX_CONCURRENT_STREAMS] = |
1575 SettingsFlagsAndValue(SETTINGS_FLAG_PERSISTED, | 1575 SettingsFlagsAndValue(SETTINGS_FLAG_PERSISTED, |
1576 initial_max_concurrent_streams); | 1576 initial_max_concurrent_streams); |
1577 scoped_ptr<SpdyFrame> server_settings_frame( | 1577 scoped_ptr<SpdyFrame> server_settings_frame( |
1578 spdy_util_.ConstructSpdySettings(server_settings)); | 1578 spdy_util_.ConstructSpdySettings(server_settings)); |
1579 writes.push_back(CreateMockWrite(*server_settings_frame)); | 1579 if (GetParam() <= kProtoSPDY31) { |
| 1580 writes.push_back(CreateMockWrite(*server_settings_frame)); |
| 1581 } |
1580 | 1582 |
1581 session_deps_.stream_initial_recv_window_size = kInitialRecvWindowSize; | 1583 session_deps_.stream_initial_recv_window_size = kInitialRecvWindowSize; |
1582 | 1584 |
1583 StaticSocketDataProvider data(reads, arraysize(reads), | 1585 StaticSocketDataProvider data(reads, arraysize(reads), |
1584 vector_as_array(&writes), writes.size()); | 1586 vector_as_array(&writes), writes.size()); |
1585 data.set_connect_data(connect_data); | 1587 data.set_connect_data(connect_data); |
1586 session_deps_.socket_factory->AddSocketDataProvider(&data); | 1588 session_deps_.socket_factory->AddSocketDataProvider(&data); |
1587 | 1589 |
1588 CreateNetworkSession(); | 1590 CreateNetworkSession(); |
1589 | 1591 |
(...skipping 3537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5127 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), | 5129 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), |
5128 "spdy_pooling.pem"); | 5130 "spdy_pooling.pem"); |
5129 ssl_info.is_issued_by_known_root = true; | 5131 ssl_info.is_issued_by_known_root = true; |
5130 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); | 5132 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); |
5131 | 5133 |
5132 EXPECT_TRUE(SpdySession::CanPool( | 5134 EXPECT_TRUE(SpdySession::CanPool( |
5133 &tss, ssl_info, "www.example.org", "mail.example.org")); | 5135 &tss, ssl_info, "www.example.org", "mail.example.org")); |
5134 } | 5136 } |
5135 | 5137 |
5136 } // namespace net | 5138 } // namespace net |
OLD | NEW |