| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 | 4 |
| 5 import logging |
| 5 import os | 6 import os |
| 6 | 7 |
| 7 from gpu_tests import gpu_integration_test | 8 from gpu_tests import gpu_integration_test |
| 8 from gpu_tests import path_util | 9 from gpu_tests import path_util |
| 9 from gpu_tests import webgl_conformance_expectations | 10 from gpu_tests import webgl_conformance_expectations |
| 10 from gpu_tests import webgl2_conformance_expectations | 11 from gpu_tests import webgl2_conformance_expectations |
| 11 | 12 |
| 12 from telemetry.internal.browser import browser_finder | 13 from telemetry.internal.browser import browser_finder |
| 13 | 14 |
| 14 conformance_relcomps = ( | 15 conformance_relcomps = ( |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 @classmethod | 244 @classmethod |
| 244 def CustomizeOptions(cls): | 245 def CustomizeOptions(cls): |
| 245 assert cls._webgl_version == 1 or cls._webgl_version == 2 | 246 assert cls._webgl_version == 1 or cls._webgl_version == 2 |
| 246 browser_options = cls._finder_options.browser_options | 247 browser_options = cls._finder_options.browser_options |
| 247 # --test-type=gpu is used only to suppress the "Google API Keys are missing" | 248 # --test-type=gpu is used only to suppress the "Google API Keys are missing" |
| 248 # infobar, which causes flakiness in tests. | 249 # infobar, which causes flakiness in tests. |
| 249 browser_options.AppendExtraBrowserArgs([ | 250 browser_options.AppendExtraBrowserArgs([ |
| 250 '--disable-gesture-requirement-for-media-playback', | 251 '--disable-gesture-requirement-for-media-playback', |
| 251 '--disable-domain-blocking-for-3d-apis', | 252 '--disable-domain-blocking-for-3d-apis', |
| 252 '--disable-gpu-process-crash-limit', | 253 '--disable-gpu-process-crash-limit', |
| 253 '--js-flags=--expose-gc', | |
| 254 '--test-type=gpu', | 254 '--test-type=gpu', |
| 255 '--enable-experimental-canvas-features', | 255 '--enable-experimental-canvas-features', |
| 256 # Try disabling the GPU watchdog to see if this affects the | 256 # Try disabling the GPU watchdog to see if this affects the |
| 257 # intermittent GPU process hangs that have been seen on the | 257 # intermittent GPU process hangs that have been seen on the |
| 258 # waterfall. crbug.com/596622 crbug.com/609252 | 258 # waterfall. crbug.com/596622 crbug.com/609252 |
| 259 '--disable-gpu-watchdog' | 259 '--disable-gpu-watchdog' |
| 260 ]) | 260 ]) |
| 261 |
| 262 builtin_js_flags = '--js-flags=--expose-gc' |
| 263 found_js_flags = False |
| 264 user_js_flags = '' |
| 265 if browser_options.extra_browser_args: |
| 266 for o in browser_options.extra_browser_args: |
| 267 if o.startswith('--js-flags'): |
| 268 found_js_flags = True |
| 269 user_js_flags = o |
| 270 break |
| 271 if found_js_flags: |
| 272 logging.warning('Overriding built-in JavaScript flags:') |
| 273 logging.warning(' Original flags: ' + builtin_js_flags) |
| 274 logging.warning(' New flags: ' + user_js_flags) |
| 275 else: |
| 276 browser_options.AppendExtraBrowserArgs([builtin_js_flags]) |
| 277 |
| 261 if cls._webgl_version == 2: | 278 if cls._webgl_version == 2: |
| 262 browser_options.AppendExtraBrowserArgs([ | 279 browser_options.AppendExtraBrowserArgs([ |
| 263 '--enable-es3-apis', | 280 '--enable-es3-apis', |
| 264 ]) | 281 ]) |
| 265 browser = browser_finder.FindBrowser(browser_options.finder_options) | 282 browser = browser_finder.FindBrowser(browser_options.finder_options) |
| 266 if (browser.target_os.startswith('android') and | 283 if (browser.target_os.startswith('android') and |
| 267 browser.browser_type == 'android-webview-shell'): | 284 browser.browser_type == 'android-webview-shell'): |
| 268 # TODO(kbr): this is overly broad. We'd like to do this only on | 285 # TODO(kbr): this is overly broad. We'd like to do this only on |
| 269 # Nexus 9. It'll go away shortly anyway. crbug.com/499928 | 286 # Nexus 9. It'll go away shortly anyway. crbug.com/499928 |
| 270 # | 287 # |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 # We only check min-version >= 2.0.0 for the top level list. | 382 # We only check min-version >= 2.0.0 for the top level list. |
| 366 test_paths += cls._ParseTests( | 383 test_paths += cls._ParseTests( |
| 367 include_path, version, webgl2_only, min_version_to_compare) | 384 include_path, version, webgl2_only, min_version_to_compare) |
| 368 else: | 385 else: |
| 369 test = os.path.join(current_dir, test_name) | 386 test = os.path.join(current_dir, test_name) |
| 370 if webgl_version > 1: | 387 if webgl_version > 1: |
| 371 test += '?webglVersion=' + str(webgl_version) | 388 test += '?webglVersion=' + str(webgl_version) |
| 372 test_paths.append(test) | 389 test_paths.append(test) |
| 373 | 390 |
| 374 return test_paths | 391 return test_paths |
| OLD | NEW |