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

Side by Side Diff: tools/android/loading/tracing_track_unittest.py

Issue 2763733002: tools/android/loading: rename tracing to tracing_track (Closed)
Patch Set: also rename the unittest Created 3 years, 9 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
« no previous file with comments | « tools/android/loading/tracing_track.py ('k') | tools/android/loading/tracing_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import collections 5 import collections
6 import copy 6 import copy
7 import logging 7 import logging
8 import operator 8 import operator
9 import unittest 9 import unittest
10 10
11 import devtools_monitor 11 import devtools_monitor
12 12
13 from tracing import (Event, TracingTrack, _IntervalTree) 13 from tracing_track import (Event, TracingTrack, _IntervalTree)
14 14
15 15
16 class TracingTrackTestCase(unittest.TestCase): 16 class TracingTrackTestCase(unittest.TestCase):
17 _MIXED_EVENTS = [ 17 _MIXED_EVENTS = [
18 {'ts': 3, 'ph': 'N', 'id': 1, 'args': {'name': 'A'}}, 18 {'ts': 3, 'ph': 'N', 'id': 1, 'args': {'name': 'A'}},
19 {'ts': 5, 'ph': 'X', 'dur': 1, 'args': {'name': 'B'}}, 19 {'ts': 5, 'ph': 'X', 'dur': 1, 'args': {'name': 'B'}},
20 {'ts': 7, 'ph': 'D', 'id': 1}, 20 {'ts': 7, 'ph': 'D', 'id': 1},
21 {'ts': 10, 'ph': 'B', 'args': {'name': 'D'}}, 21 {'ts': 10, 'ph': 'B', 'args': {'name': 'D'}},
22 {'ts': 10, 'ph': 'b', 'cat': 'X', 'id': 1, 'args': {'name': 'C'}}, 22 {'ts': 10, 'ph': 'b', 'cat': 'X', 'id': 1, 'args': {'name': 'C'}},
23 {'ts': 11, 'ph': 'e', 'cat': 'X', 'id': 1}, 23 {'ts': 11, 'ph': 'e', 'cat': 'X', 'id': 1},
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 'cat': 'bar,baz,bizbiz', 484 'cat': 'bar,baz,bizbiz',
485 'ph': 'X', 485 'ph': 'X',
486 'ts': 0, 'dur': 0}) 486 'ts': 0, 'dur': 0})
487 self.assertTrue(event.Matches('bar', 'foo')) 487 self.assertTrue(event.Matches('bar', 'foo'))
488 self.assertTrue(event.Matches('baz', 'foo')) 488 self.assertTrue(event.Matches('baz', 'foo'))
489 self.assertFalse(event.Matches('bar', 'biz')) 489 self.assertFalse(event.Matches('bar', 'biz'))
490 self.assertFalse(event.Matches('biz', 'foo')) 490 self.assertFalse(event.Matches('biz', 'foo'))
491 491
492 if __name__ == '__main__': 492 if __name__ == '__main__':
493 unittest.main() 493 unittest.main()
OLDNEW
« no previous file with comments | « tools/android/loading/tracing_track.py ('k') | tools/android/loading/tracing_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698