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 <memory> | 5 #include <memory> |
6 #include <string> | 6 #include <string> |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 std::string result2; | 599 std::string result2; |
600 ReadResult(trans2.get(), &result2); | 600 ReadResult(trans2.get(), &result2); |
601 // Read the response body. | 601 // Read the response body. |
602 std::string result; | 602 std::string result; |
603 ReadResult(trans, &result); | 603 ReadResult(trans, &result); |
604 | 604 |
605 // Verify that we consumed all test data. | 605 // Verify that we consumed all test data. |
606 EXPECT_TRUE(data->AllReadDataConsumed()); | 606 EXPECT_TRUE(data->AllReadDataConsumed()); |
607 EXPECT_TRUE(data->AllWriteDataConsumed()); | 607 EXPECT_TRUE(data->AllWriteDataConsumed()); |
608 | 608 |
| 609 LoadTimingInfo load_timing_info; |
| 610 EXPECT_TRUE(trans->GetLoadTimingInfo(&load_timing_info)); |
| 611 EXPECT_TRUE(load_timing_info.push_start.is_null()); |
| 612 EXPECT_TRUE(load_timing_info.push_end.is_null()); |
| 613 |
| 614 LoadTimingInfo load_timing_info2; |
| 615 EXPECT_TRUE(trans2->GetLoadTimingInfo(&load_timing_info2)); |
| 616 EXPECT_FALSE(load_timing_info2.push_start.is_null()); |
| 617 EXPECT_FALSE(load_timing_info2.push_end.is_null()); |
| 618 |
609 // Verify that the received push data is same as the expected push data. | 619 // Verify that the received push data is same as the expected push data. |
610 EXPECT_EQ(result2.compare(expected), 0) << "Received data: " | 620 EXPECT_EQ(result2.compare(expected), 0) << "Received data: " |
611 << result2 | 621 << result2 |
612 << "||||| Expected data: " | 622 << "||||| Expected data: " |
613 << expected; | 623 << expected; |
614 | 624 |
615 // Verify the SYN_REPLY. | 625 // Verify the SYN_REPLY. |
616 // Copy the response info, because trans goes away. | 626 // Copy the response info, because trans goes away. |
617 *response = *trans->GetResponseInfo(); | 627 *response = *trans->GetResponseInfo(); |
618 *push_response = *trans2->GetResponseInfo(); | 628 *push_response = *trans2->GetResponseInfo(); |
(...skipping 6506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7125 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 7135 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
7126 std::unique_ptr<SSLSocketDataProvider> ssl_provider( | 7136 std::unique_ptr<SSLSocketDataProvider> ssl_provider( |
7127 new SSLSocketDataProvider(ASYNC, OK)); | 7137 new SSLSocketDataProvider(ASYNC, OK)); |
7128 // Set to TLS_RSA_WITH_NULL_MD5 | 7138 // Set to TLS_RSA_WITH_NULL_MD5 |
7129 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 7139 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
7130 | 7140 |
7131 RunTLSUsageCheckTest(std::move(ssl_provider)); | 7141 RunTLSUsageCheckTest(std::move(ssl_provider)); |
7132 } | 7142 } |
7133 | 7143 |
7134 } // namespace net | 7144 } // namespace net |
OLD | NEW |