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

Unified Diff: appengine/findit/handlers/crash/test/fracas_crash_test.py

Issue 1946513003: [Findit] Modify the handler for fracas input message. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Address comment. 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 side-by-side diff with in-line comments
Download patch
Index: appengine/findit/handlers/crash/test/fracas_crash_test.py
diff --git a/appengine/findit/handlers/crash/test/fracas_crash_test.py b/appengine/findit/handlers/crash/test/fracas_crash_test.py
index 0d817bef83a79334c6a6dd2ae956086cf6df6f4e..78a8de1d6b9c90bbb688cef267e163c1d0b11389 100644
--- a/appengine/findit/handlers/crash/test/fracas_crash_test.py
+++ b/appengine/findit/handlers/crash/test/fracas_crash_test.py
@@ -30,22 +30,46 @@ class FracasCrashTest(CrashTestCase):
self._MockScheduleNewAnalysisForCrash(requested_crashes)
self.mock_current_user(user_email='test@chromium.org', is_admin=True)
+ client_id = 'fracas'
channel = 'supported_channel'
platform = 'supported_platform'
signature = 'signature/here'
stack_trace = 'frame1\nframe2\nframe3'
chrome_version = '50.2500.0.0'
- versions_to_cpm = [['50.2500.0.0']]
+ historic_metadata = [{'chrome_version': '50.2500.0.0', 'cpm': 0.6}]
+
+ crash_identifiers = {
+ 'chrome_version': chrome_version,
+ 'signature': signature,
+ 'channel': channel,
+ 'platform': platform,
+ 'process_type': 'renderer'
+ }
request_json_data = {
'message': {
'data': base64.b64encode(json.dumps({
- 'channel': channel,
- 'platform': platform,
- 'signature': signature,
- 'stack_trace': stack_trace,
- 'chrome_version': chrome_version,
- 'versions_to_cpm': versions_to_cpm,
+ 'customized_data': {
+ 'channel': 'supported_channel',
+ 'historic_metadata': [
+ {
+ 'chrome_version': '50.2500.0.0',
+ 'cpm': 0.6
+ },
+ ]
+ },
+ 'chrome_version': '50.2500.0.0',
+ 'signature': 'signature/here',
+ 'client_id': 'fracas',
+ 'platform': 'supported_platform',
+ 'crash_identifiers': {
+ 'chrome_version': '50.2500.0.0',
+ 'signature': 'signature/here',
+ 'channel': 'supported_channel',
+ 'platform': 'supported_platform',
+ 'process_type': 'renderer'
+ },
+ 'stack_trace': 'frame1\nframe2\nframe3'
})),
'message_id': 'id',
},
@@ -57,6 +81,6 @@ class FracasCrashTest(CrashTestCase):
self.assertEqual(1, len(requested_crashes))
self.assertEqual(
- (channel, platform, signature, stack_trace,
- chrome_version, versions_to_cpm),
+ (crash_identifiers, chrome_version, signature, client_id,
+ platform, stack_trace, channel, historic_metadata),
requested_crashes[0])

Powered by Google App Engine
This is Rietveld 408576698