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

Unified Diff: tools/perf/page_sets/tough_webgl_cases.py

Issue 288313005: Add page.CanRunOnBrowser. Add WebGL check for tough_webgl_cases pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase mistakes Created 6 years, 7 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 | « no previous file | tools/telemetry/telemetry/core/browser_info.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/tough_webgl_cases.py
diff --git a/tools/perf/page_sets/tough_webgl_cases.py b/tools/perf/page_sets/tough_webgl_cases.py
index 034e88ac2d455d04dc3cdd0c32c10d39352324ec..3263eb7e8bbf5dfdeb74a9297f3d0d46ad6d4b23 100644
--- a/tools/perf/page_sets/tough_webgl_cases.py
+++ b/tools/perf/page_sets/tough_webgl_cases.py
@@ -1,6 +1,8 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import logging
+
# pylint: disable=W0401,W0614
from telemetry.page.actions.all_page_actions import *
from telemetry.page import page as page_module
@@ -13,6 +15,12 @@ class ToughWebglCasesPage(page_module.Page):
super(ToughWebglCasesPage, self).__init__(url=url, page_set=page_set)
self.archive_data_file = 'data/tough_webgl_cases.json'
+ def CanRunOnBrowser(self, browser_info):
+ if not browser_info.HasWebGLSupport():
+ logging.warning('Browser does not support webgl, skipping test')
+ return False
+ return True
+
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
action_runner.RunAction(WaitAction(
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/browser_info.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698