Commit 740d029a authored by dominikg@chromium.org's avatar dominikg@chromium.org

Telemetry: Skip page if a page action is not supported by the browser.

If a page requires touch scrolling, we currently report a failure if the browser
doesn't support touch. This means that no average numbers will be reported on the
dashboard.
Instead of failing, we could skip the page and show a warning message to make the
user aware of that.

BUG=355661

Review URL: https://codereview.chromium.org/230373005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263014 0039d316-1c4b-4281-b951-d872f2087c98
parent 37e2643f
...@@ -492,6 +492,8 @@ def _RunPage(test, page, state, expectation, results, finder_options): ...@@ -492,6 +492,8 @@ def _RunPage(test, page, state, expectation, results, finder_options):
ProcessError() ProcessError()
# Run() catches these exceptions to relaunch the tab/browser, so re-raise. # Run() catches these exceptions to relaunch the tab/browser, so re-raise.
raise raise
except page_action.PageActionNotSupported as e:
results.AddSkip(page, 'Unsupported page action: %s' % e)
except Exception: except Exception:
logging.warning('While running %s', page.url) logging.warning('While running %s', page.url)
exception_formatter.PrintFormattedException() exception_formatter.PrintFormattedException()
......
...@@ -42,6 +42,7 @@ class PageTestResults(unittest.TestResult): ...@@ -42,6 +42,7 @@ class PageTestResults(unittest.TestResult):
self.successes.append(test) self.successes.append(test)
def addSkip(self, test, reason): # Python 2.7 has this in unittest.TestResult def addSkip(self, test, reason): # Python 2.7 has this in unittest.TestResult
logging.warning('%s\n%s\nSkipping page.', test, reason)
self.skipped.append((test, reason)) self.skipped.append((test, reason))
def StartTest(self, page): def StartTest(self, page):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment