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

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

Issue 321583006: Remove CanBeBound & BindMeasurementJavaScript since they are not used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/actions/pinch.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 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 from telemetry.page.actions import wait_until 4 from telemetry.page.actions import wait_until
5 5
6 class PageActionNotSupported(Exception): 6 class PageActionNotSupported(Exception):
7 pass 7 pass
8 8
9 class PageActionFailed(Exception): 9 class PageActionFailed(Exception):
10 pass 10 pass
(...skipping 23 matching lines...) Expand all
34 if self.wait_until: 34 if self.wait_until:
35 self.wait_until.RunActionAndWait(tab) 35 self.wait_until.RunActionAndWait(tab)
36 else: 36 else:
37 self.RunAction(tab) 37 self.RunAction(tab)
38 38
39 def RunAction(self, tab): 39 def RunAction(self, tab):
40 raise NotImplementedError() 40 raise NotImplementedError()
41 41
42 def CleanUp(self, tab): 42 def CleanUp(self, tab):
43 pass 43 pass
44
45 def CanBeBound(self):
46 """If this class implements BindMeasurementJavaScript, override CanBeBound
47 to return True so that a test knows it can bind measurements."""
48 return False
49
50 def BindMeasurementJavaScript(
51 self, tab, start_js, stop_js): # pylint: disable=W0613
52 """Let this action determine when measurements should start and stop.
53
54 A measurement can call this method to provide the action
55 with JavaScript code that starts and stops measurements. The action
56 determines when to execute the provided JavaScript code, for more accurate
57 timings.
58
59 Args:
60 tab: The tab to do everything on.
61 start_js: JavaScript code that starts measurements.
62 stop_js: JavaScript code that stops measurements.
63 """
64 raise Exception('This action cannot be bound.')
OLDNEW
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/actions/pinch.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698