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

Side by Side Diff: tools/telemetry/telemetry/scrolling_action.py

Issue 12294002: Revert 182991 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 telemetry import page_action 6 from telemetry import page_action
7 from telemetry import util 7 from telemetry import util
8 8
9 class ScrollingAction(page_action.PageAction): 9 class ScrollingAction(page_action.PageAction):
10 def __init__(self, attributes=None): 10 def __init__(self, attributes=None):
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 def CanBeBound(self): 47 def CanBeBound(self):
48 return True 48 return True
49 49
50 def BindMeasurementJavaScript(self, tab, start_js, stop_js): 50 def BindMeasurementJavaScript(self, tab, start_js, stop_js):
51 # Make the scrolling action start and stop measurement automatically. 51 # Make the scrolling action start and stop measurement automatically.
52 tab.ExecuteJavaScript(""" 52 tab.ExecuteJavaScript("""
53 window.__scrollingAction.beginMeasuringHook = function() { %s }; 53 window.__scrollingAction.beginMeasuringHook = function() { %s };
54 window.__scrollingAction.endMeasuringHook = function() { %s }; 54 window.__scrollingAction.endMeasuringHook = function() { %s };
55 """ % (start_js, stop_js)) 55 """ % (start_js, stop_js))
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/scrolling_action.js ('k') | tools/telemetry/telemetry/scrolling_action_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698