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

Unified Diff: content/test/gpu/gpu_tests/webgl_robustness.py

Issue 259763003: Get rid of PageSet.FromDict from some simple benchmarks in gpu_tests/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 8 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 | « content/test/gpu/gpu_tests/screenshot_sync.py ('k') | tools/telemetry/telemetry/page/page.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/gpu_tests/webgl_robustness.py
diff --git a/content/test/gpu/gpu_tests/webgl_robustness.py b/content/test/gpu/gpu_tests/webgl_robustness.py
index 7e4a302c9e4b32a9e32f2ec543146a897f6198de..a68467c2d35987246a257d075afdeeb063089413 100644
--- a/content/test/gpu/gpu_tests/webgl_robustness.py
+++ b/content/test/gpu/gpu_tests/webgl_robustness.py
@@ -2,7 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import test
+from telemetry.page import page
from telemetry.page import page_set
+from telemetry.page import page_test
+# pylint: disable=W0401,W0614
+from telemetry.page.actions.all_page_actions import *
+
from webgl_conformance import WebglConformanceValidator
from webgl_conformance import conformance_harness_script
from webgl_conformance import conformance_path
@@ -43,24 +48,27 @@ robustness_harness_script = conformance_harness_script + r"""
window.webglRobustnessTestHarness = robustnessTestHarness;
"""
+class WebglRobustnessPage(page.Page):
+ def __init__(self, page_set, base_dir):
+ super(WebglRobustnessPage, self).__init__(
+ url='file://extra/lots-of-polys-example.html',
+ page_set=page_set,
+ base_dir=base_dir)
+ self.script_to_evaluate_on_commit = robustness_harness_script
+
+ def RunNavigateSteps(self, action_runner):
+ action_runner.RunAction(NavigateAction())
+ action_runner.RunAction(
+ WaitAction({'javascript': 'webglTestHarness._finished'}))
class WebglRobustness(test.Test):
test = WebglConformanceValidator
def CreatePageSet(self, options):
- page_set_dict = {
- 'description': 'Test cases for WebGL robustness',
- 'user_agent_type': 'desktop',
- 'serving_dirs': [''],
- 'pages': [
- {
- 'url': 'file://extra/lots-of-polys-example.html',
- 'script_to_evaluate_on_commit': robustness_harness_script,
- 'navigate_steps': [
- { 'action': 'navigate' },
- { 'action': 'wait', 'javascript': 'webglTestHarness._finished' }
- ]
- }
- ]
- }
- return page_set.PageSet.FromDict(page_set_dict, conformance_path)
+ ps = page_set.PageSet(
+ file_path=conformance_path,
+ description='Test cases for WebGL robustness',
+ user_agent_type='desktop',
+ serving_dirs=[''])
+ ps.AddPage(WebglRobustnessPage(ps, ps.base_dir))
+ return ps
« no previous file with comments | « content/test/gpu/gpu_tests/screenshot_sync.py ('k') | tools/telemetry/telemetry/page/page.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698