| 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 os | 4 import os |
| 5 | 5 |
| 6 from gpu_tests import gpu_test_base | 6 from gpu_tests import gpu_test_base |
| 7 from gpu_tests import path_util | 7 from gpu_tests import path_util |
| 8 from gpu_tests import webgl_conformance_expectations | 8 from gpu_tests import webgl_conformance_expectations |
| 9 from gpu_tests import webgl2_conformance_expectations | 9 from gpu_tests import webgl2_conformance_expectations |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 test_path.replace('/', '_').replace('-', '_'). | 77 test_path.replace('/', '_').replace('-', '_'). |
| 78 replace('\\', '_').rpartition('.')[0].replace('.', '_')) | 78 replace('\\', '_').rpartition('.')[0].replace('.', '_')) |
| 79 | 79 |
| 80 | 80 |
| 81 class WebglConformanceValidator(gpu_test_base.ValidatorBase): | 81 class WebglConformanceValidator(gpu_test_base.ValidatorBase): |
| 82 def __init__(self): | 82 def __init__(self): |
| 83 super(WebglConformanceValidator, self).__init__() | 83 super(WebglConformanceValidator, self).__init__() |
| 84 | 84 |
| 85 def ValidateAndMeasurePage(self, page, tab, results): | 85 def ValidateAndMeasurePage(self, page, tab, results): |
| 86 if not _DidWebGLTestSucceed(tab): | 86 if not _DidWebGLTestSucceed(tab): |
| 87 is_valid_dump, trace_output = tab.browser.GetStackTrace() | |
| 88 messages = _WebGLTestMessages(tab) | 87 messages = _WebGLTestMessages(tab) |
| 88 is_valid_dump = False |
| 89 # Problems have been seen attempting to get stack traces on |
| 90 # Android via this API; see crbug.com/609252. Skip this logic |
| 91 # there for the time being. |
| 92 if tab.browser.platform.GetOSName() != 'android': |
| 93 is_valid_dump, trace_output = tab.browser.GetStackTrace() |
| 89 if is_valid_dump: | 94 if is_valid_dump: |
| 90 messages += '\nStack Trace:\n' + trace_output | 95 messages += '\nStack Trace:\n' + trace_output |
| 91 raise page_test.Failure(messages) | 96 raise page_test.Failure(messages) |
| 92 | 97 |
| 93 def CustomizeBrowserOptions(self, options): | 98 def CustomizeBrowserOptions(self, options): |
| 94 # --test-type=gpu is used only to suppress the "Google API Keys are missing" | 99 # --test-type=gpu is used only to suppress the "Google API Keys are missing" |
| 95 # infobar, which causes flakiness in tests. | 100 # infobar, which causes flakiness in tests. |
| 96 options.AppendExtraBrowserArgs([ | 101 options.AppendExtraBrowserArgs([ |
| 97 '--disable-gesture-requirement-for-media-playback', | 102 '--disable-gesture-requirement-for-media-playback', |
| 98 '--disable-domain-blocking-for-3d-apis', | 103 '--disable-domain-blocking-for-3d-apis', |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 # We only check min-version >= 2.0.0 for the top level list. | 352 # We only check min-version >= 2.0.0 for the top level list. |
| 348 test_paths += WebglConformance._ParseTests( | 353 test_paths += WebglConformance._ParseTests( |
| 349 include_path, version, webgl2_only, min_version_to_compare) | 354 include_path, version, webgl2_only, min_version_to_compare) |
| 350 else: | 355 else: |
| 351 test = os.path.join(current_dir, test_name) | 356 test = os.path.join(current_dir, test_name) |
| 352 if webgl_version > 1: | 357 if webgl_version > 1: |
| 353 test += '?webglVersion=' + str(webgl_version) | 358 test += '?webglVersion=' + str(webgl_version) |
| 354 test_paths.append(test) | 359 test_paths.append(test) |
| 355 | 360 |
| 356 return test_paths | 361 return test_paths |
| OLD | NEW |