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 from telemetry.page import legacy_page_test | 5 from telemetry.page import legacy_page_test |
6 from telemetry.timeline import chrome_trace_category_filter | 6 from telemetry.timeline import chrome_trace_category_filter |
7 from telemetry.web_perf import timeline_based_measurement | 7 from telemetry.web_perf import timeline_based_measurement |
8 from telemetry.web_perf.metrics import smoothness | 8 from telemetry.web_perf.metrics import smoothness |
9 | 9 |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 def __init__(self, needs_browser_restart_after_each_page=False): | 33 def __init__(self, needs_browser_restart_after_each_page=False): |
34 super(Smoothness, self).__init__(needs_browser_restart_after_each_page) | 34 super(Smoothness, self).__init__(needs_browser_restart_after_each_page) |
35 self._results_wrapper = _CustomResultsWrapper() | 35 self._results_wrapper = _CustomResultsWrapper() |
36 self._tbm = None | 36 self._tbm = None |
37 | 37 |
38 @classmethod | 38 @classmethod |
39 def CustomizeBrowserOptions(cls, options): | 39 def CustomizeBrowserOptions(cls, options): |
40 options.AppendExtraBrowserArgs('--enable-gpu-benchmarking') | 40 options.AppendExtraBrowserArgs('--enable-gpu-benchmarking') |
41 options.AppendExtraBrowserArgs('--touch-events=enabled') | 41 options.AppendExtraBrowserArgs('--touch-events=enabled') |
42 options.AppendExtraBrowserArgs('--running-performance-benchmark') | |
43 | 42 |
44 def WillNavigateToPage(self, page, tab): | 43 def WillNavigateToPage(self, page, tab): |
45 # FIXME: Remove webkit.console when blink.console lands in chromium and | 44 # FIXME: Remove webkit.console when blink.console lands in chromium and |
46 # the ref builds are updated. crbug.com/386847 | 45 # the ref builds are updated. crbug.com/386847 |
47 custom_categories = [ | 46 custom_categories = [ |
48 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead'] | 47 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead'] |
49 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( | 48 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( |
50 ','.join(custom_categories)) | 49 ','.join(custom_categories)) |
51 | 50 |
52 options = timeline_based_measurement.Options(category_filter) | 51 options = timeline_based_measurement.Options(category_filter) |
(...skipping 21 matching lines...) Expand all Loading... |
74 '--enable-threaded-compositing', | 73 '--enable-threaded-compositing', |
75 '--enable-gpu-benchmarking' | 74 '--enable-gpu-benchmarking' |
76 ]) | 75 ]) |
77 | 76 |
78 | 77 |
79 class SmoothnessWithRestart(Smoothness): | 78 class SmoothnessWithRestart(Smoothness): |
80 | 79 |
81 def __init__(self): | 80 def __init__(self): |
82 super(SmoothnessWithRestart, self).__init__( | 81 super(SmoothnessWithRestart, self).__init__( |
83 needs_browser_restart_after_each_page=True) | 82 needs_browser_restart_after_each_page=True) |
OLD | NEW |