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

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

Issue 21174002: Allow defining custom navigation on a per-page basis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed changes. Updating tab_switching measurement Created 7 years, 4 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
« no previous file with comments | « tools/perf/measurements/tab_switching.py ('k') | tools/telemetry/telemetry/page/actions/navigate.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/actions/javascript.py
diff --git a/tools/telemetry/telemetry/page/actions/js_collect_garbage.py b/tools/telemetry/telemetry/page/actions/javascript.py
similarity index 62%
copy from tools/telemetry/telemetry/page/actions/js_collect_garbage.py
copy to tools/telemetry/telemetry/page/actions/javascript.py
index 3ba9f53b30764a42b5c42777c537ccea1eb3af3b..a192e9e5695ced7bfe136853da1c52b82facc59f 100644
--- a/tools/telemetry/telemetry/page/actions/js_collect_garbage.py
+++ b/tools/telemetry/telemetry/page/actions/javascript.py
@@ -1,11 +1,14 @@
# Copyright (c) 2013 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.page.actions import page_action
-class JsCollectGarbageAction(page_action.PageAction):
+
+class JavascriptAction(page_action.PageAction):
def __init__(self, attributes=None):
- super(JsCollectGarbageAction, self).__init__(attributes)
+ super(JavascriptAction, self).__init__(attributes)
def RunAction(self, page, tab, previous_action):
- tab.CollectGarbage()
+ assert hasattr(self, 'expression')
+ tab.ExecuteJavaScript(self.expression)
« no previous file with comments | « tools/perf/measurements/tab_switching.py ('k') | tools/telemetry/telemetry/page/actions/navigate.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698