Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: content/test/gpu/gpu_tests/webgl_conformance.py

Issue 1384823002: Add "--test-type=gpu" to suppress API Keys InfoBar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/test/gpu/gpu_tests/screenshot_sync.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 optparse 5 import optparse
6 import os 6 import os
7 import sys 7 import sys
8 8
9 import gpu_test_base 9 import gpu_test_base
10 import path_util 10 import path_util
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 class WebglConformanceValidator(gpu_test_base.ValidatorBase): 76 class WebglConformanceValidator(gpu_test_base.ValidatorBase):
77 def __init__(self): 77 def __init__(self):
78 super(WebglConformanceValidator, self).__init__() 78 super(WebglConformanceValidator, self).__init__()
79 79
80 def ValidateAndMeasurePage(self, page, tab, results): 80 def ValidateAndMeasurePage(self, page, tab, results):
81 if not _DidWebGLTestSucceed(tab): 81 if not _DidWebGLTestSucceed(tab):
82 raise page_test.Failure(_WebGLTestMessages(tab)) 82 raise page_test.Failure(_WebGLTestMessages(tab))
83 83
84 def CustomizeBrowserOptions(self, options): 84 def CustomizeBrowserOptions(self, options):
85 # --test-type=gpu is used only to suppress the "Google API Keys are missing"
86 # infobar, which causes flakiness in tests.
85 options.AppendExtraBrowserArgs([ 87 options.AppendExtraBrowserArgs([
86 '--disable-gesture-requirement-for-media-playback', 88 '--disable-gesture-requirement-for-media-playback',
87 '--disable-domain-blocking-for-3d-apis', 89 '--disable-domain-blocking-for-3d-apis',
88 '--disable-gpu-process-crash-limit' 90 '--disable-gpu-process-crash-limit',
91 '--test-type=gpu'
89 ]) 92 ])
90 browser = browser_finder.FindBrowser(options.finder_options) 93 browser = browser_finder.FindBrowser(options.finder_options)
91 if (browser.target_os.startswith('android') and 94 if (browser.target_os.startswith('android') and
92 browser.browser_type == 'android-webview-shell'): 95 browser.browser_type == 'android-webview-shell'):
93 # TODO(kbr): this is overly broad. We'd like to do this only on 96 # TODO(kbr): this is overly broad. We'd like to do this only on
94 # Nexus 9. It'll go away shortly anyway. crbug.com/499928 97 # Nexus 9. It'll go away shortly anyway. crbug.com/499928
95 # 98 #
96 # The --ignore_egl_sync_failures is only there to work around 99 # The --ignore_egl_sync_failures is only there to work around
97 # some strange failure on the Nexus 9 bot, not reproducible on 100 # some strange failure on the Nexus 9 bot, not reproducible on
98 # local hardware. 101 # local hardware.
99 options.AppendExtraBrowserArgs([ 102 options.AppendExtraBrowserArgs([
100 '--disable-gl-extensions=GL_EXT_disjoint_timer_query', 103 '--disable-gl-extensions=GL_EXT_disjoint_timer_query',
101 '--ignore_egl_sync_failures' 104 '--ignore_egl_sync_failures'
102 ]) 105 ])
103 106
104 107
105 class Webgl2ConformanceValidator(WebglConformanceValidator): 108 class Webgl2ConformanceValidator(WebglConformanceValidator):
106 def __init__(self): 109 def __init__(self):
107 super(Webgl2ConformanceValidator, self).__init__() 110 super(Webgl2ConformanceValidator, self).__init__()
108 111
109 def CustomizeBrowserOptions(self, options): 112 def CustomizeBrowserOptions(self, options):
113 # --test-type=gpu is used only to suppress the "Google API Keys are missing"
114 # infobar, which causes flakiness in tests.
110 options.AppendExtraBrowserArgs([ 115 options.AppendExtraBrowserArgs([
111 '--disable-gesture-requirement-for-media-playback', 116 '--disable-gesture-requirement-for-media-playback',
112 '--disable-domain-blocking-for-3d-apis', 117 '--disable-domain-blocking-for-3d-apis',
113 '--disable-gpu-process-crash-limit', 118 '--disable-gpu-process-crash-limit',
114 '--enable-unsafe-es3-apis' 119 '--enable-unsafe-es3-apis',
120 '--test-type=gpu'
115 ]) 121 ])
116 122
117 class WebglConformancePage(gpu_test_base.PageBase): 123 class WebglConformancePage(gpu_test_base.PageBase):
118 def __init__(self, story_set, test, expectations): 124 def __init__(self, story_set, test, expectations):
119 super(WebglConformancePage, self).__init__( 125 super(WebglConformancePage, self).__init__(
120 url='file://' + test, page_set=story_set, base_dir=story_set.base_dir, 126 url='file://' + test, page_set=story_set, base_dir=story_set.base_dir,
121 shared_page_state_class=gpu_test_base.DesktopGpuSharedPageState, 127 shared_page_state_class=gpu_test_base.DesktopGpuSharedPageState,
122 name=('WebglConformance.%s' % 128 name=('WebglConformance.%s' %
123 test.replace('/', '_').replace('-', '_'). 129 test.replace('/', '_').replace('-', '_').
124 replace('\\', '_').rpartition('.')[0].replace('.', '_')), 130 replace('\\', '_').rpartition('.')[0].replace('.', '_')),
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 # We only check min-version >= 2.0.0 for the top level list. 236 # We only check min-version >= 2.0.0 for the top level list.
231 test_paths += WebglConformance._ParseTests( 237 test_paths += WebglConformance._ParseTests(
232 include_path, version, webgl2_only, min_version_to_compare) 238 include_path, version, webgl2_only, min_version_to_compare)
233 else: 239 else:
234 test = os.path.join(current_dir, test_name) 240 test = os.path.join(current_dir, test_name)
235 if webgl_version > 1: 241 if webgl_version > 1:
236 test += '?webglVersion=' + str(webgl_version) 242 test += '?webglVersion=' + str(webgl_version)
237 test_paths.append(test) 243 test_paths.append(test)
238 244
239 return test_paths 245 return test_paths
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/screenshot_sync.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698