OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 | 4 |
5 import logging | 5 import logging |
6 import pprint | 6 import pprint |
7 import shlex | 7 import shlex |
8 import sys | 8 import sys |
9 | 9 |
10 from telemetry.core import exceptions | 10 from telemetry.core import exceptions |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 return args | 121 return args |
122 | 122 |
123 def GetReplayBrowserStartupArgs(self): | 123 def GetReplayBrowserStartupArgs(self): |
124 replay_args = [] | 124 replay_args = [] |
125 network_backend = self.platform_backend.network_controller_backend | 125 network_backend = self.platform_backend.network_controller_backend |
126 if not network_backend.is_initialized: | 126 if not network_backend.is_initialized: |
127 return [] | 127 return [] |
128 proxy_port = network_backend.forwarder.port_pair.remote_port | 128 proxy_port = network_backend.forwarder.port_pair.remote_port |
129 replay_args.append('--proxy-server=socks://localhost:%s' % proxy_port) | 129 replay_args.append('--proxy-server=socks://localhost:%s' % proxy_port) |
| 130 |
130 if not network_backend.is_test_ca_installed: | 131 if not network_backend.is_test_ca_installed: |
131 # Ignore certificate errors if the platform backend has not created | 132 # Ignore certificate errors if the platform backend has not created |
132 # and installed a root certificate. | 133 # and installed a root certificate. |
133 replay_args.append('--ignore-certificate-errors') | 134 replay_args.append('--ignore-certificate-errors') |
| 135 else: |
| 136 # For now, also use '--ignore-certificate-errors' even if test ca is |
| 137 # installed. |
| 138 # TODO(nedn, xunjieli): remove this flag if test ca is installed |
| 139 # (crbug.com/716084) |
| 140 replay_args.append('--ignore-certificate-errors') |
| 141 |
134 return replay_args | 142 return replay_args |
135 | 143 |
136 def HasBrowserFinishedLaunching(self): | 144 def HasBrowserFinishedLaunching(self): |
137 assert self._port, 'No DevTools port info available.' | 145 assert self._port, 'No DevTools port info available.' |
138 return devtools_client_backend.IsDevToolsAgentAvailable( | 146 return devtools_client_backend.IsDevToolsAgentAvailable( |
139 self._port, | 147 self._port, |
140 self._browser_target, self) | 148 self._browser_target, self) |
141 | 149 |
142 def _WaitForBrowserToComeUp(self, remote_devtools_port=None): | 150 def _WaitForBrowserToComeUp(self, remote_devtools_port=None): |
143 """ Wait for browser to come up. | 151 """ Wait for browser to come up. |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 def supports_cpu_metrics(self): | 312 def supports_cpu_metrics(self): |
305 return True | 313 return True |
306 | 314 |
307 @property | 315 @property |
308 def supports_memory_metrics(self): | 316 def supports_memory_metrics(self): |
309 return True | 317 return True |
310 | 318 |
311 @property | 319 @property |
312 def supports_power_metrics(self): | 320 def supports_power_metrics(self): |
313 return True | 321 return True |
OLD | NEW |