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

Unified Diff: tools/android/loading/devtools_monitor.py

Issue 2672803002: [Telemetry refactor] Migrate clients to new JavaScript API (batch 3) (Closed)
Patch Set: Created 3 years, 11 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/android/loading/device_setup.py ('k') | tools/chrome_proxy/common/chrome_proxy_measurements.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/devtools_monitor.py
diff --git a/tools/android/loading/devtools_monitor.py b/tools/android/loading/devtools_monitor.py
index b64e468d5c210c447c8cd7178214f27413e93382..1216b2c2c1fc3b3d006a43abc45033176ebbd6ca 100644
--- a/tools/android/loading/devtools_monitor.py
+++ b/tools/android/loading/devtools_monitor.py
@@ -20,6 +20,7 @@ sys.path.append(chromium_config.GetTelemetryDir())
from telemetry.internal.backends.chrome_inspector import inspector_websocket
from telemetry.internal.backends.chrome_inspector import websocket
+from telemetry.util import js_template
pasko 2017/02/06 21:50:51 we try to avoid depending on libraries exported fr
import common_util
@@ -279,7 +280,7 @@ class DevToolsConnection(object):
current_time + datetime.timedelta(
seconds=stop_delay_duration_seconds))
- def ExecuteJavaScript(self, expression):
+ def ExecuteJavaScript2(self, expression, **kwargs):
"""Run JavaScript expression.
Args:
@@ -288,6 +289,7 @@ class DevToolsConnection(object):
Returns:
The return value from the JavaScript expression.
"""
+ expression = js_template.Render(expression, **kwargs)
pasko 2017/02/02 20:15:49 the discussion in the bug is a leaning towards len
perezju 2017/02/03 09:31:45 You are right. Strictly speaking the changes in to
pasko 2017/02/06 21:50:51 Ah, I see. Actually we do not want to increase our
perezju 2017/02/07 10:02:21 To keep things simple I'll just discard the change
pasko 2017/02/07 18:57:29 Sounds good. Please add a comment with this link t
perezju 2017/02/08 09:58:34 Done.
response = self.SyncRequest('Runtime.evaluate', {
'expression': expression,
'returnByValue': True})
« no previous file with comments | « tools/android/loading/device_setup.py ('k') | tools/chrome_proxy/common/chrome_proxy_measurements.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698