Commit bdf5f2d2 authored by nednguyen@google.com's avatar nednguyen@google.com

Remove CanBeBound & BindMeasurementJavaScript since they are not used anywhere.

BUG=

Review URL: https://codereview.chromium.org/321583006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275650 0039d316-1c4b-4281-b951-d872f2087c98
parent dc6bf0f8
...@@ -41,24 +41,3 @@ class PageAction(object): ...@@ -41,24 +41,3 @@ class PageAction(object):
def CleanUp(self, tab): def CleanUp(self, tab):
pass pass
def CanBeBound(self):
"""If this class implements BindMeasurementJavaScript, override CanBeBound
to return True so that a test knows it can bind measurements."""
return False
def BindMeasurementJavaScript(
self, tab, start_js, stop_js): # pylint: disable=W0613
"""Let this action determine when measurements should start and stop.
A measurement can call this method to provide the action
with JavaScript code that starts and stops measurements. The action
determines when to execute the provided JavaScript code, for more accurate
timings.
Args:
tab: The tab to do everything on.
start_js: JavaScript code that starts measurements.
stop_js: JavaScript code that stops measurements.
"""
raise Exception('This action cannot be bound.')
...@@ -82,13 +82,3 @@ class PinchAction(GestureAction): ...@@ -82,13 +82,3 @@ class PinchAction(GestureAction):
speed)) speed))
tab.WaitForJavaScriptExpression('window.__pinchActionDone', 60) tab.WaitForJavaScriptExpression('window.__pinchActionDone', 60)
def CanBeBound(self):
return True
def BindMeasurementJavaScript(self, tab, start_js, stop_js):
# Make the pinch action start and stop measurement automatically.
tab.ExecuteJavaScript("""
window.__pinchAction.beginMeasuringHook = function() { %s };
window.__pinchAction.endMeasuringHook = function() { %s };
""" % (start_js, stop_js))
...@@ -98,13 +98,3 @@ class ScrollAction(GestureAction): ...@@ -98,13 +98,3 @@ class ScrollAction(GestureAction):
gesture_source_type)) gesture_source_type))
tab.WaitForJavaScriptExpression('window.__scrollActionDone', 60) tab.WaitForJavaScriptExpression('window.__scrollActionDone', 60)
def CanBeBound(self):
return True
def BindMeasurementJavaScript(self, tab, start_js, stop_js):
# Make the scroll action start and stop measurement automatically.
tab.ExecuteJavaScript("""
window.__scrollAction.beginMeasuringHook = function() { %s };
window.__scrollAction.endMeasuringHook = function() { %s };
""" % (start_js, stop_js))
...@@ -109,13 +109,3 @@ class ScrollBounceAction(GestureAction): ...@@ -109,13 +109,3 @@ class ScrollBounceAction(GestureAction):
speed)) speed))
tab.WaitForJavaScriptExpression('window.__scrollBounceActionDone', 60) tab.WaitForJavaScriptExpression('window.__scrollBounceActionDone', 60)
def CanBeBound(self):
return True
def BindMeasurementJavaScript(self, tab, start_js, stop_js):
# Make the scroll bounce action start and stop measurement automatically.
tab.ExecuteJavaScript("""
window.__scrollBounceAction.beginMeasuringHook = function() { %s };
window.__scrollBounceAction.endMeasuringHook = function() { %s };
""" % (start_js, stop_js))
...@@ -86,13 +86,3 @@ class SwipeAction(GestureAction): ...@@ -86,13 +86,3 @@ class SwipeAction(GestureAction):
speed)) speed))
tab.WaitForJavaScriptExpression('window.__swipeActionDone', 60) tab.WaitForJavaScriptExpression('window.__swipeActionDone', 60)
def CanBeBound(self):
return True
def BindMeasurementJavaScript(self, tab, start_js, stop_js):
# Make the swipe action start and stop measurement automatically.
tab.ExecuteJavaScript("""
window.__swipeAction.beginMeasuringHook = function() { %s };
window.__swipeAction.endMeasuringHook = function() { %s };
""" % (start_js, stop_js))
...@@ -102,13 +102,3 @@ class TapAction(GestureAction): ...@@ -102,13 +102,3 @@ class TapAction(GestureAction):
self.TapSelectedElement(tab, js_cmd) self.TapSelectedElement(tab, js_cmd)
tab.WaitForJavaScriptExpression('window.__tapActionDone', 60) tab.WaitForJavaScriptExpression('window.__tapActionDone', 60)
def CanBeBound(self):
return True
def BindMeasurementJavaScript(self, tab, start_js, stop_js):
# Make the tap action start and stop measurement automatically.
tab.ExecuteJavaScript("""
window.__tapAction.beginMeasuringHook = function() { %s };
window.__tapAction.endMeasuringHook = function() { %s };
""" % (start_js, stop_js))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment