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

Unified Diff: tools/perf/measurements/screenshot.py

Issue 737403002: Revert of telemetry: Remove command line args from page test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/perf/measurements/repaint.py ('k') | tools/perf/measurements/screenshot_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/screenshot.py
diff --git a/tools/perf/measurements/screenshot.py b/tools/perf/measurements/screenshot.py
index 5c4345a5a4ca397ed6c1f6b6d239f2da303d9081..8564c8a473236a06435c33aaef30ee18a4521a9e 100644
--- a/tools/perf/measurements/screenshot.py
+++ b/tools/perf/measurements/screenshot.py
@@ -9,11 +9,21 @@
class Screenshot(page_test.PageTest):
- def __init__(self, png_outdir):
+ def __init__(self):
super(Screenshot, self).__init__(
action_name_to_run = 'RunPageInteractions',
is_action_name_to_run_optional=True)
- self._png_outdir = png_outdir
+
+ @classmethod
+ def AddCommandLineArgs(cls, parser):
+ parser.add_option('--png-outdir',
+ help='Output directory for the PNG files')
+
+ @classmethod
+ def ProcessCommandLineArgs(cls, parser, args):
+ if not args.png_outdir:
+ parser.error('Please specify --png-outdir')
+ cls._png_outdir = args.png_outdir
def ValidateAndMeasurePage(self, page, tab, results):
if not tab.screenshot_supported:
« no previous file with comments | « tools/perf/measurements/repaint.py ('k') | tools/perf/measurements/screenshot_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698