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

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

Issue 4194005: This moves log output for ChromeOS to safer locations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload after sync Created 10 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/logging_chrome.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/mac/scoped_nsautorelease_pool.h" 10 #include "base/mac/scoped_nsautorelease_pool.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/io_thread.h" 21 #include "chrome/browser/io_thread.h"
22 #include "chrome/browser/net/url_request_mock_util.h" 22 #include "chrome/browser/net/url_request_mock_util.h"
23 #include "chrome/browser/profile.h" 23 #include "chrome/browser/profile.h"
24 #include "chrome/browser/profile_manager.h" 24 #include "chrome/browser/profile_manager.h"
25 #include "chrome/browser/renderer_host/render_process_host.h" 25 #include "chrome/browser/renderer_host/render_process_host.h"
26 #include "chrome/browser/tab_contents/tab_contents.h" 26 #include "chrome/browser/tab_contents/tab_contents.h"
27 #include "chrome/browser/tabs/tab_strip_model.h" 27 #include "chrome/browser/tabs/tab_strip_model.h"
28 #include "chrome/common/chrome_constants.h" 28 #include "chrome/common/chrome_constants.h"
29 #include "chrome/common/chrome_paths.h" 29 #include "chrome/common/chrome_paths.h"
30 #include "chrome/common/chrome_switches.h" 30 #include "chrome/common/chrome_switches.h"
31 #include "chrome/common/logging_chrome.h"
31 #include "chrome/common/main_function_params.h" 32 #include "chrome/common/main_function_params.h"
32 #include "chrome/common/notification_registrar.h" 33 #include "chrome/common/notification_registrar.h"
33 #include "chrome/common/notification_type.h" 34 #include "chrome/common/notification_type.h"
34 #include "chrome/common/url_constants.h" 35 #include "chrome/common/url_constants.h"
35 #include "chrome/test/test_launcher_utils.h" 36 #include "chrome/test/test_launcher_utils.h"
36 #include "chrome/test/testing_browser_process.h" 37 #include "chrome/test/testing_browser_process.h"
37 #include "chrome/test/ui_test_utils.h" 38 #include "chrome/test/ui_test_utils.h"
38 #include "net/base/mock_host_resolver.h" 39 #include "net/base/mock_host_resolver.h"
39 #include "net/test/test_server.h" 40 #include "net/test/test_server.h"
40 #include "sandbox/src/dep.h" 41 #include "sandbox/src/dep.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 #endif 183 #endif
183 184
184 // If ncecessary, disable TabCloseableStateWatcher. 185 // If ncecessary, disable TabCloseableStateWatcher.
185 if (!tab_closeable_state_watcher_enabled_) 186 if (!tab_closeable_state_watcher_enabled_)
186 command_line->AppendSwitch(switches::kDisableTabCloseableStateWatcher); 187 command_line->AppendSwitch(switches::kDisableTabCloseableStateWatcher);
187 188
188 test_launcher_utils::PrepareBrowserCommandLineForTests(command_line); 189 test_launcher_utils::PrepareBrowserCommandLineForTests(command_line);
189 190
190 #if defined(OS_CHROMEOS) 191 #if defined(OS_CHROMEOS)
191 chromeos::CrosLibrary::Get()->GetTestApi()->SetUseStubImpl(); 192 chromeos::CrosLibrary::Get()->GetTestApi()->SetUseStubImpl();
193
194 // Make sure that the log directory exists.
195 FilePath log_dir = logging::GetSessionLogFile(*command_line).DirName();
Greg Spencer (Chromium) 2010/11/01 22:59:59 This is only to keep the number of warnings down d
196 file_util::CreateDirectory(log_dir);
192 #endif // defined(OS_CHROMEOS) 197 #endif // defined(OS_CHROMEOS)
193 198
194 SandboxInitWrapper sandbox_wrapper; 199 SandboxInitWrapper sandbox_wrapper;
195 MainFunctionParams params(*command_line, sandbox_wrapper, NULL); 200 MainFunctionParams params(*command_line, sandbox_wrapper, NULL);
196 params.ui_task = 201 params.ui_task =
197 NewRunnableMethod(this, &InProcessBrowserTest::RunTestOnMainThreadLoop); 202 NewRunnableMethod(this, &InProcessBrowserTest::RunTestOnMainThreadLoop);
198 203
199 host_resolver_ = new net::RuleBasedHostResolverProc( 204 host_resolver_ = new net::RuleBasedHostResolverProc(
200 new IntranetRedirectHostResolverProc(NULL)); 205 new IntranetRedirectHostResolverProc(NULL));
201 206
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 return; 346 return;
342 347
343 // Invoke CloseAllBrowsersAndExit on a running message loop. 348 // Invoke CloseAllBrowsersAndExit on a running message loop.
344 // CloseAllBrowsersAndExit exits the message loop after everything has been 349 // CloseAllBrowsersAndExit exits the message loop after everything has been
345 // shut down properly. 350 // shut down properly.
346 MessageLoopForUI::current()->PostTask( 351 MessageLoopForUI::current()->PostTask(
347 FROM_HERE, 352 FROM_HERE,
348 NewRunnableFunction(&BrowserList::CloseAllBrowsersAndExit)); 353 NewRunnableFunction(&BrowserList::CloseAllBrowsersAndExit));
349 ui_test_utils::RunMessageLoop(); 354 ui_test_utils::RunMessageLoop();
350 } 355 }
OLDNEW
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698