OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 os | 4 import os |
5 | 5 |
6 from chrome_remote_control import multi_page_benchmark | 6 from chrome_remote_control import multi_page_benchmark |
7 from chrome_remote_control import util | 7 from chrome_remote_control import util |
8 | 8 |
9 class DidNotScrollException(multi_page_benchmark.MeasurementFailure): | 9 class DidNotScrollException(multi_page_benchmark.MeasurementFailure): |
10 def __init__(self): | 10 def __init__(self): |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 def CustomizeBrowserOptions(self, options): | 76 def CustomizeBrowserOptions(self, options): |
77 if not options.no_gpu_benchmarking_extension: | 77 if not options.no_gpu_benchmarking_extension: |
78 options.extra_browser_args.append('--enable-gpu-benchmarking') | 78 options.extra_browser_args.append('--enable-gpu-benchmarking') |
79 | 79 |
80 def MeasurePage(self, page, tab, results): | 80 def MeasurePage(self, page, tab, results): |
81 rendering_stats_deltas = self.ScrollPageFully(page, tab) | 81 rendering_stats_deltas = self.ScrollPageFully(page, tab) |
82 CalcScrollResults(rendering_stats_deltas, results) | 82 CalcScrollResults(rendering_stats_deltas, results) |
83 if self.options.report_all_results: | 83 if self.options.report_all_results: |
84 for k, v in rendering_stats_deltas.iteritems(): | 84 for k, v in rendering_stats_deltas.iteritems(): |
85 results.Add(k, '', v) | 85 results.Add(k, '', v) |
86 | |
87 | |
88 def Main(): | |
89 return multi_page_benchmark.Main(ScrollingBenchmark()) | |
OLD | NEW |