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

Unified Diff: tools/telemetry/telemetry/page/actions/action_runner.py

Issue 180873008: Add support for python pageset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/page/actions/action_runner.py
diff --git a/tools/telemetry/telemetry/page/actions/action_runner.py b/tools/telemetry/telemetry/page/actions/action_runner.py
new file mode 100644
index 0000000000000000000000000000000000000000..36a7e10a5f7d99e7aa871c75a2f8ade7c8b65d18
--- /dev/null
+++ b/tools/telemetry/telemetry/page/actions/action_runner.py
@@ -0,0 +1,19 @@
+# Copyright (c) 2014 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.
+
+class ActionRunner(object):
+ def __init__(self, page, tab, page_test=None):
+ self._page = page
+ self._tab = tab
+ self._page_test = page_test
+
+ def RunAction(self, action):
+ action.WillRunAction(self._page, self._tab)
+ if self._page_test:
+ self._page_test.WillRunAction(self._page, self._tab, action)
+
+ action.RunAction(self._page, self._tab, None)
+
+ if self._page_test:
+ self._page_test.DidRunAction(self._page, self._tab, action)

Powered by Google App Engine
This is Rietveld 408576698