Commit 25da6356 authored by kbr's avatar kbr Committed by Commit bot

Support --js-flags via --extra-browser-args in WebGL conformance tests.

It's impractical to merge them, so instead, allow overriding them.

Tested manually on Windows.

BUG=675582
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2617453002
Cr-Commit-Position: refs/heads/master@{#441410}
parent 0a9167f9
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import logging
import os import os
from gpu_tests import gpu_integration_test from gpu_tests import gpu_integration_test
...@@ -250,7 +251,6 @@ class WebGLConformanceIntegrationTest(gpu_integration_test.GpuIntegrationTest): ...@@ -250,7 +251,6 @@ class WebGLConformanceIntegrationTest(gpu_integration_test.GpuIntegrationTest):
'--disable-gesture-requirement-for-media-playback', '--disable-gesture-requirement-for-media-playback',
'--disable-domain-blocking-for-3d-apis', '--disable-domain-blocking-for-3d-apis',
'--disable-gpu-process-crash-limit', '--disable-gpu-process-crash-limit',
'--js-flags=--expose-gc',
'--test-type=gpu', '--test-type=gpu',
'--enable-experimental-canvas-features', '--enable-experimental-canvas-features',
# Try disabling the GPU watchdog to see if this affects the # Try disabling the GPU watchdog to see if this affects the
...@@ -258,6 +258,23 @@ class WebGLConformanceIntegrationTest(gpu_integration_test.GpuIntegrationTest): ...@@ -258,6 +258,23 @@ class WebGLConformanceIntegrationTest(gpu_integration_test.GpuIntegrationTest):
# waterfall. crbug.com/596622 crbug.com/609252 # waterfall. crbug.com/596622 crbug.com/609252
'--disable-gpu-watchdog' '--disable-gpu-watchdog'
]) ])
builtin_js_flags = '--js-flags=--expose-gc'
found_js_flags = False
user_js_flags = ''
if browser_options.extra_browser_args:
for o in browser_options.extra_browser_args:
if o.startswith('--js-flags'):
found_js_flags = True
user_js_flags = o
break
if found_js_flags:
logging.warning('Overriding built-in JavaScript flags:')
logging.warning(' Original flags: ' + builtin_js_flags)
logging.warning(' New flags: ' + user_js_flags)
else:
browser_options.AppendExtraBrowserArgs([builtin_js_flags])
if cls._webgl_version == 2: if cls._webgl_version == 2:
browser_options.AppendExtraBrowserArgs([ browser_options.AppendExtraBrowserArgs([
'--enable-es3-apis', '--enable-es3-apis',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment