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

Side by Side Diff: net/base/net_test_suite.h

Issue 12811011: net: move test files out of net/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome_frame/test/net/fake_external_tab.h ('k') | net/base/net_test_suite.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_BASE_NET_TEST_SUITE_H_
6 #define NET_BASE_NET_TEST_SUITE_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/test/test_suite.h"
10 #include "build/build_config.h"
11 #include "net/base/mock_host_resolver.h"
12
13 class MessageLoop;
14
15 namespace net {
16 class NetworkChangeNotifier;
17 }
18
19 class NetTestSuite : public base::TestSuite {
20 public:
21 NetTestSuite(int argc, char** argv);
22 virtual ~NetTestSuite();
23
24 virtual void Initialize() OVERRIDE;
25
26 virtual void Shutdown() OVERRIDE;
27
28 protected:
29 // This constructor is only accessible to specialized net test
30 // implementations which need to control the creation of an AtExitManager
31 // instance for the duration of the test.
32 NetTestSuite(int argc, char** argv, bool create_at_exit_manager);
33
34 // Called from within Initialize(), but separate so that derived classes
35 // can initialize the NetTestSuite instance only and not
36 // TestSuite::Initialize(). TestSuite::Initialize() performs some global
37 // initialization that can only be done once.
38 void InitializeTestThread();
39
40 // Same as above, except it does not create a mock
41 // NetworkChangeNotifier. Use this if your test needs to create and
42 // manage its own mock NetworkChangeNotifier, or if your test uses
43 // the production NetworkChangeNotifier.
44 void InitializeTestThreadNoNetworkChangeNotifier();
45
46 private:
47 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
48 scoped_ptr<MessageLoop> message_loop_;
49 scoped_refptr<net::RuleBasedHostResolverProc> host_resolver_proc_;
50 net::ScopedDefaultHostResolverProc scoped_host_resolver_proc_;
51 };
52
53 #endif // NET_BASE_NET_TEST_SUITE_H_
OLDNEW
« no previous file with comments | « chrome_frame/test/net/fake_external_tab.h ('k') | net/base/net_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698