OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 import json | 4 import json |
5 import optparse | 5 import optparse |
6 import os | 6 import os |
7 import sys | 7 import sys |
8 | 8 |
9 import webgl_conformance_expectations | 9 import webgl_conformance_expectations |
10 | 10 |
11 from telemetry import test as test_module | 11 from telemetry import benchmark as benchmark_module |
12 from telemetry.core import util | 12 from telemetry.core import util |
13 from telemetry.page import page_set | 13 from telemetry.page import page_set |
14 from telemetry.page import page as page_module | 14 from telemetry.page import page as page_module |
15 from telemetry.page import page_test | 15 from telemetry.page import page_test |
16 # pylint: disable=W0401,W0614 | 16 # pylint: disable=W0401,W0614 |
17 from telemetry.page.actions.all_page_actions import * | 17 from telemetry.page.actions.all_page_actions import * |
18 | 18 |
19 | 19 |
20 conformance_path = os.path.join( | 20 conformance_path = os.path.join( |
21 util.GetChromiumSrcDir(), | 21 util.GetChromiumSrcDir(), |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 test.replace('/', '_').replace('-', '_'). | 93 test.replace('/', '_').replace('-', '_'). |
94 replace('\\', '_').rpartition('.')[0].replace('.', '_'))) | 94 replace('\\', '_').rpartition('.')[0].replace('.', '_'))) |
95 self.script_to_evaluate_on_commit = conformance_harness_script | 95 self.script_to_evaluate_on_commit = conformance_harness_script |
96 | 96 |
97 def RunNavigateSteps(self, action_runner): | 97 def RunNavigateSteps(self, action_runner): |
98 action_runner.NavigateToPage(self) | 98 action_runner.NavigateToPage(self) |
99 action_runner.WaitForJavaScriptCondition( | 99 action_runner.WaitForJavaScriptCondition( |
100 'webglTestHarness._finished', timeout=120) | 100 'webglTestHarness._finished', timeout=120) |
101 | 101 |
102 | 102 |
103 class WebglConformance(test_module.Test): | 103 class WebglConformance(benchmark_module.Benchmark): |
104 """Conformance with Khronos WebGL Conformance Tests""" | 104 """Conformance with Khronos WebGL Conformance Tests""" |
105 test = WebglConformanceValidator | 105 test = WebglConformanceValidator |
106 | 106 |
107 @classmethod | 107 @classmethod |
108 def AddTestCommandLineArgs(cls, group): | 108 def AddTestCommandLineArgs(cls, group): |
109 group.add_option('--webgl-conformance-version', | 109 group.add_option('--webgl-conformance-version', |
110 help='Version of the WebGL conformance tests to run.', | 110 help='Version of the WebGL conformance tests to run.', |
111 default='1.0.3') | 111 default='1.0.3') |
112 | 112 |
113 def CreatePageSet(self, options): | 113 def CreatePageSet(self, options): |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 if '.txt' in test_name: | 166 if '.txt' in test_name: |
167 include_path = os.path.join(current_dir, test_name) | 167 include_path = os.path.join(current_dir, test_name) |
168 test_paths += WebglConformance._ParseTests( | 168 test_paths += WebglConformance._ParseTests( |
169 include_path, version) | 169 include_path, version) |
170 else: | 170 else: |
171 test = os.path.join(current_dir, test_name) | 171 test = os.path.join(current_dir, test_name) |
172 test_paths.append(test) | 172 test_paths.append(test) |
173 | 173 |
174 return test_paths | 174 return test_paths |
OLD | NEW |