| 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 <utility> | 6 #include <utility> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 3514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3525 NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS, | 3525 NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS, |
| 3526 NetLog::PHASE_END); | 3526 NetLog::PHASE_END); |
| 3527 pos = ExpectLogContainsSomewhere(entries, pos + 1, | 3527 pos = ExpectLogContainsSomewhere(entries, pos + 1, |
| 3528 NetLog::TYPE_HTTP_TRANSACTION_READ_BODY, | 3528 NetLog::TYPE_HTTP_TRANSACTION_READ_BODY, |
| 3529 NetLog::PHASE_BEGIN); | 3529 NetLog::PHASE_BEGIN); |
| 3530 pos = ExpectLogContainsSomewhere(entries, pos + 1, | 3530 pos = ExpectLogContainsSomewhere(entries, pos + 1, |
| 3531 NetLog::TYPE_HTTP_TRANSACTION_READ_BODY, | 3531 NetLog::TYPE_HTTP_TRANSACTION_READ_BODY, |
| 3532 NetLog::PHASE_END); | 3532 NetLog::PHASE_END); |
| 3533 | 3533 |
| 3534 // Check that we logged all the headers correctly | 3534 // Check that we logged all the headers correctly |
| 3535 const NetLog::EventType type = (GetParam().protocol <= kProtoSPDY31) | 3535 const NetLog::EventType type = (GetParam().protocol == kProtoSPDY31) |
| 3536 ? NetLog::TYPE_HTTP2_SESSION_SYN_STREAM | 3536 ? NetLog::TYPE_HTTP2_SESSION_SYN_STREAM |
| 3537 : NetLog::TYPE_HTTP2_SESSION_SEND_HEADERS; | 3537 : NetLog::TYPE_HTTP2_SESSION_SEND_HEADERS; |
| 3538 pos = ExpectLogContainsSomewhere(entries, 0, type, NetLog::PHASE_NONE); | 3538 pos = ExpectLogContainsSomewhere(entries, 0, type, NetLog::PHASE_NONE); |
| 3539 | 3539 |
| 3540 base::ListValue* header_list; | 3540 base::ListValue* header_list; |
| 3541 ASSERT_TRUE(entries[pos].params.get()); | 3541 ASSERT_TRUE(entries[pos].params.get()); |
| 3542 ASSERT_TRUE(entries[pos].params->GetList("headers", &header_list)); | 3542 ASSERT_TRUE(entries[pos].params->GetList("headers", &header_list)); |
| 3543 | 3543 |
| 3544 std::vector<std::string> expected; | 3544 std::vector<std::string> expected; |
| 3545 expected.push_back(std::string(spdy_util_.GetHostKey()) + | 3545 expected.push_back(std::string(spdy_util_.GetHostKey()) + |
| (...skipping 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6131 SettingsMap settings; | 6131 SettingsMap settings; |
| 6132 settings[SETTINGS_INITIAL_WINDOW_SIZE] = | 6132 settings[SETTINGS_INITIAL_WINDOW_SIZE] = |
| 6133 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, initial_window_size * 2); | 6133 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, initial_window_size * 2); |
| 6134 scoped_ptr<SpdyFrame> settings_frame_large( | 6134 scoped_ptr<SpdyFrame> settings_frame_large( |
| 6135 spdy_util_.ConstructSpdySettings(settings)); | 6135 spdy_util_.ConstructSpdySettings(settings)); |
| 6136 | 6136 |
| 6137 reads.push_back(CreateMockRead(*settings_frame_large, i++)); | 6137 reads.push_back(CreateMockRead(*settings_frame_large, i++)); |
| 6138 | 6138 |
| 6139 scoped_ptr<SpdyFrame> session_window_update( | 6139 scoped_ptr<SpdyFrame> session_window_update( |
| 6140 spdy_util_.ConstructSpdyWindowUpdate(0, kUploadDataSize)); | 6140 spdy_util_.ConstructSpdyWindowUpdate(0, kUploadDataSize)); |
| 6141 if (GetParam().protocol >= kProtoSPDY31) | 6141 reads.push_back(CreateMockRead(*session_window_update, i++)); |
| 6142 reads.push_back(CreateMockRead(*session_window_update, i++)); | |
| 6143 | 6142 |
| 6144 scoped_ptr<SpdyFrame> settings_ack(spdy_util_.ConstructSpdySettingsAck()); | 6143 scoped_ptr<SpdyFrame> settings_ack(spdy_util_.ConstructSpdySettingsAck()); |
| 6145 writes.push_back(CreateMockWrite(*settings_ack, i++)); | 6144 writes.push_back(CreateMockWrite(*settings_ack, i++)); |
| 6146 | 6145 |
| 6147 writes.push_back(CreateMockWrite(*body3, i++)); | 6146 writes.push_back(CreateMockWrite(*body3, i++)); |
| 6148 | 6147 |
| 6149 scoped_ptr<SpdyFrame> reply(spdy_util_.ConstructSpdyPostSynReply(NULL, 0)); | 6148 scoped_ptr<SpdyFrame> reply(spdy_util_.ConstructSpdyPostSynReply(NULL, 0)); |
| 6150 reads.push_back(CreateMockRead(*reply, i++)); | 6149 reads.push_back(CreateMockRead(*reply, i++)); |
| 6151 reads.push_back(CreateMockRead(*body2, i++)); | 6150 reads.push_back(CreateMockRead(*body2, i++)); |
| 6152 reads.push_back(CreateMockRead(*body3, i++)); | 6151 reads.push_back(CreateMockRead(*body3, i++)); |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6569 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6568 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
| 6570 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 6569 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
| 6571 new SSLSocketDataProvider(ASYNC, OK)); | 6570 new SSLSocketDataProvider(ASYNC, OK)); |
| 6572 // Set to TLS_RSA_WITH_NULL_MD5 | 6571 // Set to TLS_RSA_WITH_NULL_MD5 |
| 6573 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6572 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
| 6574 | 6573 |
| 6575 RunTLSUsageCheckTest(std::move(ssl_provider)); | 6574 RunTLSUsageCheckTest(std::move(ssl_provider)); |
| 6576 } | 6575 } |
| 6577 | 6576 |
| 6578 } // namespace net | 6577 } // namespace net |
| OLD | NEW |