| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 from common import chromium_deps | 5 from common import chromium_deps |
| 6 from common.dependency import DependencyRoll | 6 from common.dependency import DependencyRoll |
| 7 from crash import detect_regression_range | 7 from crash import detect_regression_range |
| 8 from crash import fracas | 8 from crash import fracas |
| 9 from crash import fracas_parser | 9 from crash import fracas_parser |
| 10 from crash import findit_for_crash | 10 from crash import findit_for_crash |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 results, tag = fracas.FindCulpritForChromeCrash( | 88 results, tag = fracas.FindCulpritForChromeCrash( |
| 89 'signature', 'win', 'frame1\nframe2', '50.0.1234.0', | 89 'signature', 'win', 'frame1\nframe2', '50.0.1234.0', |
| 90 [{'chrome_version': '50.0.1234.0', 'cpm': 0.6}]) | 90 [{'chrome_version': '50.0.1234.0', 'cpm': 0.6}]) |
| 91 | 91 |
| 92 expected_results = { | 92 expected_results = { |
| 93 'found': True, | 93 'found': True, |
| 94 'suspected_project': '', | 94 'suspected_project': '', |
| 95 'suspected_components': [], | 95 'suspected_components': [], |
| 96 'suspected_cls': [dummy_match_result.ToDict()], | 96 'suspected_cls': [dummy_match_result.ToDict()], |
| 97 'regression_range': ('50.0.1233.0', '50.0.1234.0'), |
| 97 } | 98 } |
| 98 expected_tag = { | 99 expected_tag = { |
| 99 'found_suspects': True, | 100 'found_suspects': True, |
| 100 'has_regression_range': True, | 101 'has_regression_range': True, |
| 101 'solution': 'core_algorithm', | 102 'solution': 'core_algorithm', |
| 102 } | 103 } |
| 103 | 104 |
| 104 self.assertEqual(expected_results, results) | 105 self.assertEqual(expected_results, results) |
| 105 self.assertEqual(expected_tag, tag) | 106 self.assertEqual(expected_tag, tag) |
| 106 | 107 |
| 107 results, tag = fracas.FindCulpritForChromeCrash( | 108 results, tag = fracas.FindCulpritForChromeCrash( |
| 108 'signature', 'win', 'frame1\nframe2', '50.0.1234.0', | 109 'signature', 'win', 'frame1\nframe2', '50.0.1234.0', |
| 109 []) | 110 []) |
| 110 | 111 |
| 111 expected_results = { | 112 expected_results = { |
| 112 'found': False, | 113 'found': False, |
| 113 'suspected_project': '', | 114 'suspected_project': '', |
| 114 'suspected_components': [], | 115 'suspected_components': [], |
| 115 'suspected_cls': [], | 116 'suspected_cls': [], |
| 117 'regression_range': None |
| 116 } | 118 } |
| 117 expected_tag = { | 119 expected_tag = { |
| 118 'found_suspects': False, | 120 'found_suspects': False, |
| 119 'has_regression_range': False, | 121 'has_regression_range': False, |
| 120 'solution': 'core_algorithm', | 122 'solution': 'core_algorithm', |
| 121 } | 123 } |
| 122 | 124 |
| 123 self.assertEqual(expected_results, results) | 125 self.assertEqual(expected_results, results) |
| 124 self.assertEqual(expected_tag, tag) | 126 self.assertEqual(expected_tag, tag) |
| OLD | NEW |