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

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

Issue 2473933002: Enable WebGL 2 by default! (on desktop) (Closed)
Patch Set: undo rename of GpuPreferences::enable_unsafe_es3_apis Created 4 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
OLDNEW
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 import glob 4 import glob
5 import logging 5 import logging
6 import os 6 import os
7 import re 7 import re
8 import sys
9 8
10 from gpu_tests import cloud_storage_integration_test_base 9 from gpu_tests import cloud_storage_integration_test_base
11 from gpu_tests import pixel_expectations 10 from gpu_tests import pixel_expectations
12 from gpu_tests import pixel_test_pages 11 from gpu_tests import pixel_test_pages
13 12
14 from py_utils import cloud_storage 13 from py_utils import cloud_storage
15 from telemetry.util import image_util 14 from telemetry.util import image_util
16 15
17 16
18 test_data_dir = os.path.abspath(os.path.join( 17 test_data_dir = os.path.abspath(os.path.join(
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 default=default_reference_image_dir) 105 default=default_reference_image_dir)
107 106
108 @classmethod 107 @classmethod
109 def _CreateExpectations(cls): 108 def _CreateExpectations(cls):
110 return pixel_expectations.PixelExpectations() 109 return pixel_expectations.PixelExpectations()
111 110
112 @classmethod 111 @classmethod
113 def GenerateGpuTests(cls, options): 112 def GenerateGpuTests(cls, options):
114 cls.SetParsedCommandLineOptions(options) 113 cls.SetParsedCommandLineOptions(options)
115 name = 'Pixel' 114 name = 'Pixel'
116 pages = pixel_test_pages.ES2AndES3Pages(name) 115 pages = pixel_test_pages.DefaultPages(name)
117 pages += pixel_test_pages.ExperimentalCanvasFeaturesPages(name) 116 pages += pixel_test_pages.ExperimentalCanvasFeaturesPages(name)
118 if sys.platform.startswith('darwin'):
119 # TOOD(kbr): replace this with CopyPagesWithNewBrowserArgsAndPrefix,
120 # and removeCopyPagesWithNewBrowserArgsAndSuffix. This renaming
121 # will cause all of the ES3 tests to be run back-to-back,
122 # reducing the number of browser restarts and speeding up the
123 # tests. Note that this will require all the ES3 tests to be
124 # temporarily marked failing on macOS, and is too big a change
125 # to do along with the port to the new harness.
126 pages += pixel_test_pages.CopyPagesWithNewBrowserArgsAndSuffix(
127 pixel_test_pages.ES2AndES3Pages(name),
128 ['--enable-unsafe-es3-apis'], 'ES3')
129 pages += pixel_test_pages.MacSpecificPages(name)
130 for p in pages: 117 for p in pages:
131 yield(p.name, p.url, (p)) 118 yield(p.name, p.url, (p))
132 119
133 def RunActualGpuTest(self, test_path, *args): 120 def RunActualGpuTest(self, test_path, *args):
134 page = args[0] 121 page = args[0]
135 # Some pixel tests require non-standard browser arguments. Need to 122 # Some pixel tests require non-standard browser arguments. Need to
136 # check before running each page that it can run in the current 123 # check before running each page that it can run in the current
137 # browser instance. 124 # browser instance.
138 self.RestartBrowserIfNecessaryWithArgs(page.browser_args) 125 self.RestartBrowserIfNecessaryWithArgs(page.browser_args)
139 url = self.UrlOfStaticFilePath(test_path) 126 url = self.UrlOfStaticFilePath(test_path)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 ref_png = None 216 ref_png = None
230 217
231 if ref_png is not None: 218 if ref_png is not None:
232 return ref_png 219 return ref_png
233 220
234 print ('Reference image not found. Writing tab contents as reference to: ' + 221 print ('Reference image not found. Writing tab contents as reference to: ' +
235 image_path) 222 image_path)
236 223
237 self._WriteImage(image_path, screenshot) 224 self._WriteImage(image_path, screenshot)
238 return screenshot 225 return screenshot
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/pixel_expectations.py ('k') | content/test/gpu/gpu_tests/pixel_test_pages.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698