Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(769)

Unified Diff: tools/telemetry/telemetry/page/scrolling_action.py

Issue 12499006: Telemetry on android: improves RawDisplayFrameRateMeasurement. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/page/page_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « tools/telemetry/telemetry/page/page_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698