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

Side by Side Diff: net/dns/address_sorter_posix_unittest.cc

Issue 1376473003: Notify NQE of TCP RTT values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased, addressed sleevi comments Created 4 years, 9 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 "net/dns/address_sorter_posix.h" 5 #include "net/dns/address_sorter_posix.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "net/base/ip_address.h" 10 #include "net/base/ip_address.h"
11 #include "net/base/net_errors.h" 11 #include "net/base/net_errors.h"
12 #include "net/base/socket_performance_watcher.h"
12 #include "net/base/test_completion_callback.h" 13 #include "net/base/test_completion_callback.h"
13 #include "net/socket/client_socket_factory.h" 14 #include "net/socket/client_socket_factory.h"
14 #include "net/socket/ssl_client_socket.h" 15 #include "net/socket/ssl_client_socket.h"
15 #include "net/socket/stream_socket.h" 16 #include "net/socket/stream_socket.h"
16 #include "net/udp/datagram_client_socket.h" 17 #include "net/udp/datagram_client_socket.h"
17 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
18 19
19 namespace net { 20 namespace net {
20 namespace { 21 namespace {
21 22
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 101
101 scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket( 102 scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
102 DatagramSocket::BindType, 103 DatagramSocket::BindType,
103 const RandIntCallback&, 104 const RandIntCallback&,
104 NetLog*, 105 NetLog*,
105 const NetLog::Source&) override { 106 const NetLog::Source&) override {
106 return scoped_ptr<DatagramClientSocket>(new TestUDPClientSocket(&mapping_)); 107 return scoped_ptr<DatagramClientSocket>(new TestUDPClientSocket(&mapping_));
107 } 108 }
108 scoped_ptr<StreamSocket> CreateTransportClientSocket( 109 scoped_ptr<StreamSocket> CreateTransportClientSocket(
109 const AddressList&, 110 const AddressList&,
111 scoped_ptr<SocketPerformanceWatcher>,
110 NetLog*, 112 NetLog*,
111 const NetLog::Source&) override { 113 const NetLog::Source&) override {
112 NOTIMPLEMENTED(); 114 NOTIMPLEMENTED();
113 return scoped_ptr<StreamSocket>(); 115 return scoped_ptr<StreamSocket>();
114 } 116 }
115 scoped_ptr<SSLClientSocket> CreateSSLClientSocket( 117 scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
116 scoped_ptr<ClientSocketHandle>, 118 scoped_ptr<ClientSocketHandle>,
117 const HostPortPair&, 119 const HostPortPair&,
118 const SSLConfig&, 120 const SSLConfig&,
119 const SSLClientSocketContext&) override { 121 const SSLClientSocketContext&) override {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 AddMapping("4000::1", "4000::10"); // global unicast 324 AddMapping("4000::1", "4000::10"); // global unicast
323 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast 325 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast
324 GetSourceInfo("fe81::20")->deprecated = true; 326 GetSourceInfo("fe81::20")->deprecated = true;
325 const char* const addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", 327 const char* const addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1",
326 "::1", "8.0.0.1", NULL }; 328 "::1", "8.0.0.1", NULL };
327 const int order[] = { 4, 3, 0, 2, 1, -1 }; 329 const int order[] = { 4, 3, 0, 2, 1, -1 };
328 Verify(addresses, order); 330 Verify(addresses, order);
329 } 331 }
330 332
331 } // namespace net 333 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698