Chromium Code Reviews| 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 raise page_test.Failure(_WebGLTestMessages(tab)) | 87 is_valid_dump, trace_output = tab.browser.GetStackTrace() |
|
Ken Russell (switch to Gerrit)
2016/06/16 17:48:01
I was concerned about the performance cost of doin
| |
| 88 messages = _WebGLTestMessages(tab) | |
| 89 if is_valid_dump: | |
| 90 messages += '\nStack Trace:\n' + trace_output | |
| 91 raise page_test.Failure(messages) | |
| 88 | 92 |
| 89 def CustomizeBrowserOptions(self, options): | 93 def CustomizeBrowserOptions(self, options): |
| 90 # --test-type=gpu is used only to suppress the "Google API Keys are missing" | 94 # --test-type=gpu is used only to suppress the "Google API Keys are missing" |
| 91 # infobar, which causes flakiness in tests. | 95 # infobar, which causes flakiness in tests. |
| 92 options.AppendExtraBrowserArgs([ | 96 options.AppendExtraBrowserArgs([ |
| 93 '--disable-gesture-requirement-for-media-playback', | 97 '--disable-gesture-requirement-for-media-playback', |
| 94 '--disable-domain-blocking-for-3d-apis', | 98 '--disable-domain-blocking-for-3d-apis', |
| 95 '--disable-gpu-process-crash-limit', | 99 '--disable-gpu-process-crash-limit', |
| 96 '--js-flags=--expose-gc', | 100 '--js-flags=--expose-gc', |
| 97 '--test-type=gpu', | 101 '--test-type=gpu', |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 343 # We only check min-version >= 2.0.0 for the top level list. | 347 # We only check min-version >= 2.0.0 for the top level list. |
| 344 test_paths += WebglConformance._ParseTests( | 348 test_paths += WebglConformance._ParseTests( |
| 345 include_path, version, webgl2_only, min_version_to_compare) | 349 include_path, version, webgl2_only, min_version_to_compare) |
| 346 else: | 350 else: |
| 347 test = os.path.join(current_dir, test_name) | 351 test = os.path.join(current_dir, test_name) |
| 348 if webgl_version > 1: | 352 if webgl_version > 1: |
| 349 test += '?webglVersion=' + str(webgl_version) | 353 test += '?webglVersion=' + str(webgl_version) |
| 350 test_paths.append(test) | 354 test_paths.append(test) |
| 351 | 355 |
| 352 return test_paths | 356 return test_paths |
| OLD | NEW |