def testToCrashReport(self):
        """Tests converting ``CrashAnalysis`` to ``CrashReport``."""
        signature = 'signature/here'
        channel = 'canary'
        platform = 'mac'
        regression_range = ('50.2450.0.2', '50.2982.0.0')
        raw_crash_data = self.GetDummyChromeCrashData(
            client_id=CrashClient.FRACAS,
            channel=channel,
            platform=platform,
            signature=signature,
            version=None,
            regression_range=regression_range,
            process_type='renderer')
        predator = self.GetMockPredatorApp(client_id=CrashClient.FRACAS)
        crash_data = predator.GetCrashData(raw_crash_data)
        analysis = CrashAnalysis()
        analysis.Initialize(crash_data)

        expected_crash_report = CrashReport(None, signature, platform, None,
                                            regression_range, {}, {},
                                            CHROMIUM_REPO_URL,
                                            CHROMIUM_ROOT_PATH)
        self.assertTupleEqual(analysis.ToCrashReport(), expected_crash_report)
Exemple #2
0
    def testToCrashReport(self):
        """Tests converting ``CrashAnalysis`` to ``CrashReport``."""
        chrome_version = '50.2500.0.0'
        signature = 'signature/here'
        channel = 'canary'
        platform = 'mac'
        regression_range = ('50.2450.0.2', '50.2982.0.0')
        raw_crash_data = self.GetDummyChromeCrashData(
            client_id=CrashClient.FRACAS,
            channel=channel,
            platform=platform,
            signature=signature,
            version=chrome_version,
            regression_range=regression_range,
            process_type='renderer')
        findit = self.GetMockFindit(client_id=CrashClient.FRACAS)
        crash_data = findit.GetCrashData(raw_crash_data)
        analysis = CrashAnalysis()
        analysis.Initialize(crash_data)

        expected_crash_report = CrashReport(chrome_version, signature,
                                            platform, None, regression_range,
                                            {}, {})
        self.assertTupleEqual(analysis.ToCrashReport(), expected_crash_report)