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

Side by Side Diff: tools/telemetry/telemetry/page/actions/scroll.py

Issue 319813004: [Telemetry] Update copyright header style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 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.page.actions.gesture_action import GestureAction 6 from telemetry.page.actions.gesture_action import GestureAction
7 from telemetry.page.actions import page_action 7 from telemetry.page.actions import page_action
8 8
9 class ScrollAction(GestureAction): 9 class ScrollAction(GestureAction):
10 def __init__(self, attributes=None): 10 def __init__(self, attributes=None):
11 super(ScrollAction, self).__init__(attributes) 11 super(ScrollAction, self).__init__(attributes)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 def CanBeBound(self): 102 def CanBeBound(self):
103 return True 103 return True
104 104
105 def BindMeasurementJavaScript(self, tab, start_js, stop_js): 105 def BindMeasurementJavaScript(self, tab, start_js, stop_js):
106 # Make the scroll action start and stop measurement automatically. 106 # Make the scroll action start and stop measurement automatically.
107 tab.ExecuteJavaScript(""" 107 tab.ExecuteJavaScript("""
108 window.__scrollAction.beginMeasuringHook = function() { %s }; 108 window.__scrollAction.beginMeasuringHook = function() { %s };
109 window.__scrollAction.endMeasuringHook = function() { %s }; 109 window.__scrollAction.endMeasuringHook = function() { %s };
110 """ % (start_js, stop_js)) 110 """ % (start_js, stop_js))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698