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

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: 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
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 <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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 std::string result2; 597 std::string result2;
598 ReadResult(trans2.get(), &result2); 598 ReadResult(trans2.get(), &result2);
599 // Read the response body. 599 // Read the response body.
600 std::string result; 600 std::string result;
601 ReadResult(trans, &result); 601 ReadResult(trans, &result);
602 602
603 // Verify that we consumed all test data. 603 // Verify that we consumed all test data.
604 EXPECT_TRUE(data->AllReadDataConsumed()); 604 EXPECT_TRUE(data->AllReadDataConsumed());
605 EXPECT_TRUE(data->AllWriteDataConsumed()); 605 EXPECT_TRUE(data->AllWriteDataConsumed());
606 606
607 LoadTimingInfo load_timing_info;
608 EXPECT_TRUE(trans->GetLoadTimingInfo(&load_timing_info));
609 EXPECT_TRUE(load_timing_info.push_start.is_null());
610 EXPECT_TRUE(load_timing_info.push_end.is_null());
611
612 LoadTimingInfo load_timing_info2;
613 EXPECT_TRUE(trans2->GetLoadTimingInfo(&load_timing_info2));
614 EXPECT_FALSE(load_timing_info2.push_start.is_null());
615 EXPECT_FALSE(load_timing_info2.push_end.is_null());
616
607 // Verify that the received push data is same as the expected push data. 617 // Verify that the received push data is same as the expected push data.
608 EXPECT_EQ(result2.compare(expected), 0) << "Received data: " 618 EXPECT_EQ(result2.compare(expected), 0) << "Received data: "
609 << result2 619 << result2
610 << "||||| Expected data: " 620 << "||||| Expected data: "
611 << expected; 621 << expected;
612 622
613 // Verify the SYN_REPLY. 623 // Verify the SYN_REPLY.
614 // Copy the response info, because trans goes away. 624 // Copy the response info, because trans goes away.
615 *response = *trans->GetResponseInfo(); 625 *response = *trans->GetResponseInfo();
616 *push_response = *trans2->GetResponseInfo(); 626 *push_response = *trans2->GetResponseInfo();
(...skipping 6359 matching lines...) Expand 10 before | Expand all | Expand 10 after
6976 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { 6986 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) {
6977 scoped_ptr<SSLSocketDataProvider> ssl_provider( 6987 scoped_ptr<SSLSocketDataProvider> ssl_provider(
6978 new SSLSocketDataProvider(ASYNC, OK)); 6988 new SSLSocketDataProvider(ASYNC, OK));
6979 // Set to TLS_RSA_WITH_NULL_MD5 6989 // Set to TLS_RSA_WITH_NULL_MD5
6980 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); 6990 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status);
6981 6991
6982 RunTLSUsageCheckTest(std::move(ssl_provider)); 6992 RunTLSUsageCheckTest(std::move(ssl_provider));
6983 } 6993 }
6984 6994
6985 } // namespace net 6995 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698