OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 from gpu_tests import gpu_process_expectations as expectations | 4 from gpu_tests import gpu_process_expectations as expectations |
5 from gpu_tests import gpu_test_base | 5 from gpu_tests import gpu_test_base |
6 import page_sets | 6 import page_sets |
7 | 7 |
8 from telemetry.page import page_test | 8 from telemetry.page import page_test |
9 | 9 |
10 test_harness_script = r""" | 10 test_harness_script = r""" |
11 var domAutomationController = {}; | 11 var domAutomationController = {}; |
12 domAutomationController._finished = false; | 12 domAutomationController._finished = false; |
13 domAutomationController.setAutomationId = function(id) {} | 13 domAutomationController.setAutomationId = function(id) {} |
14 domAutomationController.send = function(msg) { | 14 domAutomationController.send = function(msg) { |
15 domAutomationController._finished = true; | 15 domAutomationController._finished = true; |
16 } | 16 } |
17 | 17 |
18 window.domAutomationController = domAutomationController; | 18 window.domAutomationController = domAutomationController; |
| 19 |
| 20 function GetDriverBugWorkarounds() { |
| 21 var query_result = document.querySelector('.workarounds-list'); |
| 22 var browser_list = [] |
| 23 for (var i=0; i < query_result.childElementCount; i++) |
| 24 browser_list.push(query_result.children[i].textContent); |
| 25 return browser_list; |
| 26 }; |
19 """ | 27 """ |
20 | 28 |
21 class GpuProcessValidator(gpu_test_base.ValidatorBase): | 29 class GpuProcessValidator(gpu_test_base.ValidatorBase): |
22 def __init__(self): | 30 def __init__(self): |
23 super(GpuProcessValidator, self).__init__( | 31 super(GpuProcessValidator, self).__init__( |
24 needs_browser_restart_after_each_page=True) | 32 needs_browser_restart_after_each_page=True) |
25 | 33 |
26 def CustomizeBrowserOptions(self, options): | 34 def CustomizeBrowserOptions(self, options): |
27 options.AppendExtraBrowserArgs('--enable-gpu-benchmarking') | 35 options.AppendExtraBrowserArgs('--enable-gpu-benchmarking') |
28 | 36 |
(...skipping 15 matching lines...) Expand all Loading... |
44 return 'gpu_process' | 52 return 'gpu_process' |
45 | 53 |
46 def _CreateExpectations(self): | 54 def _CreateExpectations(self): |
47 return expectations.GpuProcessExpectations() | 55 return expectations.GpuProcessExpectations() |
48 | 56 |
49 def CreateStorySet(self, options): | 57 def CreateStorySet(self, options): |
50 story_set = page_sets.GpuProcessTestsStorySet(self.GetExpectations()) | 58 story_set = page_sets.GpuProcessTestsStorySet(self.GetExpectations()) |
51 for page in story_set: | 59 for page in story_set: |
52 page.script_to_evaluate_on_commit = test_harness_script | 60 page.script_to_evaluate_on_commit = test_harness_script |
53 return story_set | 61 return story_set |
OLD | NEW |