OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This test validates that the ProcessSingleton class properly makes sure | 5 // This test validates that the ProcessSingleton class properly makes sure |
6 // that there is only one main browser process. | 6 // that there is only one main browser process. |
7 // | 7 // |
8 // It is currently compiled and run on Windows and Posix(non-Mac) platforms. | 8 // It is currently compiled and run on Windows and Posix(non-Mac) platforms. |
9 // Mac uses system services and ProcessSingletonMac is a noop. (Maybe it still | 9 // Mac uses system services and ProcessSingletonMac is a noop. (Maybe it still |
10 // makes sense to test that the system services are giving the behavior we | 10 // makes sense to test that the system services are giving the behavior we |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 command_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir_); | 66 command_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir_); |
67 | 67 |
68 if (first_run) | 68 if (first_run) |
69 command_line.AppendSwitch(switches::kFirstRun); | 69 command_line.AppendSwitch(switches::kFirstRun); |
70 else | 70 else |
71 command_line.AppendSwitch(switches::kNoFirstRun); | 71 command_line.AppendSwitch(switches::kNoFirstRun); |
72 | 72 |
73 // Add the normal test-mode switches, except for the ones we're adding | 73 // Add the normal test-mode switches, except for the ones we're adding |
74 // ourselves. | 74 // ourselves. |
75 CommandLine standard_switches(CommandLine::ARGUMENTS_ONLY); | 75 CommandLine standard_switches(CommandLine::NO_PROGRAM); |
76 test_launcher_utils::PrepareBrowserCommandLineForTests(&standard_switches); | 76 test_launcher_utils::PrepareBrowserCommandLineForTests(&standard_switches); |
77 const CommandLine::SwitchMap& switch_map = standard_switches.GetSwitches(); | 77 const CommandLine::SwitchMap& switch_map = standard_switches.GetSwitches(); |
78 for (CommandLine::SwitchMap::const_iterator i = switch_map.begin(); | 78 for (CommandLine::SwitchMap::const_iterator i = switch_map.begin(); |
79 i != switch_map.end(); ++i) { | 79 i != switch_map.end(); ++i) { |
80 const std::string& switch_name = i->first; | 80 const std::string& switch_name = i->first; |
81 if (switch_name == switches::kUserDataDir || | 81 if (switch_name == switches::kUserDataDir || |
82 switch_name == switches::kFirstRun || | 82 switch_name == switches::kFirstRun || |
83 switch_name == switches::kNoFirstRun) | 83 switch_name == switches::kNoFirstRun) |
84 continue; | 84 continue; |
85 | 85 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 pending_starters.empty(); | 317 pending_starters.empty(); |
318 if (chrome_starters_[last_index]->process_handle_ != | 318 if (chrome_starters_[last_index]->process_handle_ != |
319 base::kNullProcessHandle) { | 319 base::kNullProcessHandle) { |
320 KillProcessTree(chrome_starters_[last_index]->process_handle_); | 320 KillProcessTree(chrome_starters_[last_index]->process_handle_); |
321 chrome_starters_[last_index]->done_event_.Wait(); | 321 chrome_starters_[last_index]->done_event_.Wait(); |
322 } | 322 } |
323 } | 323 } |
324 } | 324 } |
325 | 325 |
326 } // namespace | 326 } // namespace |
OLD | NEW |