OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef NET_TEST_NET_TEST_SUITE_H_ | 5 #ifndef NET_TEST_NET_TEST_SUITE_H_ |
6 #define NET_TEST_NET_TEST_SUITE_H_ | 6 #define NET_TEST_NET_TEST_SUITE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/test/test_suite.h" | 9 #include "base/test/test_suite.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "net/dns/mock_host_resolver.h" | 11 #include "net/dns/mock_host_resolver.h" |
12 | 12 |
| 13 namespace base { |
13 class MessageLoop; | 14 class MessageLoop; |
| 15 } |
14 | 16 |
15 namespace net { | 17 namespace net { |
16 class NetworkChangeNotifier; | 18 class NetworkChangeNotifier; |
17 } | 19 } |
18 | 20 |
19 class NetTestSuite : public base::TestSuite { | 21 class NetTestSuite : public base::TestSuite { |
20 public: | 22 public: |
21 NetTestSuite(int argc, char** argv); | 23 NetTestSuite(int argc, char** argv); |
22 virtual ~NetTestSuite(); | 24 virtual ~NetTestSuite(); |
23 | 25 |
(...skipping 14 matching lines...) Expand all Loading... |
38 void InitializeTestThread(); | 40 void InitializeTestThread(); |
39 | 41 |
40 // Same as above, except it does not create a mock | 42 // Same as above, except it does not create a mock |
41 // NetworkChangeNotifier. Use this if your test needs to create and | 43 // NetworkChangeNotifier. Use this if your test needs to create and |
42 // manage its own mock NetworkChangeNotifier, or if your test uses | 44 // manage its own mock NetworkChangeNotifier, or if your test uses |
43 // the production NetworkChangeNotifier. | 45 // the production NetworkChangeNotifier. |
44 void InitializeTestThreadNoNetworkChangeNotifier(); | 46 void InitializeTestThreadNoNetworkChangeNotifier(); |
45 | 47 |
46 private: | 48 private: |
47 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 49 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
48 scoped_ptr<MessageLoop> message_loop_; | 50 scoped_ptr<base::MessageLoop> message_loop_; |
49 scoped_refptr<net::RuleBasedHostResolverProc> host_resolver_proc_; | 51 scoped_refptr<net::RuleBasedHostResolverProc> host_resolver_proc_; |
50 net::ScopedDefaultHostResolverProc scoped_host_resolver_proc_; | 52 net::ScopedDefaultHostResolverProc scoped_host_resolver_proc_; |
51 }; | 53 }; |
52 | 54 |
53 #endif // NET_TEST_NET_TEST_SUITE_H_ | 55 #endif // NET_TEST_NET_TEST_SUITE_H_ |
OLD | NEW |