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

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

Issue 45053: When running ui_tests, need to tell valgrind to also trace child processes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « no previous file | tools/valgrind/chrome_tests.py » ('j') | tools/valgrind/valgrind_test.py » ('J')
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 "chrome/test/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 browser_launch_time_ = TimeTicks::Now(); 348 browser_launch_time_ = TimeTicks::Now();
349 349
350 #if defined(OS_WIN) 350 #if defined(OS_WIN)
351 bool started = base::LaunchApp(command_line, 351 bool started = base::LaunchApp(command_line,
352 false, // Don't wait for process object 352 false, // Don't wait for process object
353 // (doesn't work for us) 353 // (doesn't work for us)
354 !show_window_, 354 !show_window_,
355 &process_); 355 &process_);
356 #elif defined(OS_POSIX) 356 #elif defined(OS_POSIX)
357 // Sometimes one needs to run the browser under a special environment
358 // (e.g. valgrind) without also running the test harness (e.g. python)
359 // under the special environment. Provide a way to wrap the browser
360 // commandline with a special prefix to invoke the special environment.
361 const char* browser_wrapper = getenv("BROWSER_WRAPPER");
362 if (browser_wrapper) {
363 CommandLine wrapped_command(ASCIIToWide(browser_wrapper));
364 wrapped_command.AppendArguments(command_line, true);
365 command_line = wrapped_command;
366 LOG(INFO) << "BROWSER_WRAPPER was set, prefixing command_line with " << brow ser_wrapper;
Dean McNamee 2009/03/27 11:34:55 80 cols
367 }
368
357 bool started = base::LaunchApp(command_line.argv(), 369 bool started = base::LaunchApp(command_line.argv(),
358 server_->fds_to_map(), 370 server_->fds_to_map(),
359 false, // Don't wait. 371 false, // Don't wait.
360 &process_); 372 &process_);
361 #endif 373 #endif
362 ASSERT_TRUE(started); 374 ASSERT_TRUE(started);
363 375
364 #if defined(OS_WIN) 376 #if defined(OS_WIN)
365 if (use_existing_browser_) { 377 if (use_existing_browser_) {
366 DWORD pid = 0; 378 DWORD pid = 0;
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 } 850 }
839 851
840 bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) { 852 bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) {
841 for (int i = 0; i < 10; i++) { 853 for (int i = 0; i < 10; i++) {
842 if (file_util::EvictFileFromSystemCache(path)) 854 if (file_util::EvictFileFromSystemCache(path))
843 return true; 855 return true;
844 PlatformThread::Sleep(1000); 856 PlatformThread::Sleep(1000);
845 } 857 }
846 return false; 858 return false;
847 } 859 }
OLDNEW
« no previous file with comments | « no previous file | tools/valgrind/chrome_tests.py » ('j') | tools/valgrind/valgrind_test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698