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 | 4 |
5 import time | 5 import time |
6 | 6 |
7 from telemetry.core import exceptions | 7 from telemetry.core import exceptions |
8 from telemetry.page import page_test | 8 from telemetry.page import page_test |
9 from telemetry.value import scalar | 9 from telemetry.value import scalar |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 self._report_detailed_results = report_detailed_results | 22 self._report_detailed_results = report_detailed_results |
23 | 23 |
24 def CustomizeBrowserOptions(self, options): | 24 def CustomizeBrowserOptions(self, options): |
25 options.AppendExtraBrowserArgs([ | 25 options.AppendExtraBrowserArgs([ |
26 '--enable-impl-side-painting', | 26 '--enable-impl-side-painting', |
27 '--enable-threaded-compositing', | 27 '--enable-threaded-compositing', |
28 '--enable-gpu-benchmarking' | 28 '--enable-gpu-benchmarking' |
29 ]) | 29 ]) |
30 | 30 |
31 def ValidateAndMeasurePage(self, page, tab, results): | 31 def ValidateAndMeasurePage(self, page, tab, results): |
| 32 del page # unused |
32 try: | 33 try: |
33 tab.WaitForDocumentReadyStateToBeComplete() | 34 tab.WaitForDocumentReadyStateToBeComplete() |
34 except exceptions.TimeoutException: | 35 except exceptions.TimeoutException: |
35 pass | 36 pass |
36 time.sleep(self._start_wait_time) | 37 time.sleep(self._start_wait_time) |
37 | 38 |
38 # Enqueue benchmark | 39 # Enqueue benchmark |
39 tab.ExecuteJavaScript(""" | 40 tab.ExecuteJavaScript(""" |
40 window.benchmark_results = {}; | 41 window.benchmark_results = {}; |
41 window.benchmark_results.done = false; | 42 window.benchmark_results.done = false; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 results.current_page, 'total_layers', 'count', total_layers)) | 146 results.current_page, 'total_layers', 'count', total_layers)) |
146 results.AddValue(scalar.ScalarValue( | 147 results.AddValue(scalar.ScalarValue( |
147 results.current_page, 'total_picture_layers', 'count', | 148 results.current_page, 'total_picture_layers', 'count', |
148 total_picture_layers)) | 149 total_picture_layers)) |
149 results.AddValue(scalar.ScalarValue( | 150 results.AddValue(scalar.ScalarValue( |
150 results.current_page, 'total_picture_layers_with_no_content', 'count', | 151 results.current_page, 'total_picture_layers_with_no_content', 'count', |
151 total_picture_layers_with_no_content)) | 152 total_picture_layers_with_no_content)) |
152 results.AddValue(scalar.ScalarValue( | 153 results.AddValue(scalar.ScalarValue( |
153 results.current_page, 'total_picture_layers_off_screen', 'count', | 154 results.current_page, 'total_picture_layers_off_screen', 'count', |
154 total_picture_layers_off_screen)) | 155 total_picture_layers_off_screen)) |
OLD | NEW |