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

Unified Diff: tools/android/loading/tracing_unittest.py

Issue 2047463002: Set tracing categories explicitly in Clovis and Sandwich (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 6 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/android/loading/tracing.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/tracing_unittest.py
diff --git a/tools/android/loading/tracing_unittest.py b/tools/android/loading/tracing_unittest.py
index 3ad661746e1ae1b58f0f0e42c45559b764c9c8df..f621c1fe15d996ff1c1e38f235f009135f6b6787 100644
--- a/tools/android/loading/tracing_unittest.py
+++ b/tools/android/loading/tracing_unittest.py
@@ -42,7 +42,7 @@ class TracingTrackTestCase(unittest.TestCase):
def setUp(self):
self.tree_threshold = _IntervalTree._TRESHOLD
_IntervalTree._TRESHOLD = 2 # Expose more edge cases in the tree.
- self.track = TracingTrack(None, additional_categories=('A', 'B', 'C', 'D'))
+ self.track = TracingTrack(None, ['A', 'B', 'C', 'D'])
def tearDown(self):
_IntervalTree._TRESHOLD = self.tree_threshold
@@ -360,26 +360,6 @@ class TracingTrackTestCase(unittest.TestCase):
self.assertSetEqual(
set('A'), self.track.Filter(categories=set('A')).Categories())
- def testAdditionalCategories(self):
- track = TracingTrack(None, additional_categories=('best-category-ever',))
- self.assertIn('best-category-ever', track.Categories())
- # Cannot re-enable a category.
- with self.assertRaises(AssertionError):
- TracingTrack(None, additional_categories=('cc',))
- # Cannot disable categories via |additional_categories|.
- with self.assertRaises(AssertionError):
- TracingTrack(None, additional_categories=('-best-category-ever',))
-
- def testDisabledCategories(self):
- track = TracingTrack(None, disabled_categories=('toplevel',))
- self.assertNotIn('toplevel', track.Categories())
- self.assertIn('-toplevel', track.Categories())
- # Can only disable categories that are enabled by default.
- with self.assertRaises(AssertionError):
- TracingTrack(None, disabled_categories=('best-category-ever',))
- with self.assertRaises(AssertionError):
- TracingTrack(None, disabled_categories=('cc',))
-
def _HandleEvents(self, events):
self.track.Handle('Tracing.dataCollected', {'params': {'value': [
self.EventToMicroseconds(e) for e in events]}})
« no previous file with comments | « tools/android/loading/tracing.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698