Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4dbdc2aab17e91667472b87083e56b68e87e8bc5 |
| --- /dev/null |
| +++ b/content/test/gpu/gpu_tests/webgl_robustness.py |
| @@ -0,0 +1,39 @@ |
| +# Copyright (c) 2013 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. |
| +from telemetry import test |
| +from telemetry.page import page_set |
| +from webgl_conformance import WebglConformanceValidator |
| +from webgl_conformance import conformance_harness_script |
| +from webgl_conformance import conformance_path |
| + |
| + |
| +robustness_harness_script = conformance_harness_script + r""" |
| + window.confirm = function() { |
| + var canvas = document.getElementById('example'); |
| + canvas.addEventListener('webglcontextlost', function() { |
| + webglTestHarness.notifyFinished(); |
|
Ken Russell (switch to Gerrit)
2013/07/30 19:39:27
If the GPU happens to be fast enough to run that t
bajones
2013/07/30 20:51:03
Yeah, I worry that this is a race condition as wel
|
| + }); |
| + return true; |
| + } |
| +""" |
| + |
| + |
| +class WebglRobustness(test.Test): |
| + enabled = False |
| + test = WebglConformanceValidator |
| + |
| + def CreatePageSet(self, options): |
| + page_set_dict = { |
| + 'description': 'Test cases for WebGL robustness', |
|
Ken Russell (switch to Gerrit)
2013/07/30 19:39:27
Just checking: this test won't be run by default,
|
| + 'user_agent_type': 'desktop', |
| + 'serving_dirs': [''], |
| + 'pages': [ |
| + { |
| + 'url': 'file:///extra/lots-of-polys-example.html', |
|
bajones
2013/07/30 20:51:03
Perhaps I'm missing something, but I don't see whe
|
| + 'script_to_evaluate_on_commit': robustness_harness_script, |
| + 'wait_for_javascript_expression': 'webglTestHarness._finished' |
| + } |
| + ] |
| + } |
| + return page_set.PageSet.FromDict(page_set_dict, conformance_path) |