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

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

Issue 637153002: telemetry: Remove command line args from page test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Suppress pylint E1003 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
Index: tools/perf/measurements/repaint.py
diff --git a/tools/perf/measurements/repaint.py b/tools/perf/measurements/repaint.py
index a56ccb84051cc2514a45096f1112b828b3949cd4..07360517b90969cc8f2c7d7d358d90ee73e24a7f 100644
--- a/tools/perf/measurements/repaint.py
+++ b/tools/perf/measurements/repaint.py
@@ -7,23 +7,13 @@ from telemetry.page import page_test
class Repaint(page_test.PageTest):
- def __init__(self):
+ def __init__(self, mode='viewport', width=None, height=None):
super(Repaint, self).__init__('RunRepaint', False)
self._smoothness_controller = None
self._micro_benchmark_id = None
-
- @classmethod
- def AddCommandLineArgs(cls, parser):
- parser.add_option('--mode', type='string',
- default='viewport',
- help='Invalidation mode. '
- 'Supported values: fixed_size, layer, random, viewport.')
- parser.add_option('--width', type='int',
- default=None,
- help='Width of invalidations for fixed_size mode.')
- parser.add_option('--height', type='int',
- default=None,
- help='Height of invalidations for fixed_size mode.')
+ self._mode = mode
+ self._width = width
+ self._height = height
def CustomizeBrowserOptions(self, options):
options.AppendExtraBrowserArgs([
@@ -42,11 +32,11 @@ class Repaint(page_test.PageTest):
'chrome.gpuBenchmarking.setRasterizeOnlyVisibleContent();')
args = {}
- args['mode'] = self.options.mode
- if self.options.width:
- args['width'] = self.options.width
- if self.options.height:
- args['height'] = self.options.height
+ args['mode'] = self._mode
+ if self._width:
+ args['width'] = self._width
+ if self._height:
+ args['height'] = self._height
# Enque benchmark
tab.ExecuteJavaScript("""

Powered by Google App Engine
This is Rietveld 408576698