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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1448 } | 1448 } |
1449 | 1449 |
1450 TEST_F(SpdySessionTest, SendInitialDataOnNewSession) { | 1450 TEST_F(SpdySessionTest, SendInitialDataOnNewSession) { |
1451 session_deps_.host_resolver->set_synchronous_mode(true); | 1451 session_deps_.host_resolver->set_synchronous_mode(true); |
1452 | 1452 |
1453 MockRead reads[] = { | 1453 MockRead reads[] = { |
1454 MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever. | 1454 MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever. |
1455 }; | 1455 }; |
1456 | 1456 |
1457 SettingsMap settings; | 1457 SettingsMap settings; |
1458 settings[SETTINGS_HEADER_TABLE_SIZE] = | |
1459 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, kMaxHeaderTableSize); | |
1460 settings[SETTINGS_MAX_CONCURRENT_STREAMS] = | 1458 settings[SETTINGS_MAX_CONCURRENT_STREAMS] = |
1461 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, kMaxConcurrentPushedStreams); | 1459 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, kMaxConcurrentPushedStreams); |
1462 SpdySerializedFrame settings_frame( | 1460 SpdySerializedFrame settings_frame( |
1463 spdy_util_.ConstructSpdySettings(settings)); | 1461 spdy_util_.ConstructSpdySettings(settings)); |
1464 MockWrite writes[] = {MockWrite(ASYNC, kHttp2ConnectionHeaderPrefix, | 1462 MockWrite writes[] = {MockWrite(ASYNC, kHttp2ConnectionHeaderPrefix, |
1465 kHttp2ConnectionHeaderPrefixSize), | 1463 kHttp2ConnectionHeaderPrefixSize), |
1466 CreateMockWrite(settings_frame)}; | 1464 CreateMockWrite(settings_frame)}; |
1467 | 1465 |
1468 StaticSocketDataProvider data(reads, arraysize(reads), writes, | 1466 StaticSocketDataProvider data(reads, arraysize(reads), writes, |
1469 arraysize(writes)); | 1467 arraysize(writes)); |
(...skipping 3931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5401 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), | 5399 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), |
5402 "spdy_pooling.pem"); | 5400 "spdy_pooling.pem"); |
5403 ssl_info.is_issued_by_known_root = true; | 5401 ssl_info.is_issued_by_known_root = true; |
5404 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); | 5402 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); |
5405 | 5403 |
5406 EXPECT_TRUE(SpdySession::CanPool( | 5404 EXPECT_TRUE(SpdySession::CanPool( |
5407 &tss, ssl_info, "www.example.org", "mail.example.org")); | 5405 &tss, ssl_info, "www.example.org", "mail.example.org")); |
5408 } | 5406 } |
5409 | 5407 |
5410 } // namespace net | 5408 } // namespace net |
OLD | NEW |