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

Side by Side Diff: chrome/common/ipc_tests.cc

Issue 10895: Add Terminate() to the Process object, have RenderProcessHost use this to avo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_process_filter.h ('k') | chrome/common/plugin_messages_internal.h » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <windows.h> 5 #include <windows.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <iostream> 7 #include <iostream>
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/common/ipc_tests.h" 10 #include "chrome/common/ipc_tests.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 CommandLine::AppendSwitch(&cl, kFuzzer); 370 CommandLine::AppendSwitch(&cl, kFuzzer);
371 break; 371 break;
372 default: 372 default:
373 return NULL; 373 return NULL;
374 } 374 }
375 // kDebugChildren support. 375 // kDebugChildren support.
376 if (CommandLine().HasSwitch(switches::kDebugChildren)) { 376 if (CommandLine().HasSwitch(switches::kDebugChildren)) {
377 CommandLine::AppendSwitch(&cl, switches::kDebugOnStart); 377 CommandLine::AppendSwitch(&cl, switches::kDebugOnStart);
378 } 378 }
379 HANDLE process = NULL; 379 HANDLE process = NULL;
380 if (!process_util::LaunchApp(cl, false, true, &process)) 380 if (!base::LaunchApp(cl, false, true, &process))
381 return NULL; 381 return NULL;
382 382
383 return process; 383 return process;
384 } 384 }
385 385
386 int main(int argc, char** argv) { 386 int main(int argc, char** argv) {
387 process_util::EnableTerminationOnHeapCorruption(); 387 base::EnableTerminationOnHeapCorruption();
388 // Some tests may use base::Singleton<>, thus we need to instanciate 388 // Some tests may use base::Singleton<>, thus we need to instanciate
389 // the AtExitManager or else we will leak objects. 389 // the AtExitManager or else we will leak objects.
390 base::AtExitManager at_exit_manager; 390 base::AtExitManager at_exit_manager;
391 391
392 MessageLoopForIO main_message_loop; 392 MessageLoopForIO main_message_loop;
393 393
394 // suppress standard crash dialogs and such unless a debugger is present. 394 // suppress standard crash dialogs and such unless a debugger is present.
395 if (!IsDebuggerPresent()) { 395 if (!IsDebuggerPresent()) {
396 SuppressErrorDialogs(); 396 SuppressErrorDialogs();
397 logging::SetLogAssertHandler(IPCTestAssertHandler); 397 logging::SetLogAssertHandler(IPCTestAssertHandler);
398 } 398 }
399 399
400 #ifndef PERFORMANCE_TEST 400 #ifndef PERFORMANCE_TEST
401 if (CommandLine().HasSwitch(kChild)) 401 if (CommandLine().HasSwitch(kChild))
402 return RunTestClient(); 402 return RunTestClient();
403 if (CommandLine().HasSwitch(kFuzzer)) 403 if (CommandLine().HasSwitch(kFuzzer))
404 return RunFuzzServer(); 404 return RunFuzzServer();
405 #else 405 #else
406 if (CommandLine().HasSwitch(kReflector)) 406 if (CommandLine().HasSwitch(kReflector))
407 return RunReflector(); 407 return RunReflector();
408 408
409 if (!InitPerfLog("ipc_perf_child.log")) 409 if (!InitPerfLog("ipc_perf_child.log"))
410 return 1; 410 return 1;
411 #endif 411 #endif
412 412
413 testing::InitGoogleTest(&argc, argv); 413 testing::InitGoogleTest(&argc, argv);
414 return RUN_ALL_TESTS(); 414 return RUN_ALL_TESTS();
415 } 415 }
416 416
OLDNEW
« no previous file with comments | « chrome/common/chrome_process_filter.h ('k') | chrome/common/plugin_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698