| 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 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 ps = page_set.PageSet( | 112 ps = page_set.PageSet( |
| 113 user_agent_type='desktop', | 113 user_agent_type='desktop', |
| 114 serving_dirs=[''], | 114 serving_dirs=[''], |
| 115 file_path=conformance_path) | 115 file_path=conformance_path) |
| 116 | 116 |
| 117 for test in tests: | 117 for test in tests: |
| 118 ps.AddPage(WebglConformancePage(ps, test)) | 118 ps.AddPage(WebglConformancePage(ps, test)) |
| 119 | 119 |
| 120 return ps | 120 return ps |
| 121 | 121 |
| 122 def CreateExpectations(self, page_set): | 122 def CreateExpectations(self): |
| 123 return webgl_conformance_expectations.WebGLConformanceExpectations() | 123 return webgl_conformance_expectations.WebGLConformanceExpectations() |
| 124 | 124 |
| 125 @staticmethod | 125 @staticmethod |
| 126 def _ParseTests(path, version=None): | 126 def _ParseTests(path, version=None): |
| 127 test_paths = [] | 127 test_paths = [] |
| 128 current_dir = os.path.dirname(path) | 128 current_dir = os.path.dirname(path) |
| 129 full_path = os.path.normpath(os.path.join(conformance_path, path)) | 129 full_path = os.path.normpath(os.path.join(conformance_path, path)) |
| 130 | 130 |
| 131 if not os.path.exists(full_path): | 131 if not os.path.exists(full_path): |
| 132 raise Exception('The WebGL conformance test path specified ' + | 132 raise Exception('The WebGL conformance test path specified ' + |
| (...skipping 27 matching lines...) Expand all Loading... |
| 160 | 160 |
| 161 if '.txt' in test_name: | 161 if '.txt' in test_name: |
| 162 include_path = os.path.join(current_dir, test_name) | 162 include_path = os.path.join(current_dir, test_name) |
| 163 test_paths += WebglConformance._ParseTests( | 163 test_paths += WebglConformance._ParseTests( |
| 164 include_path, version) | 164 include_path, version) |
| 165 else: | 165 else: |
| 166 test = os.path.join(current_dir, test_name) | 166 test = os.path.join(current_dir, test_name) |
| 167 test_paths.append(test) | 167 test_paths.append(test) |
| 168 | 168 |
| 169 return test_paths | 169 return test_paths |
| OLD | NEW |