Index: tools/telemetry/telemetry/page/scrolling_action.py |
diff --git a/tools/telemetry/telemetry/page/scrolling_action.py b/tools/telemetry/telemetry/page/scrolling_action.py |
index ef4d7178bcbf0ad88e88d91e1d132aa2494cf178..0a8585101cc28823d90ebad1d39c5011f3e51758 100644 |
--- a/tools/telemetry/telemetry/page/scrolling_action.py |
+++ b/tools/telemetry/telemetry/page/scrolling_action.py |
@@ -25,29 +25,23 @@ class ScrollingAction(page_action.PageAction): |
""") |
def RunActionOnce(self, page, tab, previous_action): |
- try: |
- if tab.browser.platform.IsRawDisplayFrameRateSupported(): |
- tab.browser.platform.StartRawDisplayFrameRateMeasurement('') |
- # scrollable_element_function is a function that passes the scrollable |
- # element on the page to a callback. For example: |
- # function (callback) { |
- # callback(document.getElementById('foo')); |
- # } |
- if hasattr(self, 'scrollable_element_function'): |
- tab.ExecuteJavaScript(""" |
- (%s)(function(element) { |
- window.__scrollingAction.start(element); |
- });""" % (self.scrollable_element_function)) |
- else: |
- tab.ExecuteJavaScript( |
- 'window.__scrollingAction.start(document.body);') |
- |
- # Poll for scroll benchmark completion. |
- util.WaitFor(lambda: tab.EvaluateJavaScript( |
- 'window.__scrollingActionDone'), 60) |
- finally: |
- if tab.browser.platform.IsRawDisplayFrameRateSupported(): |
- tab.browser.platform.StopRawDisplayFrameRateMeasurement() |
+ # scrollable_element_function is a function that passes the scrollable |
+ # element on the page to a callback. For example: |
+ # function (callback) { |
+ # callback(document.getElementById('foo')); |
+ # } |
+ if hasattr(self, 'scrollable_element_function'): |
+ tab.ExecuteJavaScript(""" |
+ (%s)(function(element) { |
+ window.__scrollingAction.start(element); |
+ });""" % (self.scrollable_element_function)) |
+ else: |
+ tab.ExecuteJavaScript( |
+ 'window.__scrollingAction.start(document.body);') |
+ |
+ # Poll for scroll benchmark completion. |
+ util.WaitFor(lambda: tab.EvaluateJavaScript( |
+ 'window.__scrollingActionDone'), 60) |
def CanBeBound(self): |
return True |