Chromium Code Reviews| 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/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 3761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3772 net::NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS, | 3772 net::NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS, |
| 3773 net::NetLog::PHASE_END); | 3773 net::NetLog::PHASE_END); |
| 3774 pos = net::ExpectLogContainsSomewhere(entries, pos + 1, | 3774 pos = net::ExpectLogContainsSomewhere(entries, pos + 1, |
| 3775 net::NetLog::TYPE_HTTP_TRANSACTION_READ_BODY, | 3775 net::NetLog::TYPE_HTTP_TRANSACTION_READ_BODY, |
| 3776 net::NetLog::PHASE_BEGIN); | 3776 net::NetLog::PHASE_BEGIN); |
| 3777 pos = net::ExpectLogContainsSomewhere(entries, pos + 1, | 3777 pos = net::ExpectLogContainsSomewhere(entries, pos + 1, |
| 3778 net::NetLog::TYPE_HTTP_TRANSACTION_READ_BODY, | 3778 net::NetLog::TYPE_HTTP_TRANSACTION_READ_BODY, |
| 3779 net::NetLog::PHASE_END); | 3779 net::NetLog::PHASE_END); |
| 3780 | 3780 |
| 3781 // Check that we logged all the headers correctly | 3781 // Check that we logged all the headers correctly |
| 3782 pos = net::ExpectLogContainsSomewhere( | 3782 const NetLog::EventType type = |
|
mmenke
2015/02/26 16:04:19
optional nit: const generally isn't used for thin
| |
| 3783 entries, 0, net::NetLog::TYPE_HTTP2_SESSION_SYN_STREAM, | 3783 (GetParam().protocol <= kProtoSPDY31) |
| 3784 net::NetLog::PHASE_NONE); | 3784 ? net::NetLog::TYPE_HTTP2_SESSION_SYN_STREAM |
| 3785 : net::NetLog::TYPE_HTTP2_SESSION_SEND_HEADERS; | |
| 3786 pos = net::ExpectLogContainsSomewhere(entries, 0, type, | |
| 3787 net::NetLog::PHASE_NONE); | |
| 3785 | 3788 |
| 3786 base::ListValue* header_list; | 3789 base::ListValue* header_list; |
| 3787 ASSERT_TRUE(entries[pos].params.get()); | 3790 ASSERT_TRUE(entries[pos].params.get()); |
| 3788 ASSERT_TRUE(entries[pos].params->GetList("headers", &header_list)); | 3791 ASSERT_TRUE(entries[pos].params->GetList("headers", &header_list)); |
| 3789 | 3792 |
| 3790 std::vector<std::string> expected; | 3793 std::vector<std::string> expected; |
| 3791 expected.push_back(std::string(spdy_util_.GetHostKey()) + ": www.google.com"); | 3794 expected.push_back(std::string(spdy_util_.GetHostKey()) + ": www.google.com"); |
| 3792 expected.push_back(std::string(spdy_util_.GetPathKey()) + ": /"); | 3795 expected.push_back(std::string(spdy_util_.GetPathKey()) + ": /"); |
| 3793 expected.push_back(std::string(spdy_util_.GetSchemeKey()) + ": http"); | 3796 expected.push_back(std::string(spdy_util_.GetSchemeKey()) + ": http"); |
| 3794 expected.push_back(std::string(spdy_util_.GetMethodKey()) + ": GET"); | 3797 expected.push_back(std::string(spdy_util_.GetMethodKey()) + ": GET"); |
| (...skipping 3024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6819 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6822 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
| 6820 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 6823 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
| 6821 new SSLSocketDataProvider(ASYNC, OK)); | 6824 new SSLSocketDataProvider(ASYNC, OK)); |
| 6822 // Set to TLS_RSA_WITH_NULL_MD5 | 6825 // Set to TLS_RSA_WITH_NULL_MD5 |
| 6823 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6826 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
| 6824 | 6827 |
| 6825 RunTLSUsageCheckTest(ssl_provider.Pass()); | 6828 RunTLSUsageCheckTest(ssl_provider.Pass()); |
| 6826 } | 6829 } |
| 6827 | 6830 |
| 6828 } // namespace net | 6831 } // namespace net |
| OLD | NEW |