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 import glob | 4 import glob |
5 import os | 5 import os |
6 import re | 6 import re |
7 import sys | 7 import sys |
8 | 8 |
9 from gpu_tests import gpu_integration_test | 9 from gpu_tests import gpu_integration_test |
10 from gpu_tests import cloud_storage_integration_test_base | 10 from gpu_tests import cloud_storage_integration_test_base |
(...skipping 13 matching lines...) Expand all Loading... |
24 test_data_dirs = [gpu_data_dir, | 24 test_data_dirs = [gpu_data_dir, |
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._succeeded = false; | 31 domAutomationController._succeeded = false; |
32 domAutomationController._finished = false; | 32 domAutomationController._finished = false; |
33 | 33 |
34 domAutomationController.setAutomationId = function(id) {} | |
35 | |
36 domAutomationController.send = function(msg) { | 34 domAutomationController.send = function(msg) { |
37 domAutomationController._finished = true; | 35 domAutomationController._finished = true; |
38 | 36 |
39 if(msg.toLowerCase() == "success") { | 37 if(msg.toLowerCase() == "success") { |
40 domAutomationController._succeeded = true; | 38 domAutomationController._succeeded = true; |
41 } else { | 39 } else { |
42 domAutomationController._succeeded = false; | 40 domAutomationController._succeeded = false; |
43 } | 41 } |
44 } | 42 } |
45 | 43 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 208 |
211 print ('Reference image not found. Writing tab contents as reference to: ' + | 209 print ('Reference image not found. Writing tab contents as reference to: ' + |
212 image_path) | 210 image_path) |
213 | 211 |
214 self._WriteImage(image_path, screenshot) | 212 self._WriteImage(image_path, screenshot) |
215 return screenshot | 213 return screenshot |
216 | 214 |
217 def load_tests(loader, tests, pattern): | 215 def load_tests(loader, tests, pattern): |
218 del loader, tests, pattern # Unused. | 216 del loader, tests, pattern # Unused. |
219 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) | 217 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) |
OLD | NEW |