Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 os as os | 4 import os as os |
| 5 import subprocess as subprocess | 5 import subprocess as subprocess |
| 6 import shutil | 6 import shutil |
| 7 import tempfile | 7 import tempfile |
| 8 | 8 |
| 9 from telemetry import browser_backend | 9 from telemetry import browser_backend |
| 10 from telemetry import util | 10 from telemetry import util |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 self._PostBrowserStartupInitialization() | 42 self._PostBrowserStartupInitialization() |
| 43 except: | 43 except: |
| 44 self.Close() | 44 self.Close() |
| 45 raise | 45 raise |
| 46 | 46 |
| 47 def GetBrowserStartupArgs(self): | 47 def GetBrowserStartupArgs(self): |
| 48 args = super(DesktopBrowserBackend, self).GetBrowserStartupArgs() | 48 args = super(DesktopBrowserBackend, self).GetBrowserStartupArgs() |
| 49 args.append('--remote-debugging-port=%i' % self._port) | 49 args.append('--remote-debugging-port=%i' % self._port) |
| 50 args.append('--window-size=1280,1024') | 50 args.append('--window-size=1280,1024') |
| 51 args.append('--enable-benchmarking') | 51 args.append('--enable-benchmarking') |
| 52 if self.browser_type == 'debug': | |
|
nduca
2013/01/03 21:19:09
chrome_content_browser_client.cc(992).
Please kee
Danh Nguyen
2013/01/04 20:44:04
Yes I'll put this fix in a different CL.
| |
| 53 args.append('--enable-stats-table') | |
| 54 | |
| 52 if not self.options.dont_override_profile: | 55 if not self.options.dont_override_profile: |
| 53 self._tmpdir = tempfile.mkdtemp() | 56 self._tmpdir = tempfile.mkdtemp() |
| 54 args.append('--user-data-dir=%s' % self._tmpdir) | 57 args.append('--user-data-dir=%s' % self._tmpdir) |
| 55 return args | 58 return args |
| 56 | 59 |
| 57 def IsBrowserRunning(self): | 60 def IsBrowserRunning(self): |
| 58 return self._proc.poll() == None | 61 return self._proc.poll() == None |
| 59 | 62 |
| 60 def GetStandardOutput(self): | 63 def GetStandardOutput(self): |
| 61 assert self._tmp_output_file, "Can't get standard output with show_stdout" | 64 assert self._tmp_output_file, "Can't get standard output with show_stdout" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 def __init__(self, *port_pairs): | 113 def __init__(self, *port_pairs): |
| 111 self._host_port = port_pairs[0][0] | 114 self._host_port = port_pairs[0][0] |
| 112 | 115 |
| 113 @property | 116 @property |
| 114 def url(self): | 117 def url(self): |
| 115 assert self._host_port | 118 assert self._host_port |
| 116 return 'http://localhost:%i' % self._host_port | 119 return 'http://localhost:%i' % self._host_port |
| 117 | 120 |
| 118 def Close(self): | 121 def Close(self): |
| 119 self._host_port = None | 122 self._host_port = None |
| OLD | NEW |