OLD | NEW |
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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "chrome/browser/net/network_stats.h" | 7 #include "chrome/browser/net/network_stats.h" |
8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
9 #include "net/base/network_change_notifier.h" | 9 #include "net/base/network_change_notifier.h" |
10 #include "net/base/test_completion_callback.h" | 10 #include "net/base/test_completion_callback.h" |
11 #include "net/dns/host_resolver.h" | 11 #include "net/dns/host_resolver.h" |
12 #include "net/dns/mock_host_resolver.h" | 12 #include "net/dns/mock_host_resolver.h" |
13 #include "net/socket/socket_test_util.h" | 13 #include "net/socket/socket_test_util.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "testing/platform_test.h" | 15 #include "testing/platform_test.h" |
16 | 16 |
| 17 using std::string; |
| 18 |
17 namespace chrome_browser_net { | 19 namespace chrome_browser_net { |
18 | 20 |
19 class NetworkStatsTest : public PlatformTest { | 21 class NetworkStatsTest : public PlatformTest { |
20 public: | 22 public: |
21 NetworkStatsTest() {} | 23 NetworkStatsTest() {} |
22 | 24 |
23 protected: | 25 protected: |
24 void SetUp() override { | 26 void SetUp() override { |
25 net::NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); | 27 net::NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); |
26 base::MessageLoop::current()->RunUntilIdle(); | 28 base::MessageLoop::current()->RunUntilIdle(); |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 TestStartOneTest( | 401 TestStartOneTest( |
400 false, NetworkStats::PACKET_SIZE_TEST, 1500, 0, 1, net::SYNCHRONOUS); | 402 false, NetworkStats::PACKET_SIZE_TEST, 1500, 0, 1, net::SYNCHRONOUS); |
401 } | 403 } |
402 | 404 |
403 TEST_F(NetworkStatsTest, StartPacketSizeTest1500BHasNoProxy) { | 405 TEST_F(NetworkStatsTest, StartPacketSizeTest1500BHasNoProxy) { |
404 TestStartOneTest( | 406 TestStartOneTest( |
405 false, NetworkStats::PACKET_SIZE_TEST, 1500, 0, 1, net::ASYNC); | 407 false, NetworkStats::PACKET_SIZE_TEST, 1500, 0, 1, net::ASYNC); |
406 } | 408 } |
407 | 409 |
408 } // namespace chrome_browser_net | 410 } // namespace chrome_browser_net |
OLD | NEW |