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

Side by Side Diff: net/quic/quic_network_transaction_unittest.cc

Issue 2119623002: Add metrics to track HTTP/0.9 usage for main frames and subresources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to comments Created 4 years, 5 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 <memory> 5 #include <memory>
6 #include <ostream> 6 #include <ostream>
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 } 552 }
553 553
554 void CheckWasHttpResponse( 554 void CheckWasHttpResponse(
555 const std::unique_ptr<HttpNetworkTransaction>& trans) { 555 const std::unique_ptr<HttpNetworkTransaction>& trans) {
556 const HttpResponseInfo* response = trans->GetResponseInfo(); 556 const HttpResponseInfo* response = trans->GetResponseInfo();
557 ASSERT_TRUE(response != nullptr); 557 ASSERT_TRUE(response != nullptr);
558 ASSERT_TRUE(response->headers.get() != nullptr); 558 ASSERT_TRUE(response->headers.get() != nullptr);
559 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); 559 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine());
560 EXPECT_FALSE(response->was_fetched_via_spdy); 560 EXPECT_FALSE(response->was_fetched_via_spdy);
561 EXPECT_FALSE(response->was_npn_negotiated); 561 EXPECT_FALSE(response->was_npn_negotiated);
562 EXPECT_EQ(HttpResponseInfo::CONNECTION_INFO_HTTP1, 562 EXPECT_EQ(HttpResponseInfo::CONNECTION_INFO_HTTP1_1,
563 response->connection_info); 563 response->connection_info);
564 } 564 }
565 565
566 void CheckResponseData(const std::unique_ptr<HttpNetworkTransaction>& trans, 566 void CheckResponseData(const std::unique_ptr<HttpNetworkTransaction>& trans,
567 const std::string& expected) { 567 const std::string& expected) {
568 std::string response_data; 568 std::string response_data;
569 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 569 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data));
570 EXPECT_EQ(expected, response_data); 570 EXPECT_EQ(expected, response_data);
571 } 571 }
572 572
(...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after
2663 AddHangingSocketData(); 2663 AddHangingSocketData();
2664 2664
2665 SendRequestAndExpectQuicResponse(origin1_); 2665 SendRequestAndExpectQuicResponse(origin1_);
2666 SendRequestAndExpectQuicResponse(origin2_); 2666 SendRequestAndExpectQuicResponse(origin2_);
2667 2667
2668 EXPECT_TRUE(AllDataConsumed()); 2668 EXPECT_TRUE(AllDataConsumed());
2669 } 2669 }
2670 2670
2671 } // namespace test 2671 } // namespace test
2672 } // namespace net 2672 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698