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

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

Issue 2140253002: Add metrics to track HTTP/0.9 usage for main frames and subresources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: 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
« no previous file with comments | « net/http/http_stream_parser_unittest.cc ('k') | net/spdy/spdy_network_transaction_unittest.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 <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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 } 575 }
576 576
577 void CheckWasHttpResponse( 577 void CheckWasHttpResponse(
578 const std::unique_ptr<HttpNetworkTransaction>& trans) { 578 const std::unique_ptr<HttpNetworkTransaction>& trans) {
579 const HttpResponseInfo* response = trans->GetResponseInfo(); 579 const HttpResponseInfo* response = trans->GetResponseInfo();
580 ASSERT_TRUE(response != nullptr); 580 ASSERT_TRUE(response != nullptr);
581 ASSERT_TRUE(response->headers.get() != nullptr); 581 ASSERT_TRUE(response->headers.get() != nullptr);
582 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); 582 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine());
583 EXPECT_FALSE(response->was_fetched_via_spdy); 583 EXPECT_FALSE(response->was_fetched_via_spdy);
584 EXPECT_FALSE(response->was_npn_negotiated); 584 EXPECT_FALSE(response->was_npn_negotiated);
585 EXPECT_EQ(HttpResponseInfo::CONNECTION_INFO_HTTP1, 585 EXPECT_EQ(HttpResponseInfo::CONNECTION_INFO_HTTP1_1,
586 response->connection_info); 586 response->connection_info);
587 } 587 }
588 588
589 void CheckResponseData(const std::unique_ptr<HttpNetworkTransaction>& trans, 589 void CheckResponseData(const std::unique_ptr<HttpNetworkTransaction>& trans,
590 const std::string& expected) { 590 const std::string& expected) {
591 std::string response_data; 591 std::string response_data;
592 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 592 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data));
593 EXPECT_EQ(expected, response_data); 593 EXPECT_EQ(expected, response_data);
594 } 594 }
595 595
(...skipping 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2742 AddHangingSocketData(); 2742 AddHangingSocketData();
2743 2743
2744 SendRequestAndExpectQuicResponse(origin1_); 2744 SendRequestAndExpectQuicResponse(origin1_);
2745 SendRequestAndExpectQuicResponse(origin2_); 2745 SendRequestAndExpectQuicResponse(origin2_);
2746 2746
2747 EXPECT_TRUE(AllDataConsumed()); 2747 EXPECT_TRUE(AllDataConsumed());
2748 } 2748 }
2749 2749
2750 } // namespace test 2750 } // namespace test
2751 } // namespace net 2751 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_parser_unittest.cc ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698