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

Side by Side Diff: telemetry/telemetry/internal/backends/chrome/chrome_browser_backend.py

Issue 3002933003: Enable installing test CA on Android & add test for it (Closed)
Patch Set: Specify key & cert files Created 3 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
« no previous file with comments | « no previous file | telemetry/telemetry/internal/platform/android_platform_backend.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | telemetry/telemetry/internal/platform/android_platform_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698