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

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

Issue 48113021: Expose WebGL extension WEBGL_debug_renderer_info to Google domains (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update the test Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « content/test/gpu/gpu_tests/webgl_debug_renderer_info.js ('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
(Empty)
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4 import optparse
5 import os
6
7 from telemetry import test as test_module
8 from telemetry.core import util
9 from telemetry.page import page_set
10 from telemetry.page import page_test
11
12 data_path = os.path.join(
13 util.GetChromiumSrcDir(), 'content', 'test', 'data', 'gpu')
14
15
16 class _WebGLDebugRendererInfoValidator(page_test.PageTest):
17 def __init__(self):
18 super(_WebGLDebugRendererInfoValidator, self).__init__('ValidatePage')
19
20 def CustomizeBrowserOptions(self, options):
21 chrome_finch_option = options.finch_option
22 if options.finch_option == "bypassed":
23 chrome_finch_option = "enabled"
24 options.AppendExtraBrowserArgs('--disable-webgl-debug-renderer-info')
25 options.AppendExtraBrowserArgs(
26 '--force-fieldtrials=WebGLDebugRendererInfo/%s/' %
27 chrome_finch_option)
28 options.AppendExtraBrowserArgs('--google-base-url=http://127.0.0.1')
29
30 def InjectJavascript(self):
31 return [os.path.join(os.path.dirname(__file__),
32 'webgl_debug_renderer_info.js')]
33
34 def ValidatePage(self, page, tab, results):
35 if not tab.EvaluateJavaScript('window.domAutomationController._succeeded'):
36 raise page_test.Failure('Test failed')
37
38 class WebGLDebugRendererInfo(test_module.Test):
39 test = _WebGLDebugRendererInfoValidator
40
41 @staticmethod
42 def AddTestCommandLineOptions(parser):
43 group = optparse.OptionGroup(parser, 'Finch experiment options')
44 group.add_option('--finch-option',
45 help = """
46 Options: enabled, disabled, bypassed
47 enabled = experiment forced on, expect extension to be present
48 disabled = experiment forced off, expect extension to be absent
49 bypassed = experiment forced on, disabled via command line flag,
50 expect extension to be absent
51 """,
52 default='enabled')
53 parser.add_option_group(group)
54
55 def CreatePageSet(self, options):
56 page_set_dict = {
57 'description': 'Test cases for WEBGL_debug_renderer_info extension',
58 'user_agent_type': 'desktop',
59 'serving_dirs': [''],
60 'pages': [
61 {
62 'name': 'WEBGL_debug_render_info.%s' %
63 options.finch_option,
64 'url': 'file://webgl_debug_renderer_info.html?query=%s' %
65 options.finch_option,
66 'navigate_steps': [
67 { 'action': 'navigate' }
68 ]
69 }
70 ]
71 }
72 return page_set.PageSet.FromDict(page_set_dict, data_path)
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl_debug_renderer_info.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698