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

Side by Side Diff: ipc/ipc_test_base.h

Issue 815503005: Standardize usage of virtual/override/final specifiers in ipc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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
« no previous file with comments | « ipc/ipc_channel_proxy_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 IPC_IPC_TEST_BASE_H_ 5 #ifndef IPC_IPC_TEST_BASE_H_
6 #define IPC_IPC_TEST_BASE_H_ 6 #define IPC_IPC_TEST_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 14 matching lines...) Expand all
25 // several different tests. 25 // several different tests.
26 class IPCTestBase : public base::MultiProcessTest { 26 class IPCTestBase : public base::MultiProcessTest {
27 public: 27 public:
28 // The channel name is based on the client's name. This is a public static 28 // The channel name is based on the client's name. This is a public static
29 // helper to be used by the client-side code; server-side test code should 29 // helper to be used by the client-side code; server-side test code should
30 // usually not use this (directly). 30 // usually not use this (directly).
31 static std::string GetChannelName(const std::string& test_client_name); 31 static std::string GetChannelName(const std::string& test_client_name);
32 32
33 protected: 33 protected:
34 IPCTestBase(); 34 IPCTestBase();
35 virtual ~IPCTestBase(); 35 ~IPCTestBase() override;
36 36
37 virtual void TearDown() override; 37 void TearDown() override;
38 38
39 // Initializes the test to use the given client and creates an IO message loop 39 // Initializes the test to use the given client and creates an IO message loop
40 // on the current thread. 40 // on the current thread.
41 void Init(const std::string& test_client_name); 41 void Init(const std::string& test_client_name);
42 // Some tests create separate thread for IO message loop and run non-IO 42 // Some tests create separate thread for IO message loop and run non-IO
43 // message loop on the main thread. As IPCTestBase creates IO message loop by 43 // message loop on the main thread. As IPCTestBase creates IO message loop by
44 // default, such tests need to provide a custom message loop for the main 44 // default, such tests need to provide a custom message loop for the main
45 // thread. 45 // thread.
46 void InitWithCustomMessageLoop(const std::string& test_client_name, 46 void InitWithCustomMessageLoop(const std::string& test_client_name,
47 scoped_ptr<base::MessageLoop> message_loop); 47 scoped_ptr<base::MessageLoop> message_loop);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 base::ProcessHandle client_process_; 120 base::ProcessHandle client_process_;
121 121
122 DISALLOW_COPY_AND_ASSIGN(IPCTestBase); 122 DISALLOW_COPY_AND_ASSIGN(IPCTestBase);
123 }; 123 };
124 124
125 // Use this to declare the client side for tests using IPCTestBase. 125 // Use this to declare the client side for tests using IPCTestBase.
126 #define MULTIPROCESS_IPC_TEST_CLIENT_MAIN(test_client_name) \ 126 #define MULTIPROCESS_IPC_TEST_CLIENT_MAIN(test_client_name) \
127 MULTIPROCESS_IPC_TEST_MAIN(test_client_name ## TestClientMain) 127 MULTIPROCESS_IPC_TEST_MAIN(test_client_name ## TestClientMain)
128 128
129 #endif // IPC_IPC_TEST_BASE_H_ 129 #endif // IPC_IPC_TEST_BASE_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_proxy_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698