chrome/test/mini_installer/test_chrome_with_chromedriver.py
def CollectCrashReports(user_data_dir, output_dir):
        """Searches for Chrome crash reports, collecting them for analysis.

        Args:
            user_data_dir: The full path of the User Data dir.
            output_dir: If not None, a path to which collected crash reports are
                to be moved.

        Returns:
            The number of crash reports found.
        """
        report_dir = os.path.join(user_data_dir, 'Crashpad', 'reports')
        dumps = []
        try:
            dumps = os.listdir(report_dir)
        except OSError:
            # Assume this is file not found, meaning no crash reports.
            return 0
        for dump in dumps:
            dump_path = os.path.join(report_dir, dump)
            if (output_dir):
                target_path = os.path.join(output_dir, dump)
                try:
                    shutil.copyfile(dump_path, target_path)
                    logging.error('Saved Chrome crash dump to %s', target_path)
                except OSError:
                    logging.exception(
                        'Failed to copy Chrome crash dump from %s to %s',
                        dump_path, target_path)
            else:
                logging.error('Found Chrome crash dump at %s', dump_path)
        return len(dumps)
Searches for Chrome crash reports, collecting them for analysis.

        Args:
            user_data_dir: The full path of the User Data dir.
            output_dir: If not None, a path to which collected crash reports are
                to be moved.

        Returns:
            The number of crash reports found.
        
Searches for Chrome crash reports, collecting them for analysis.
Searches for Chrome crash reports collecting them for analysis .
def CollectCrashReports(user_data_dir, output_dir):
        report_dir = os.path.join(user_data_dir, 'Crashpad', 'reports')
        dumps = []
        try:
            dumps = os.listdir(report_dir)
        except OSError:
            return 0
        for dump in dumps:
            dump_path = os.path.join(report_dir, dump)
            if (output_dir):
                target_path = os.path.join(output_dir, dump)
                try:
                    shutil.copyfile(dump_path, target_path)
                    logging.error('Saved Chrome crash dump to %s', target_path)
                except OSError:
                    logging.exception(
                        'Failed to copy Chrome crash dump from %s to %s',
                        dump_path, target_path)
            else:
                logging.error('Found Chrome crash dump at %s', dump_path)
        return len(dumps)
def CollectCrashReports ( user_data_dir , output_dir ) : report_dir = os . path . join ( user_data_dir , 'Crashpad' , 'reports' ) dumps = [ ] try : dumps = os . listdir ( report_dir ) except OSError : return 0 for dump in dumps : dump_path = os . path . join ( report_dir , dump ) if ( output_dir ) : target_path = os . path . join ( output_dir , dump ) try : shutil . copyfile ( dump_path , target_path ) logging . error ( 'Saved Chrome crash dump to %s' , target_path ) except OSError : logging . exception ( 'Failed to copy Chrome crash dump from %s to %s' , dump_path , target_path ) else : logging . error ( 'Found Chrome crash dump at %s' , dump_path ) return len ( dumps )
Searches for Chrome crash reports, collecting them for analysis.
Searches for Chrome crash reports collecting them for analysis .
"""Searches for Chrome crash reports, collecting them for analysis.

        Args:
            user_data_dir: The full path of the User Data dir.
            output_dir: If not None, a path to which collected crash reports are
                to be moved.

        Returns:
            The number of crash reports found.
        """ # Assume this is file not found, meaning no crash reports.
The number of crash reports found.
The number of crash reports found .
user_data_dir
The full path of the User Data dir.
The full path of the User Data dir .
output_dir
If not None, a path to which collected crash reports are
to be moved.
If not None a path to which collected crash reports are to be moved .