OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/importer/firefox_importer_unittest_utils.h" | 5 #include "chrome/browser/importer/firefox_importer_unittest_utils.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug_on_start.h" | 8 #include "base/debug_on_start.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "chrome/browser/importer/firefox_importer_utils.h" | 11 #include "chrome/browser/importer/firefox_importer_utils.h" |
12 #include "ipc/ipc_channel.h" | 12 #include "ipc/ipc_channel.h" |
13 #include "ipc/ipc_descriptors.h" | 13 #include "ipc/ipc_descriptors.h" |
14 #include "ipc/ipc_message.h" | 14 #include "ipc/ipc_message.h" |
15 #include "ipc/ipc_message_utils.h" | 15 #include "ipc/ipc_message_utils.h" |
16 #include "ipc/ipc_switches.h" | 16 #include "ipc/ipc_switches.h" |
17 #include "testing/multiprocess_func_list.h" | 17 #include "testing/multiprocess_func_list.h" |
18 | 18 |
19 // Declaration of IPC Messages used for this test. | 19 // Definition of IPC Messages used for this test. |
20 #define MESSAGES_INTERNAL_FILE \ | 20 #define MESSAGES_INTERNAL_FILE \ |
21 "chrome/browser/importer/firefox_importer_unittest_messages_internal.h" | 21 "chrome/browser/importer/firefox_importer_unittest_messages_internal.h" |
22 #include "ipc/ipc_message_macros.h" | 22 #include "ipc/ipc_message_macros.h" |
23 | 23 |
24 // Definition of IPC Messages used for this test. | |
25 #define MESSAGES_INTERNAL_IMPL_FILE \ | |
26 "chrome/browser/importer/firefox_importer_unittest_messages_internal.h" | |
27 #include "ipc/ipc_message_impl_macros.h" | |
28 | |
29 namespace { | 24 namespace { |
30 | 25 |
31 // Name of IPC Channel to use for Server<-> Child Communications. | 26 // Name of IPC Channel to use for Server<-> Child Communications. |
32 const char kTestChannelID[] = "T1"; | 27 const char kTestChannelID[] = "T1"; |
33 | 28 |
34 // Launch the child process: | 29 // Launch the child process: |
35 // |nss_path| - path to the NSS directory holding the decryption libraries. | 30 // |nss_path| - path to the NSS directory holding the decryption libraries. |
36 // |channel| - IPC Channel to use for communication. | 31 // |channel| - IPC Channel to use for communication. |
37 // |handle| - On return, the process handle to use to communicate with the | 32 // |handle| - On return, the process handle to use to communicate with the |
38 // child. | 33 // child. |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 256 |
262 IPC::Channel channel(kTestChannelID, IPC::Channel::MODE_CLIENT, &listener); | 257 IPC::Channel channel(kTestChannelID, IPC::Channel::MODE_CLIENT, &listener); |
263 channel.Connect(); | 258 channel.Connect(); |
264 listener.SetSender(&channel); | 259 listener.SetSender(&channel); |
265 | 260 |
266 // run message loop | 261 // run message loop |
267 MessageLoop::current()->Run(); | 262 MessageLoop::current()->Run(); |
268 | 263 |
269 return 0; | 264 return 0; |
270 } | 265 } |
OLD | NEW |