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

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

Issue 3171027: [Mac] Enforce proper usage of main app bundle and helper app bundle.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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/app/chrome_dll_main.cc ('k') | no next file » | 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) 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 #include "chrome/test/in_process_browser_test.h" 5 #include "chrome/test/in_process_browser_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 command_line->AppendSwitchPath(switches::kBrowserSubprocessPath, 159 command_line->AppendSwitchPath(switches::kBrowserSubprocessPath,
160 command_line->GetProgram()); 160 command_line->GetProgram());
161 #else 161 #else
162 // Explicitly set the path of the binary used for child processes, otherwise 162 // Explicitly set the path of the binary used for child processes, otherwise
163 // they'll try to use browser_tests which doesn't contain ChromeMain. 163 // they'll try to use browser_tests which doesn't contain ChromeMain.
164 FilePath subprocess_path; 164 FilePath subprocess_path;
165 PathService::Get(base::FILE_EXE, &subprocess_path); 165 PathService::Get(base::FILE_EXE, &subprocess_path);
166 subprocess_path = subprocess_path.DirName(); 166 subprocess_path = subprocess_path.DirName();
167 subprocess_path = subprocess_path.AppendASCII(WideToASCII( 167 subprocess_path = subprocess_path.AppendASCII(WideToASCII(
168 chrome::kBrowserProcessExecutablePath)); 168 chrome::kBrowserProcessExecutablePath));
169 #if defined(OS_MACOSX)
170 // Recreate the real environment, run the helper within the app bundle.
171 subprocess_path = subprocess_path.DirName().DirName();
172 DCHECK_EQ(subprocess_path.BaseName().value(), "Contents");
173 subprocess_path =
174 subprocess_path.Append("Versions").Append(chrome::kChromeVersion);
175 subprocess_path =
176 subprocess_path.Append(chrome::kHelperProcessExecutablePath);
177 #endif
169 command_line->AppendSwitchPath(switches::kBrowserSubprocessPath, 178 command_line->AppendSwitchPath(switches::kBrowserSubprocessPath,
170 subprocess_path); 179 subprocess_path);
171 #endif 180 #endif
172 181
173 // Enable warning level logging so that we can see when bad stuff happens. 182 // Enable warning level logging so that we can see when bad stuff happens.
174 command_line->AppendSwitch(switches::kEnableLogging); 183 command_line->AppendSwitch(switches::kEnableLogging);
175 command_line->AppendSwitchASCII(switches::kLoggingLevel, "1"); // warning 184 command_line->AppendSwitchASCII(switches::kLoggingLevel, "1"); // warning
176 185
177 // If ncecessary, disable TabCloseableStateWatcher. 186 // If ncecessary, disable TabCloseableStateWatcher.
178 if (!tab_closeable_state_watcher_enabled_) 187 if (!tab_closeable_state_watcher_enabled_)
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 MessageLoopForUI::current()->Quit(); 339 MessageLoopForUI::current()->Quit();
331 340
332 // WARNING: This must be after Quit as it returns. 341 // WARNING: This must be after Quit as it returns.
333 FAIL() << error_message; 342 FAIL() << error_message;
334 } 343 }
335 344
336 void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) { 345 void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) {
337 DCHECK_GT(timeout_value, 0); 346 DCHECK_GT(timeout_value, 0);
338 initial_timeout_ = timeout_value; 347 initial_timeout_ = timeout_value;
339 } 348 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698