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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 class WebglConformanceValidator(page_test.PageTest): | 60 class WebglConformanceValidator(page_test.PageTest): |
61 def __init__(self): | 61 def __init__(self): |
62 super(WebglConformanceValidator, self).__init__('ValidatePage') | 62 super(WebglConformanceValidator, self).__init__('ValidatePage') |
63 | 63 |
64 def ValidatePage(self, page, tab, results): | 64 def ValidatePage(self, page, tab, results): |
65 if not _DidWebGLTestSucceed(tab): | 65 if not _DidWebGLTestSucceed(tab): |
66 raise page_test.Failure(_WebGLTestMessages(tab)) | 66 raise page_test.Failure(_WebGLTestMessages(tab)) |
67 | 67 |
68 def CustomizeBrowserOptions(self, options): | 68 def CustomizeBrowserOptions(self, options): |
69 options.AppendExtraBrowserArg( | 69 options.AppendExtraBrowserArgs( |
70 '--disable-gesture-requirement-for-media-playback') | 70 '--disable-gesture-requirement-for-media-playback') |
71 | 71 |
72 | 72 |
73 class WebglConformance(test_module.Test): | 73 class WebglConformance(test_module.Test): |
74 """Conformance with Khronos WebGL Conformance Tests""" | 74 """Conformance with Khronos WebGL Conformance Tests""" |
75 enabled = False | 75 enabled = False |
76 test = WebglConformanceValidator | 76 test = WebglConformanceValidator |
77 | 77 |
78 def CreatePageSet(self, options): | 78 def CreatePageSet(self, options): |
79 tests = self._ParseTests('00_test_list.txt', '1.0.1') | 79 tests = self._ParseTests('00_test_list.txt', '1.0.1') |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 if '.txt' in test_name: | 145 if '.txt' in test_name: |
146 include_path = os.path.join(current_dir, test_name) | 146 include_path = os.path.join(current_dir, test_name) |
147 test_paths += WebglConformance._ParseTests( | 147 test_paths += WebglConformance._ParseTests( |
148 include_path, version) | 148 include_path, version) |
149 else: | 149 else: |
150 test = os.path.join(current_dir, test_name) | 150 test = os.path.join(current_dir, test_name) |
151 test_paths.append(test) | 151 test_paths.append(test) |
152 | 152 |
153 return test_paths | 153 return test_paths |
OLD | NEW |