Chromium Code Reviews| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 if not network_backend.is_test_ca_installed: | 130 if not network_backend.is_test_ca_installed: |
| 131 # Ignore certificate errors if the platform backend has not created | 131 # Ignore certificate errors for certs that are signed with Wpr's root. |
| 132 # and installed a root certificate. | 132 # openssl x509 -noout -pubkey -in wpr_cert.pem | |
| 133 replay_args.append('--ignore-certificate-errors') | 133 # openssl pkey -pubin -outform der | |
| 134 # openssl dgst -sha256 -binary | | |
| 135 # base64 | |
|
nednguyen
2017/08/22 15:40:50
I think this string probably should be managed by
xunjieli
2017/08/22 21:05:43
Done.
| |
| 136 replay_args.append('--ignore-certificate-errors-spki-list=' | |
|
nednguyen
2017/08/22 15:40:50
nits: also link the discussion in crbug.com/757508
| |
| 137 'PhrPvGIaAMmd29hj8BCZOq096yj7uMpRNHpn5PDxI6I=') | |
| 134 return replay_args | 138 return replay_args |
| 135 | 139 |
| 136 def HasBrowserFinishedLaunching(self): | 140 def HasBrowserFinishedLaunching(self): |
| 137 assert self._port, 'No DevTools port info available.' | 141 assert self._port, 'No DevTools port info available.' |
| 138 return devtools_client_backend.IsDevToolsAgentAvailable( | 142 return devtools_client_backend.IsDevToolsAgentAvailable( |
| 139 self._port, | 143 self._port, |
| 140 self._browser_target, self) | 144 self._browser_target, self) |
| 141 | 145 |
| 142 def _WaitForBrowserToComeUp(self, remote_devtools_port=None): | 146 def _WaitForBrowserToComeUp(self, remote_devtools_port=None): |
| 143 """ Wait for browser to come up. | 147 """ 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): | 308 def supports_cpu_metrics(self): |
| 305 return True | 309 return True |
| 306 | 310 |
| 307 @property | 311 @property |
| 308 def supports_memory_metrics(self): | 312 def supports_memory_metrics(self): |
| 309 return True | 313 return True |
| 310 | 314 |
| 311 @property | 315 @property |
| 312 def supports_power_metrics(self): | 316 def supports_power_metrics(self): |
| 313 return True | 317 return True |
| OLD | NEW |