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

Side by Side Diff: chrome/test/out_of_proc_test_runner.cc

Issue 6816024: Revert 80819 due to failed tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 8 months 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/renderer/renderer_glue.cc ('k') | media/tools/mfplayer/mf_playback_main.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 sandbox::TargetPolicy* policy = broker_services->CreatePolicy(); 572 sandbox::TargetPolicy* policy = broker_services->CreatePolicy();
573 sandbox::ResultCode result = policy->CreateAlternateDesktop(true); 573 sandbox::ResultCode result = policy->CreateAlternateDesktop(true);
574 CHECK(sandbox::SBOX_ERROR_FAILED_TO_SWITCH_BACK_WINSTATION != result); 574 CHECK(sandbox::SBOX_ERROR_FAILED_TO_SWITCH_BACK_WINSTATION != result);
575 policy->Release(); 575 policy->Release();
576 } 576 }
577 } 577 }
578 #endif 578 #endif
579 return ChromeTestSuite(argc, argv).Run(); 579 return ChromeTestSuite(argc, argv).Run();
580 } 580 }
581 581
582 // The exit manager is in charge of calling the dtors of singleton objects.
583 // On Windows, the call to ChromeMain() below will construct one for the
584 // chrome.dll module, but that global is not shared with this module, so if
585 // chrome.dll calls back out to this module and the called code uses a
586 // singleton, we'll need this. On other platforms, ChromeMain() isn't called
587 // at all below, so this is the lone exit manager for any code after this
588 // point.
589 // NOTE: We can't init this atop main() because ChromeTestSuite, as a subclass
590 // of TestSuite, creates one. So we wait until after the Run() call above to
591 // create the manager for the code path that _doesn't_ use ChromeTestSuite.
592 base::AtExitManager exit_manager;
593
594 #if defined(OS_WIN) 582 #if defined(OS_WIN)
595 if (command_line->HasSwitch(switches::kProcessType)) { 583 if (command_line->HasSwitch(switches::kProcessType)) {
596 // This is a child process, call ChromeMain. 584 // This is a child process, call ChromeMain.
597 FilePath chrome_path(command_line->GetProgram().DirName()); 585 FilePath chrome_path(command_line->GetProgram().DirName());
598 chrome_path = chrome_path.Append(chrome::kBrowserResourcesDll); 586 chrome_path = chrome_path.Append(chrome::kBrowserResourcesDll);
599 HMODULE dll = LoadLibrary(chrome_path.value().c_str()); 587 HMODULE dll = LoadLibrary(chrome_path.value().c_str());
600 DLL_MAIN entry_point = 588 DLL_MAIN entry_point =
601 reinterpret_cast<DLL_MAIN>(::GetProcAddress(dll, "ChromeMain")); 589 reinterpret_cast<DLL_MAIN>(::GetProcAddress(dll, "ChromeMain"));
602 if (!entry_point) 590 if (!entry_point)
603 return -1; 591 return -1;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 exit_code = 1; 628 exit_code = 1;
641 break; 629 break;
642 } 630 }
643 631
644 // Special value "-1" means "repeat indefinitely". 632 // Special value "-1" means "repeat indefinitely".
645 if (cycles != -1) 633 if (cycles != -1)
646 cycles--; 634 cycles--;
647 } 635 }
648 return exit_code; 636 return exit_code;
649 } 637 }
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_glue.cc ('k') | media/tools/mfplayer/mf_playback_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698