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

Unified Diff: tools/telemetry/telemetry/compound_action.py

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/compound_action.py
diff --git a/tools/telemetry/telemetry/compound_action.py b/tools/telemetry/telemetry/compound_action.py
deleted file mode 100644
index 2e71cb83b0e9ddf75b800f41ab2504f8b3dd4594..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/compound_action.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-from telemetry import page_action
-
-class CompoundAction(page_action.PageAction):
- def __init__(self, attributes=None):
- super(CompoundAction, self).__init__(attributes)
- self._actions = []
- from telemetry import all_page_actions
- for action_data in self.actions:
- action = all_page_actions.FindClassWithName(
- action_data['action'])(action_data)
- self._actions.append(action)
-
- def CustomizeBrowserOptions(self, options):
- for action in self._actions:
- action.CustomizeBrowserOptions(options)
-
- def RunsPreviousAction(self):
- return self._actions and self._actions[0].RunsPreviousAction()
-
- def RunAction(self, page, tab, previous_action):
- for i, action in enumerate(self._actions):
- prev_action = self._actions[i - 1] if i > 0 else previous_action
- next_action = self._actions[i + 1] if i < len(self._actions) - 1 else None
-
- if (action.RunsPreviousAction() and
- next_action and next_action.RunsPreviousAction()):
- raise page_action.PageActionFailed('Consecutive actions cannot both '
- 'have RunsPreviousAction() == True.')
-
- if not (next_action and next_action.RunsPreviousAction()):
- action.WillRunAction(page, tab)
- action.RunAction(page, tab, prev_action)
« 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