OLD | NEW |
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 "net/socket/tcp_socket.h" | 5 #include "net/socket/tcp_socket.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/test/simple_test_tick_clock.h" | 15 #include "base/test/simple_test_tick_clock.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "net/base/address_list.h" | 17 #include "net/base/address_list.h" |
18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
19 #include "net/base/ip_endpoint.h" | 19 #include "net/base/ip_endpoint.h" |
20 #include "net/base/ip_endpoint.h" | 20 #include "net/base/ip_endpoint.h" |
21 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
22 #include "net/base/sockaddr_storage.h" | 22 #include "net/base/sockaddr_storage.h" |
23 #include "net/base/socket_performance_watcher.h" | |
24 #include "net/base/test_completion_callback.h" | 23 #include "net/base/test_completion_callback.h" |
| 24 #include "net/socket/socket_performance_watcher.h" |
25 #include "net/socket/tcp_client_socket.h" | 25 #include "net/socket/tcp_client_socket.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 #include "testing/platform_test.h" | 27 #include "testing/platform_test.h" |
28 | 28 |
29 namespace net { | 29 namespace net { |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 class TestSocketPerformanceWatcher : public SocketPerformanceWatcher { | 33 class TestSocketPerformanceWatcher : public SocketPerformanceWatcher { |
34 public: | 34 public: |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 // additional notification should be received for each message read since this | 405 // additional notification should be received for each message read since this |
406 // test advances clock by 2 seconds (which is longer than the minimum interval | 406 // test advances clock by 2 seconds (which is longer than the minimum interval |
407 // between consecutive notifications) before every read. | 407 // between consecutive notifications) before every read. |
408 TEST_F(TCPSocketTest, SPWAdvance) { | 408 TEST_F(TCPSocketTest, SPWAdvance) { |
409 TestSPWNotifications(base::TimeDelta::FromSeconds(2), true, 2u, 0u, 3u); | 409 TestSPWNotifications(base::TimeDelta::FromSeconds(2), true, 2u, 0u, 3u); |
410 } | 410 } |
411 #endif // defined(TCP_INFO) || defined(OS_LINUX) | 411 #endif // defined(TCP_INFO) || defined(OS_LINUX) |
412 | 412 |
413 } // namespace | 413 } // namespace |
414 } // namespace net | 414 } // namespace net |
OLD | NEW |