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 <cmath> | 5 #include <cmath> |
6 #include <memory> | 6 #include <memory> |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 3560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3571 ": www.example.org"); | 3571 ": www.example.org"); |
3572 expected.push_back(std::string(spdy_util_.GetPathKey()) + ": /"); | 3572 expected.push_back(std::string(spdy_util_.GetPathKey()) + ": /"); |
3573 expected.push_back(std::string(spdy_util_.GetSchemeKey()) + ": " + | 3573 expected.push_back(std::string(spdy_util_.GetSchemeKey()) + ": " + |
3574 default_url_.scheme()); | 3574 default_url_.scheme()); |
3575 expected.push_back(std::string(spdy_util_.GetMethodKey()) + ": GET"); | 3575 expected.push_back(std::string(spdy_util_.GetMethodKey()) + ": GET"); |
3576 expected.push_back("user-agent: Chrome"); | 3576 expected.push_back("user-agent: Chrome"); |
3577 EXPECT_EQ(expected.size(), header_list->GetSize()); | 3577 EXPECT_EQ(expected.size(), header_list->GetSize()); |
3578 for (std::vector<std::string>::const_iterator it = expected.begin(); | 3578 for (std::vector<std::string>::const_iterator it = expected.begin(); |
3579 it != expected.end(); | 3579 it != expected.end(); |
3580 ++it) { | 3580 ++it) { |
3581 base::StringValue header(*it); | 3581 base::Value header(*it); |
3582 EXPECT_NE(header_list->end(), header_list->Find(header)) << | 3582 EXPECT_NE(header_list->end(), header_list->Find(header)) << |
3583 "Header not found: " << *it; | 3583 "Header not found: " << *it; |
3584 } | 3584 } |
3585 } | 3585 } |
3586 | 3586 |
3587 // Since we buffer the IO from the stream to the renderer, this test verifies | 3587 // Since we buffer the IO from the stream to the renderer, this test verifies |
3588 // that when we read out the maximum amount of data (e.g. we received 50 bytes | 3588 // that when we read out the maximum amount of data (e.g. we received 50 bytes |
3589 // on the network, but issued a Read for only 5 of those bytes) that the data | 3589 // on the network, but issued a Read for only 5 of those bytes) that the data |
3590 // flow still works correctly. | 3590 // flow still works correctly. |
3591 TEST_F(SpdyNetworkTransactionTest, BufferFull) { | 3591 TEST_F(SpdyNetworkTransactionTest, BufferFull) { |
(...skipping 2947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6539 TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6539 TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
6540 std::unique_ptr<SSLSocketDataProvider> ssl_provider( | 6540 std::unique_ptr<SSLSocketDataProvider> ssl_provider( |
6541 new SSLSocketDataProvider(ASYNC, OK)); | 6541 new SSLSocketDataProvider(ASYNC, OK)); |
6542 // Set to TLS_RSA_WITH_NULL_MD5 | 6542 // Set to TLS_RSA_WITH_NULL_MD5 |
6543 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6543 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
6544 | 6544 |
6545 RunTLSUsageCheckTest(std::move(ssl_provider)); | 6545 RunTLSUsageCheckTest(std::move(ssl_provider)); |
6546 } | 6546 } |
6547 | 6547 |
6548 } // namespace net | 6548 } // namespace net |
OLD | NEW |