| 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 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 'getusermedia-depth-capture.html?query=RGBAFloat'), | 70 'getusermedia-depth-capture.html?query=RGBAFloat'), |
| 71 ('DepthCapture_depthStreamToR32FloatTexture', | 71 ('DepthCapture_depthStreamToR32FloatTexture', |
| 72 'getusermedia-depth-capture.html?query=R32Float')) | 72 'getusermedia-depth-capture.html?query=R32Float')) |
| 73 for t in tests: | 73 for t in tests: |
| 74 yield (t[0], t[1], ('_' + t[0])) | 74 yield (t[0], t[1], ('_' + t[0])) |
| 75 | 75 |
| 76 def RunActualGpuTest(self, test_path, *args): | 76 def RunActualGpuTest(self, test_path, *args): |
| 77 url = self.UrlOfStaticFilePath(test_path) | 77 url = self.UrlOfStaticFilePath(test_path) |
| 78 tab = self.tab | 78 tab = self.tab |
| 79 tab.Navigate(url, script_to_evaluate_on_commit=harness_script) | 79 tab.Navigate(url, script_to_evaluate_on_commit=harness_script) |
| 80 tab.action_runner.WaitForJavaScriptCondition2( | 80 tab.action_runner.WaitForJavaScriptCondition( |
| 81 'domAutomationController._finished', timeout=60) | 81 'domAutomationController._finished', timeout=60) |
| 82 if not tab.EvaluateJavaScript2('domAutomationController._succeeded'): | 82 if not tab.EvaluateJavaScript('domAutomationController._succeeded'): |
| 83 self.fail('page indicated test failure:' + | 83 self.fail('page indicated test failure:' + |
| 84 tab.EvaluateJavaScript2('domAutomationController._error_msg')) | 84 tab.EvaluateJavaScript('domAutomationController._error_msg')) |
| 85 | 85 |
| 86 @classmethod | 86 @classmethod |
| 87 def _CreateExpectations(cls): | 87 def _CreateExpectations(cls): |
| 88 return depth_capture_expectations.DepthCaptureExpectations() | 88 return depth_capture_expectations.DepthCaptureExpectations() |
| 89 | 89 |
| 90 @classmethod | 90 @classmethod |
| 91 def SetUpProcess(cls): | 91 def SetUpProcess(cls): |
| 92 super(cls, DepthCaptureIntegrationTest).SetUpProcess() | 92 super(cls, DepthCaptureIntegrationTest).SetUpProcess() |
| 93 cls.CustomizeOptions() | 93 cls.CustomizeOptions() |
| 94 cls.SetBrowserOptions(cls._finder_options) | 94 cls.SetBrowserOptions(cls._finder_options) |
| 95 cls.StartBrowser() | 95 cls.StartBrowser() |
| 96 cls.SetStaticServerDirs([data_path]) | 96 cls.SetStaticServerDirs([data_path]) |
| 97 | 97 |
| 98 def load_tests(loader, tests, pattern): | 98 def load_tests(loader, tests, pattern): |
| 99 del loader, tests, pattern # Unused. | 99 del loader, tests, pattern # Unused. |
| 100 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) | 100 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) |
| OLD | NEW |