diff options
author | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 05:40:20 +0000 |
---|---|---|
committer | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 05:40:20 +0000 |
commit | 4777f90e913cec0e218f5c45eaf01cd388c9e6ed (patch) | |
tree | 3d0fcfe1cbb951cefc418deca60ff3cec7e61383 | |
parent | a3747d726e2b87af9ee3e68a44955a212b8bd256 (diff) | |
download | chromium_src-4777f90e913cec0e218f5c45eaf01cd388c9e6ed.zip chromium_src-4777f90e913cec0e218f5c45eaf01cd388c9e6ed.tar.gz chromium_src-4777f90e913cec0e218f5c45eaf01cd388c9e6ed.tar.bz2 |
Enable crash reporting by default with PyAuto on Mac/Linux
It's already enabled on windows by default. This of course applies only to the branded builds.
Also, make the path to imported pyauto binaries prettier by applying os.path.normpath
Change to chrome_switches.cc is to put a comment at the place where it belongs
Review URL: http://codereview.chromium.org/2873073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53911 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/common/chrome_switches.cc | 2 | ||||
-rw-r--r-- | chrome/test/pyautolib/pyauto.py | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index ff73e13..72a746f 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -1046,7 +1046,6 @@ const char kUseSystemSSL[] = "use-system-ssl"; #endif #if defined(OS_POSIX) -// Bypass the error dialog when the profile lock couldn't be attained. // A flag, generated internally by Chrome for renderer and other helper process // command lines on Linux and Mac. It tells the helper process to enable crash // dumping and reporting, because helpers cannot access the profile or other @@ -1055,6 +1054,7 @@ const char kUseSystemSSL[] = "use-system-ssl"; // as well, thereby force-enabling the crash reporter. const char kEnableCrashReporter[] = "enable-crash-reporter"; +// Bypass the error dialog when the profile lock couldn't be attained. // This switch is used during automated testing. const char kNoProcessSingletonDialog[] = "no-process-singleton-dialog"; diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py index c499efa..c57c411 100644 --- a/chrome/test/pyautolib/pyauto.py +++ b/chrome/test/pyautolib/pyauto.py @@ -60,7 +60,7 @@ def _LocateBinDirs(): os.pardir, os.pardir, 'third_party'), script_dir, ] - sys.path += bin_dirs.get(sys.platform, []) + deps_dirs + sys.path += map(os.path.normpath, bin_dirs.get(sys.platform, []) + deps_dirs) _LocateBinDirs() @@ -1305,7 +1305,7 @@ class Main(object): else: args = self._LoadTestNamesFrom(pyauto_tests_file) args = args * self._options.repeat - logging.debug("Loading tests from %s", args) + logging.debug("Loading %d tests from %s", len(args), args) loaded_tests = unittest.defaultTestLoader.loadTestsFromNames(args) return loaded_tests @@ -1337,8 +1337,15 @@ class Main(object): raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid()) suite_args = [sys.argv[0]] - if self._options.chrome_flags: - suite_args.append('--extra-chrome-flags=' + self._options.chrome_flags) + chrome_flags = self._options.chrome_flags + # Enable crash reporter by default on posix. + # On windows, the choice to enable/disable crash reporting is made when + # downloading the installer. + # TODO(nirnimesh): Figure out a way to control this from here on Win too. + if PyUITest.IsPosix(): + chrome_flags += ' --enable-crash-reporter' + if chrome_flags: + suite_args.append('--extra-chrome-flags=%s' % chrome_flags) pyauto_suite = PyUITestSuite(suite_args) loaded_tests = self._LoadTests(self._args) pyauto_suite.addTests(loaded_tests) |