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

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

Issue 1872313002: sandwich: Implement SandwichTaskBuilder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses pasko's comments Created 4 years, 8 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: tools/android/loading/sandwich_metrics_unittest.py
diff --git a/tools/android/loading/sandwich_metrics_unittest.py b/tools/android/loading/sandwich_metrics_unittest.py
index 7cbe795192baf92bbbf70bcc6e0cf5f3e0d75f59..4e9f774a0d54296fbb1949d1a9f5cf471926d2ab 100644
--- a/tools/android/loading/sandwich_metrics_unittest.py
+++ b/tools/android/loading/sandwich_metrics_unittest.py
@@ -13,6 +13,7 @@ import unittest
import loading_trace
import page_track
import sandwich_metrics as puller
+import sandwich_runner
import request_track
import tracing
@@ -103,7 +104,7 @@ class PageTrackTest(unittest.TestCase):
{'pid': 354, 'ts': 11000, 'cat': 'whatever0', 'ph': 'R'},
{'pid': 672, 'ts': 12000, 'cat': _MEM_CAT, 'ph': 'v', 'name': NAME}]
- self.assertTrue(_MEM_CAT in puller.CATEGORIES)
+ self.assertTrue(_MEM_CAT in sandwich_runner.CATEGORIES)
bump_events = RunHelper(TRACE_EVENTS, 123)
self.assertEquals(2, len(bump_events))
@@ -124,7 +125,7 @@ class PageTrackTest(unittest.TestCase):
RunHelper(TRACE_EVENTS, 895)
def testGetWebPageTrackedEvents(self):
- self.assertTrue(_BLINK_CAT in puller.CATEGORIES)
+ self.assertTrue(_BLINK_CAT in sandwich_runner.CATEGORIES)
trace_events = puller._GetWebPageTrackedEvents(TracingTrack([
{'ph': 'R', 'ts': 0000, 'args': {}, 'cat': 'whatever',
@@ -232,7 +233,7 @@ class PageTrackTest(unittest.TestCase):
for dirname in ['1', '2', 'whatever']:
os.mkdir(os.path.join(tmp_dir, dirname))
LoadingTrace(_MINIMALIST_TRACE_EVENTS).ToJsonFile(
- os.path.join(tmp_dir, dirname, 'trace.json'))
+ os.path.join(tmp_dir, dirname, sandwich_runner.TRACE_FILENAME))
process = subprocess.Popen(['python', puller.__file__, tmp_dir])
process.wait()

Powered by Google App Engine
This is Rietveld 408576698