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

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

Issue 328663007: Delete JavaScriptAction, preferring to implement the 1-line logic in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
index 579e7335a5f77f36db5d892aa6967bd6d5684dc1..66a02bbc6c17fc5b32b449d441137bdb6f8a7ce6 100644
--- a/tools/telemetry/telemetry/page/actions/action_runner.py
+++ b/tools/telemetry/telemetry/page/actions/action_runner.py
@@ -3,7 +3,6 @@
# found in the LICENSE file.
from telemetry.page.actions import page_action
-from telemetry.page.actions.javascript import JavaScriptAction
from telemetry.page.actions.navigate import NavigateAction
from telemetry.page.actions.wait import WaitAction
from telemetry.web_perf import timeline_interaction_record as tir_module
@@ -68,15 +67,15 @@ class ActionRunner(object):
self._tab.WaitForNavigate(timeout_seconds)
self._tab.WaitForDocumentReadyStateToBeInteractiveOrBetter()
- def ExecuteJavaScript(self, js_expression):
- """Executes a given JavaScript expression.
+ def ExecuteJavaScript(self, statement):
+ """Executes a given JavaScript statement.
Example: runner.ExecuteJavaScript('var foo = 1;');
Args:
- js_expression: The expression to execute (provided as string).
+ statement: The statement to execute (provided as string).
"""
- self.RunAction(JavaScriptAction({'expression': js_expression}))
+ self._tab.ExecuteJavaScript(statement)
def Wait(self, seconds):
"""Wait for the number of seconds specified.
« no previous file with comments | « tools/telemetry/telemetry/core/web_contents.py ('k') | tools/telemetry/telemetry/page/actions/javascript.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698