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

Side by Side Diff: chrome/test/ui/ui_test_suite.cc

Issue 190663012: Run ContentMain in a browser_test's browser process. This removes duplication of code in the browse… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: try to fix android by restoring old path just for it Created 6 years, 9 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/test/ui/ui_test_suite.h ('k') | content/app/content_main_runner.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 "chrome/test/ui/ui_test_suite.h" 5 #include "chrome/test/ui/ui_test_suite.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 21 matching lines...) Expand all
32 32
33 void UITestSuite::Shutdown() { 33 void UITestSuite::Shutdown() {
34 #if defined(OS_WIN) 34 #if defined(OS_WIN)
35 if (crash_service_) 35 if (crash_service_)
36 base::KillProcess(crash_service_, 0, false); 36 base::KillProcess(crash_service_, 0, false);
37 job_handle_.Close(); 37 job_handle_.Close();
38 #endif 38 #endif
39 ChromeTestSuite::Shutdown(); 39 ChromeTestSuite::Shutdown();
40 } 40 }
41 41
42 bool UITestSuite::IsBrowserTestSuite() { return false; }
43
44 #if defined(OS_WIN) 42 #if defined(OS_WIN)
45 void UITestSuite::LoadCrashService() { 43 void UITestSuite::LoadCrashService() {
46 scoped_ptr<base::Environment> env(base::Environment::Create()); 44 scoped_ptr<base::Environment> env(base::Environment::Create());
47 if (env->HasVar(env_vars::kHeadless)) 45 if (env->HasVar(env_vars::kHeadless))
48 return; 46 return;
49 47
50 if (base::GetProcessCount(L"crash_service.exe", NULL)) 48 if (base::GetProcessCount(L"crash_service.exe", NULL))
51 return; 49 return;
52 50
53 job_handle_.Set(CreateJobObject(NULL, NULL)); 51 job_handle_.Set(CreateJobObject(NULL, NULL));
(...skipping 21 matching lines...) Expand all
75 base::win::ScopedHandle crash_service_handle; 73 base::win::ScopedHandle crash_service_handle;
76 if (!base::LaunchProcess(crash_service.value(), base::LaunchOptions(), 74 if (!base::LaunchProcess(crash_service.value(), base::LaunchOptions(),
77 &crash_service_handle)) { 75 &crash_service_handle)) {
78 LOG(ERROR) << "Couldn't start crash_service.exe, so this ui_tests run " 76 LOG(ERROR) << "Couldn't start crash_service.exe, so this ui_tests run "
79 << "won't tell you if any test crashes!"; 77 << "won't tell you if any test crashes!";
80 return; 78 return;
81 } 79 }
82 crash_service_ = crash_service_handle.Take(); 80 crash_service_ = crash_service_handle.Take();
83 } 81 }
84 #endif 82 #endif
OLDNEW
« no previous file with comments | « chrome/test/ui/ui_test_suite.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698