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

Side by Side Diff: tools/telemetry/telemetry/compound_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 from telemetry import page_action 4 from telemetry import page_action
5 5
6 class CompoundAction(page_action.PageAction): 6 class CompoundAction(page_action.PageAction):
7 def __init__(self, attributes=None): 7 def __init__(self, attributes=None):
8 super(CompoundAction, self).__init__(attributes) 8 super(CompoundAction, self).__init__(attributes)
9 self._actions = [] 9 self._actions = []
10 from telemetry import all_page_actions 10 from telemetry import all_page_actions
(...skipping 15 matching lines...) Expand all
26 next_action = self._actions[i + 1] if i < len(self._actions) - 1 else None 26 next_action = self._actions[i + 1] if i < len(self._actions) - 1 else None
27 27
28 if (action.RunsPreviousAction() and 28 if (action.RunsPreviousAction() and
29 next_action and next_action.RunsPreviousAction()): 29 next_action and next_action.RunsPreviousAction()):
30 raise page_action.PageActionFailed('Consecutive actions cannot both ' 30 raise page_action.PageActionFailed('Consecutive actions cannot both '
31 'have RunsPreviousAction() == True.') 31 'have RunsPreviousAction() == True.')
32 32
33 if not (next_action and next_action.RunsPreviousAction()): 33 if not (next_action and next_action.RunsPreviousAction()):
34 action.WillRunAction(page, tab) 34 action.WillRunAction(page, tab)
35 action.RunAction(page, tab, prev_action) 35 action.RunAction(page, tab, prev_action)
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/click_element_action_unittest.py ('k') | tools/telemetry/telemetry/compound_action_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698