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

Side by Side Diff: net/server/http_server_unittest.cc

Issue 1376473003: Notify NQE of TCP RTT values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorder initialization in constructor 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/http/http_stream_factory_impl_unittest.cc ('k') | net/socket/client_socket_factory.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return !timed_out; 71 return !timed_out;
72 } 72 }
73 73
74 class TestHttpClient { 74 class TestHttpClient {
75 public: 75 public:
76 TestHttpClient() : connect_result_(OK) {} 76 TestHttpClient() : connect_result_(OK) {}
77 77
78 int ConnectAndWait(const IPEndPoint& address) { 78 int ConnectAndWait(const IPEndPoint& address) {
79 AddressList addresses(address); 79 AddressList addresses(address);
80 NetLog::Source source; 80 NetLog::Source source;
81 socket_.reset(new TCPClientSocket(addresses, NULL, source)); 81 socket_.reset(new TCPClientSocket(addresses, NULL, NULL, source));
82 82
83 base::RunLoop run_loop; 83 base::RunLoop run_loop;
84 connect_result_ = socket_->Connect(base::Bind(&TestHttpClient::OnConnect, 84 connect_result_ = socket_->Connect(base::Bind(&TestHttpClient::OnConnect,
85 base::Unretained(this), 85 base::Unretained(this),
86 run_loop.QuitClosure())); 86 run_loop.QuitClosure()));
87 if (connect_result_ != OK && connect_result_ != ERR_IO_PENDING) 87 if (connect_result_ != OK && connect_result_ != ERR_IO_PENDING)
88 return connect_result_; 88 return connect_result_;
89 89
90 if (!RunLoopWithTimeout(&run_loop)) 90 if (!RunLoopWithTimeout(&run_loop))
91 return ERR_TIMED_OUT; 91 return ERR_TIMED_OUT;
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 ASSERT_EQ(OK, client.ConnectAndWait(server_address_)); 647 ASSERT_EQ(OK, client.ConnectAndWait(server_address_));
648 client.Send("GET / HTTP/1.1\r\n\r\n"); 648 client.Send("GET / HTTP/1.1\r\n\r\n");
649 ASSERT_FALSE(RunUntilRequestsReceived(1)); 649 ASSERT_FALSE(RunUntilRequestsReceived(1));
650 ASSERT_EQ(1ul, connection_ids_.size()); 650 ASSERT_EQ(1ul, connection_ids_.size());
651 ASSERT_EQ(0ul, requests_.size()); 651 ASSERT_EQ(0ul, requests_.size());
652 } 652 }
653 653
654 } // namespace 654 } // namespace
655 655
656 } // namespace net 656 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_unittest.cc ('k') | net/socket/client_socket_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698