Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: net/spdy/spdy_network_transaction_unittest.cc

Issue 1828203005: Expose SPDY pushes in DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed tests Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/base/load_timing_info_test_util.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/base/load_timing_info_test_util.cc ('k') | net/spdy/spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698