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

Unified Diff: tools/telemetry/telemetry/core/chrome/cros_browser_backend.py

Issue 15313004: Escape commas in Chrome startup arguments for telemetry tests on CrOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/chrome/cros_browser_backend.py
===================================================================
--- tools/telemetry/telemetry/core/chrome/cros_browser_backend.py (revision 200860)
+++ tools/telemetry/telemetry/core/chrome/cros_browser_backend.py (working copy)
@@ -62,6 +62,10 @@
cri.PushFile(options.profile_dir + '/Default', profile_dir)
cri.GetCmdOutput(['chown', '-R', 'chronos:chronos', profile_dir])
+ # Escape all commas in the startup arguments we pass to Chrome
+ # because dbus-send delimits array elements by commas
+ startup_args = [a.replace(',', '\\,') for a in self.GetBrowserStartupArgs()]
+
# Restart Chrome with the login extension and remote debugging.
logging.info('Restarting Chrome with flags and login')
args = ['dbus-send', '--system', '--type=method_call',
@@ -69,7 +73,7 @@
'/org/chromium/SessionManager',
'org.chromium.SessionManagerInterface.EnableChromeTesting',
'boolean:true',
- 'array:string:"%s"' % ','.join(self.GetBrowserStartupArgs())]
+ 'array:string:"%s"' % ','.join(startup_args)]
cri.RunCmdOnDevice(args)
if not cri.local:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698