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

Unified Diff: tools/telemetry/telemetry/page/page_measurement.py

Issue 271733008: telemetry: add screenshot measurement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle browsers/platforms that don't support screenshotting. Created 6 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/perf/measurements/screenshot_unittest.py ('k') | tools/telemetry/telemetry/page/page_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/page_measurement.py
diff --git a/tools/telemetry/telemetry/page/page_measurement.py b/tools/telemetry/telemetry/page/page_measurement.py
index 967ecf5caeb44fffb8193a2c37c56b62a0d958cc..e3d931c2143463fdd8765236ff3abe15cea6b78e 100644
--- a/tools/telemetry/telemetry/page/page_measurement.py
+++ b/tools/telemetry/telemetry/page/page_measurement.py
@@ -35,17 +35,24 @@ class PageMeasurement(page_test.PageTest):
body_child_count = tab.EvaluateJavaScript(
'document.querySelector('%s').children.length')
results.Add('children', 'count', child_count)
+
+ is_action_name_to_run_optional determines what to do if action_name_to_run is
+ not empty but the page doesn't have that action. The page will run (without
+ any action) if is_action_name_to_run_optional is True, otherwise the page will
+ fail.
"""
def __init__(self,
action_name_to_run='',
needs_browser_restart_after_each_page=False,
discard_first_result=False,
- clear_cache_before_each_run=False):
+ clear_cache_before_each_run=False,
+ is_action_name_to_run_optional=False):
super(PageMeasurement, self).__init__(
action_name_to_run,
needs_browser_restart_after_each_page,
discard_first_result,
- clear_cache_before_each_run)
+ clear_cache_before_each_run,
+ is_action_name_to_run_optional=is_action_name_to_run_optional)
def ValidatePage(self, page, tab, results):
results.WillMeasurePage(page)
« no previous file with comments | « tools/perf/measurements/screenshot_unittest.py ('k') | tools/telemetry/telemetry/page/page_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698