Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: appengine/findit/crash/test/fracas_test.py

Issue 1914113002: [Findit] Enable project classifier and component classifier (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 crash import detect_regression_range 6 from crash import detect_regression_range
7 from crash import fracas 7 from crash import fracas
8 from crash import fracas_parser 8 from crash import fracas_parser
9 from crash import findit_for_crash 9 from crash import findit_for_crash
10 from crash.stacktrace import Stacktrace 10 from crash.stacktrace import Stacktrace
11 from crash.callstack import CallStack
11 from crash.test.crash_testcase import CrashTestCase 12 from crash.test.crash_testcase import CrashTestCase
12 13
13 14
14 class FracasTest(CrashTestCase): 15 class FracasTest(CrashTestCase):
15 16
16 def testFindCulpritForChromeCrash(self): 17 def testFindCulpritForChromeCrash(self):
17 def _MockGetChromeDependency(*_): 18 def _MockGetChromeDependency(*_):
18 return {} 19 return {}
19 20
20 def _MockParse(*_): 21 def _MockParse(*_):
21 return Stacktrace() 22 stacktrace = Stacktrace()
23 stacktrace.extend([CallStack(0)])
24 return stacktrace
22 25
23 def _MockDetectRegressionRange(historic): 26 def _MockDetectRegressionRange(historic):
24 if historic: 27 if historic:
25 return '50.0.1233.0', '50.0.1234.0' 28 return '50.0.1233.0', '50.0.1234.0'
26 29
27 return None 30 return None
28 31
29 def _MockGetDEPSRollsDict(*_): 32 def _MockGetDEPSRollsDict(*_):
30 return {} 33 return {}
31 34
(...skipping 25 matching lines...) Expand all
57 [{'chrome_version': '50.0.1234.0', 'cpm': 0.6}]) 60 [{'chrome_version': '50.0.1234.0', 'cpm': 0.6}])
58 61
59 self.assertEqual(expected_results, results) 62 self.assertEqual(expected_results, results)
60 self.assertEqual(expected_tag, tag) 63 self.assertEqual(expected_tag, tag)
61 64
62 results, tag = fracas.FindCulpritForChromeCrash( 65 results, tag = fracas.FindCulpritForChromeCrash(
63 'signature', 'win', 'frame1\nframe2', '50.0.1234.0', []) 66 'signature', 'win', 'frame1\nframe2', '50.0.1234.0', [])
64 67
65 expected_tag['has_regression_range'] = False 68 expected_tag['has_regression_range'] = False
66 self.assertEqual(expected_tag, tag) 69 self.assertEqual(expected_tag, tag)
OLDNEW
« no previous file with comments | « appengine/findit/crash/test/fracas_parser_test.py ('k') | appengine/findit/crash/test/project_classifier_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698