| 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 depth_capture_expectations | 9 from gpu_tests import depth_capture_expectations |
| 10 from gpu_tests import path_util | 10 from gpu_tests import path_util |
| 11 | 11 |
| 12 data_path = os.path.join( | 12 data_path = os.path.join( |
| 13 path_util.GetChromiumSrcDir(), 'content', 'test', 'data', 'media') | 13 path_util.GetChromiumSrcDir(), 'content', 'test', 'data', 'media') |
| 14 | 14 |
| 15 wait_timeout = 60 # seconds | 15 wait_timeout = 60 # seconds |
| 16 | 16 |
| 17 harness_script = r""" | 17 harness_script = r""" |
| 18 var domAutomationController = {}; | 18 var domAutomationController = {}; |
| 19 | 19 |
| 20 domAutomationController._succeeded = false; | 20 domAutomationController._succeeded = false; |
| 21 domAutomationController._finished = false; | 21 domAutomationController._finished = false; |
| 22 domAutomationController._error_msg = ""; | 22 domAutomationController._error_msg = ""; |
| 23 | 23 |
| 24 domAutomationController.setAutomationId = function(id) {} | |
| 25 | |
| 26 domAutomationController.send = function(msg) { | 24 domAutomationController.send = function(msg) { |
| 27 if (msg == "OK") { | 25 if (msg == "OK") { |
| 28 if (!domAutomationController._finished) { | 26 if (!domAutomationController._finished) { |
| 29 domAutomationController._succeeded = true; | 27 domAutomationController._succeeded = true; |
| 30 } | 28 } |
| 31 domAutomationController._finished = true; | 29 domAutomationController._finished = true; |
| 32 } else { | 30 } else { |
| 33 domAutomationController._succeeded = false; | 31 domAutomationController._succeeded = false; |
| 34 domAutomationController._finished = true; | 32 domAutomationController._finished = true; |
| 35 domAutomationController._error_msg = msg; | 33 domAutomationController._error_msg = msg; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 '--use-fake-ui-for-media-stream', | 83 '--use-fake-ui-for-media-stream', |
| 86 '--use-fake-device-for-media-stream=device-count=2', | 84 '--use-fake-device-for-media-stream=device-count=2', |
| 87 # Required for about:gpucrash handling from Telemetry. | 85 # Required for about:gpucrash handling from Telemetry. |
| 88 '--enable-gpu-benchmarking']) | 86 '--enable-gpu-benchmarking']) |
| 89 cls.StartBrowser() | 87 cls.StartBrowser() |
| 90 cls.SetStaticServerDirs([data_path]) | 88 cls.SetStaticServerDirs([data_path]) |
| 91 | 89 |
| 92 def load_tests(loader, tests, pattern): | 90 def load_tests(loader, tests, pattern): |
| 93 del loader, tests, pattern # Unused. | 91 del loader, tests, pattern # Unused. |
| 94 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) | 92 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) |
| OLD | NEW |