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

Unified Diff: tools/telemetry/telemetry/page/page_test.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/telemetry/telemetry/page/page_measurement.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/page_test.py
diff --git a/tools/telemetry/telemetry/page/page_test.py b/tools/telemetry/telemetry/page/page_test.py
index c952df1f34792ff466fdfc5a57e7ebc779f2fd98..6d858a8455596777fc5b12a7614d85e4f2bf15e1 100644
--- a/tools/telemetry/telemetry/page/page_test.py
+++ b/tools/telemetry/telemetry/page/page_test.py
@@ -32,7 +32,8 @@ class PageTest(command_line.Command):
clear_cache_before_each_run=False,
attempts=3,
max_failures=None,
- max_errors=None):
+ max_errors=None,
+ is_action_name_to_run_optional=False):
super(PageTest, self).__init__()
self.options = None
@@ -50,6 +51,7 @@ class PageTest(command_line.Command):
self._attempts = attempts
self._max_failures = max_failures
self._max_errors = max_errors
+ self._is_action_name_to_run_optional = is_action_name_to_run_optional
assert self._attempts > 0, 'Test attempts must be greater than 0'
# If the test overrides the TabForPage method, it is considered a multi-tab
# test. The main difference between this and a single-tab test is that we
@@ -167,7 +169,7 @@ class PageTest(command_line.Command):
def CanRunForPage(self, page): # pylint: disable=W0613
"""Override to customize if the test can be ran for the given page."""
- if self._action_name_to_run:
+ if self._action_name_to_run and not self._is_action_name_to_run_optional:
return hasattr(page, self._action_name_to_run)
return True
« no previous file with comments | « tools/telemetry/telemetry/page/page_measurement.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698