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

Unified Diff: tools/telemetry/telemetry/core/timeline/trace_event_importer_unittest.py

Issue 149303004: [Telemetry] Fix flow event importer error checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « tools/telemetry/telemetry/core/timeline/trace_event_importer.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/timeline/trace_event_importer_unittest.py
diff --git a/tools/telemetry/telemetry/core/timeline/trace_event_importer_unittest.py b/tools/telemetry/telemetry/core/timeline/trace_event_importer_unittest.py
index 05e1c1f6b2a3ad49679ce4ba1951f82d36f5e4be..2cd3e64fd6cafd68322dd96efcc95fd26f5a2b8f 100644
--- a/tools/telemetry/telemetry/core/timeline/trace_event_importer_unittest.py
+++ b/tools/telemetry/telemetry/core/timeline/trace_event_importer_unittest.py
@@ -1085,3 +1085,18 @@ class TraceEventTimelineImporterTest(unittest.TestCase):
for i in range(len(expected)):
self.assertAlmostEqual(expected[i][0], m.flow_events[i][0].start)
self.assertAlmostEqual(expected[i][1], m.flow_events[i][1].start)
+
+ def testImportErrornousFlowEvent(self):
+ events = [
+ {'name': 'a', 'cat': 'foo', 'id': 70, 'pid': 52, 'tid': 53, 'ts': 548,
+ 'ph': 's', 'args': {}},
+ {'name': 'a2', 'cat': 'foo', 'id': 70, 'pid': 52, 'tid': 53, 'ts': 550,
+ 'ph': 's', 'args': {}},
+ {'name': 'b', 'cat': 'foo', 'id': 73, 'pid': 52, 'tid': 53, 'ts': 570,
+ 'ph': 'f', 'args': {}},
+ {'name': 'a', 'cat': 'foo', 'id': 72, 'pid': 52, 'tid': 53, 'ts': 560,
+ 'ph': 't', 'args': {}},
+ ]
+
+ m = timeline_model.TimelineModel(event_data=events)
+ self.assertEqual(0, len(m.flow_events))
« no previous file with comments | « tools/telemetry/telemetry/core/timeline/trace_event_importer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698