diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-06 16:55:31 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-06 16:55:31 +0000 |
commit | 54903eaa08bde272797e0f2a6befa213dd93b9b6 (patch) | |
tree | 8942151daaafc156282d60d45017372e12cced22 | |
parent | d24dff2a3e840d45835a331f930b529f489ff582 (diff) | |
download | chromium_src-54903eaa08bde272797e0f2a6befa213dd93b9b6.zip chromium_src-54903eaa08bde272797e0f2a6befa213dd93b9b6.tar.gz chromium_src-54903eaa08bde272797e0f2a6befa213dd93b9b6.tar.bz2 |
Allows browser tests to run with recent change
http://codereview.chromium.org/2003001 broke browser tests for
login / wizard screens. This fixes them.
Review URL: http://codereview.chromium.org/1995005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46575 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 6 | ||||
-rw-r--r-- | chrome/browser/chromeos/boot_times_loader.cc | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index 9e2becc..2e2a209 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -399,8 +399,10 @@ int ChromeMain(int argc, char** argv) { #endif #if defined(OS_CHROMEOS) // Output our start times. - system("set -o noclobber ; cat /proc/uptime > /tmp/uptime-chrome-main"); - system("set -o noclobber ; cat /sys/block/sda/stat > /tmp/disk-chrome-main"); + system("if [ ! -f /tmp/uptime-chrome-main ]; " + "then cat /proc/uptime > /tmp/uptime-chrome-main ; fi"); + system("if [ ! -f /tmp/disk-chrome-main ]; " + "then cat /sys/block/sda/stat > /tmp/disk-chrome-main ; fi"); #endif #if defined(OS_MACOSX) // TODO(mark): Some of these things ought to be handled in chrome_exe_main.mm. diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc index c169298..1d06fad 100644 --- a/chrome/browser/chromeos/boot_times_loader.cc +++ b/chrome/browser/chromeos/boot_times_loader.cc @@ -14,6 +14,7 @@ #include "base/string_util.h" #include "base/thread.h" #include "chrome/browser/browser_process.h" +#include "chrome/common/chrome_switches.h" namespace chromeos { @@ -38,6 +39,13 @@ BootTimesLoader::Handle BootTimesLoader::GetBootTimes( return 0; } + const CommandLine& command_line = *CommandLine::ForCurrentProcess(); + if (command_line.HasSwitch(switches::kTestType)) { + // TODO(davemoore) This avoids boottimes for tests. This needs to be + // replaced with a mock of BootTimesLoader. + return 0; + } + scoped_refptr<CancelableRequest<GetBootTimesCallback> > request( new CancelableRequest<GetBootTimesCallback>(callback)); AddRequest(request, consumer); |