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

Side by Side Diff: tools/telemetry/telemetry/core/chrome/cros_browser_backend.py

Issue 20672002: [telemetry] Add a webdriver backend with support for IE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. 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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 import logging 4 import logging
5 import os 5 import os
6 import subprocess 6 import subprocess
7 7
8 from telemetry.core import exceptions 8 from telemetry.core import exceptions
9 from telemetry.core import util 9 from telemetry.core import util
10 from telemetry.core.chrome import browser_backend 10 from telemetry.core.chrome import browser_backend
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 return bool(self.pid) 221 return bool(self.pid)
222 222
223 def GetStandardOutput(self): 223 def GetStandardOutput(self):
224 return 'Cannot get standard output on CrOS' 224 return 'Cannot get standard output on CrOS'
225 225
226 def GetStackTrace(self): 226 def GetStackTrace(self):
227 return 'Cannot get stack trace on CrOS' 227 return 'Cannot get stack trace on CrOS'
228 228
229 def CreateForwarder(self, *port_pairs): 229 def CreateForwarder(self, *port_pairs):
230 assert self._cri 230 assert self._cri
231 return (browser_backend.DoNothingForwarder(*port_pairs) if self._cri.local 231 return (util.DoNothingForwarder(*port_pairs) if self._cri.local
232 else SSHForwarder(self._cri, 'R', *port_pairs)) 232 else SSHForwarder(self._cri, 'R', *port_pairs))
233 233
234 def _RestartUI(self): 234 def _RestartUI(self):
235 if self._cri: 235 if self._cri:
236 logging.info('(Re)starting the ui (logs the user out)') 236 logging.info('(Re)starting the ui (logs the user out)')
237 if self._cri.IsServiceRunning('ui'): 237 if self._cri.IsServiceRunning('ui'):
238 self._cri.RunCmdOnDevice(['restart', 'ui']) 238 self._cri.RunCmdOnDevice(['restart', 'ui'])
239 else: 239 else:
240 self._cri.RunCmdOnDevice(['start', 'ui']) 240 self._cri.RunCmdOnDevice(['start', 'ui'])
241 241
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 @property 374 @property
375 def url(self): 375 def url(self):
376 assert self._proc 376 assert self._proc
377 return 'http://localhost:%i' % self._host_port 377 return 'http://localhost:%i' % self._host_port
378 378
379 def Close(self): 379 def Close(self):
380 if self._proc: 380 if self._proc:
381 self._proc.kill() 381 self._proc.kill()
382 self._proc = None 382 self._proc = None
383 383
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698