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