| 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 // Definition of IPC Messages used for this test. | 19 // Declaration 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 |
| 24 namespace { | 29 namespace { |
| 25 | 30 |
| 26 // Name of IPC Channel to use for Server<-> Child Communications. | 31 // Name of IPC Channel to use for Server<-> Child Communications. |
| 27 const char kTestChannelID[] = "T1"; | 32 const char kTestChannelID[] = "T1"; |
| 28 | 33 |
| 29 // Launch the child process: | 34 // Launch the child process: |
| 30 // |nss_path| - path to the NSS directory holding the decryption libraries. | 35 // |nss_path| - path to the NSS directory holding the decryption libraries. |
| 31 // |channel| - IPC Channel to use for communication. | 36 // |channel| - IPC Channel to use for communication. |
| 32 // |handle| - On return, the process handle to use to communicate with the | 37 // |handle| - On return, the process handle to use to communicate with the |
| 33 // child. | 38 // child. |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 261 |
| 257 IPC::Channel channel(kTestChannelID, IPC::Channel::MODE_CLIENT, &listener); | 262 IPC::Channel channel(kTestChannelID, IPC::Channel::MODE_CLIENT, &listener); |
| 258 channel.Connect(); | 263 channel.Connect(); |
| 259 listener.SetSender(&channel); | 264 listener.SetSender(&channel); |
| 260 | 265 |
| 261 // run message loop | 266 // run message loop |
| 262 MessageLoop::current()->Run(); | 267 MessageLoop::current()->Run(); |
| 263 | 268 |
| 264 return 0; | 269 return 0; |
| 265 } | 270 } |
| OLD | NEW |