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 os | 5 import os |
6 import sys | 6 import sys |
7 | 7 |
8 import webgl_conformance_expectations | 8 import webgl_conformance_expectations |
9 | 9 |
10 from telemetry import test as test_module | 10 from telemetry import test as test_module |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 class WebglConformanceValidator(page_test.PageTest): | 53 class WebglConformanceValidator(page_test.PageTest): |
54 def __init__(self): | 54 def __init__(self): |
55 super(WebglConformanceValidator, self).__init__('ValidatePage') | 55 super(WebglConformanceValidator, self).__init__('ValidatePage') |
56 | 56 |
57 def ValidatePage(self, page, tab, results): | 57 def ValidatePage(self, page, tab, results): |
58 if not _DidWebGLTestSucceed(tab): | 58 if not _DidWebGLTestSucceed(tab): |
59 raise page_test.Failure(_WebGLTestMessages(tab)) | 59 raise page_test.Failure(_WebGLTestMessages(tab)) |
60 | 60 |
61 def CustomizeBrowserOptions(self, options): | 61 def CustomizeBrowserOptions(self, options): |
62 options.AppendExtraBrowserArg( | 62 options.AppendExtraBrowserArgs( |
63 '--disable-gesture-requirement-for-media-playback') | 63 '--disable-gesture-requirement-for-media-playback') |
64 | 64 |
65 | 65 |
66 class WebglConformance(test_module.Test): | 66 class WebglConformance(test_module.Test): |
67 """Conformance with Khronos WebGL Conformance Tests""" | 67 """Conformance with Khronos WebGL Conformance Tests""" |
68 enabled = False | 68 enabled = False |
69 test = WebglConformanceValidator | 69 test = WebglConformanceValidator |
70 | 70 |
71 def CreatePageSet(self, options): | 71 def CreatePageSet(self, options): |
72 tests = self._ParseTests('00_test_list.txt', '1.0.1') | 72 tests = self._ParseTests('00_test_list.txt', '1.0.1') |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 if '.txt' in test_name: | 138 if '.txt' in test_name: |
139 include_path = os.path.join(current_dir, test_name) | 139 include_path = os.path.join(current_dir, test_name) |
140 test_paths += WebglConformance._ParseTests( | 140 test_paths += WebglConformance._ParseTests( |
141 include_path, version) | 141 include_path, version) |
142 else: | 142 else: |
143 test = os.path.join(current_dir, test_name) | 143 test = os.path.join(current_dir, test_name) |
144 test_paths.append(test) | 144 test_paths.append(test) |
145 | 145 |
146 return test_paths | 146 return test_paths |
OLD | NEW |