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 os | 5 import os |
6 import sys | 6 import sys |
7 | 7 |
8 from gpu_tests import gpu_integration_test | 8 from gpu_tests import gpu_integration_test |
9 from gpu_tests import path_util | 9 from gpu_tests import path_util |
10 from gpu_tests import pixel_test_pages | 10 from gpu_tests import pixel_test_pages |
(...skipping 12 matching lines...) Expand all Loading... |
23 data_paths = [os.path.join( | 23 data_paths = [os.path.join( |
24 path_util.GetChromiumSrcDir(), gpu_relative_path), | 24 path_util.GetChromiumSrcDir(), gpu_relative_path), |
25 os.path.join( | 25 os.path.join( |
26 path_util.GetChromiumSrcDir(), 'media', 'test', 'data')] | 26 path_util.GetChromiumSrcDir(), 'media', 'test', 'data')] |
27 | 27 |
28 test_harness_script = r""" | 28 test_harness_script = r""" |
29 var domAutomationController = {}; | 29 var domAutomationController = {}; |
30 | 30 |
31 domAutomationController._finished = false; | 31 domAutomationController._finished = false; |
32 | 32 |
33 domAutomationController.setAutomationId = function(id) {} | |
34 | |
35 domAutomationController.send = function(msg) { | 33 domAutomationController.send = function(msg) { |
36 // Issue a read pixel to synchronize the gpu process to ensure | 34 // Issue a read pixel to synchronize the gpu process to ensure |
37 // the asynchronous category enabling is finished. | 35 // the asynchronous category enabling is finished. |
38 var temp_canvas = document.createElement("canvas") | 36 var temp_canvas = document.createElement("canvas") |
39 temp_canvas.width = 1; | 37 temp_canvas.width = 1; |
40 temp_canvas.height = 1; | 38 temp_canvas.height = 1; |
41 var temp_gl = temp_canvas.getContext("experimental-webgl") || | 39 var temp_gl = temp_canvas.getContext("experimental-webgl") || |
42 temp_canvas.getContext("webgl"); | 40 temp_canvas.getContext("webgl"); |
43 if (temp_gl) { | 41 if (temp_gl) { |
44 temp_gl.clear(temp_gl.COLOR_BUFFER_BIT); | 42 temp_gl.clear(temp_gl.COLOR_BUFFER_BIT); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 path_util.SetupTelemetryPaths() | 121 path_util.SetupTelemetryPaths() |
124 cls.CustomizeBrowserArgs([ | 122 cls.CustomizeBrowserArgs([ |
125 '--enable-logging', | 123 '--enable-logging', |
126 '--enable-experimental-canvas-features']) | 124 '--enable-experimental-canvas-features']) |
127 cls.StartBrowser() | 125 cls.StartBrowser() |
128 cls.SetStaticServerDirs(data_paths) | 126 cls.SetStaticServerDirs(data_paths) |
129 | 127 |
130 def load_tests(loader, tests, pattern): | 128 def load_tests(loader, tests, pattern): |
131 del loader, tests, pattern # Unused. | 129 del loader, tests, pattern # Unused. |
132 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) | 130 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) |
OLD | NEW |