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

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

Issue 2250583004: [telemetry] Wire TsProxy through telemetry's network stack. (Closed) Base URL: https://github.com/catapult-project/catapult@master
Patch Set: CrOS fix? Created 4 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 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 os 6 import os
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 import decorators 10 from telemetry import decorators
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 'org.chromium.SessionManagerInterface.EnableChromeTesting', 113 'org.chromium.SessionManagerInterface.EnableChromeTesting',
114 'boolean:true', 114 'boolean:true',
115 'array:string:"%s"' % ','.join(startup_args)] 115 'array:string:"%s"' % ','.join(startup_args)]
116 logging.info('Starting Chrome %s', args) 116 logging.info('Starting Chrome %s', args)
117 self._cri.RunCmdOnDevice(args) 117 self._cri.RunCmdOnDevice(args)
118 118
119 if not self._cri.local: 119 if not self._cri.local:
120 # TODO(crbug.com/404771): Move port forwarding to network_controller. 120 # TODO(crbug.com/404771): Move port forwarding to network_controller.
121 self._port = util.GetUnreservedAvailableLocalPort() 121 self._port = util.GetUnreservedAvailableLocalPort()
122 self._forwarder = self._platform_backend.forwarder_factory.Create( 122 self._forwarder = self._platform_backend.forwarder_factory.Create(
123 forwarders.PortPairs( 123 forwarders.PortPair(self._port, self._remote_debugging_port),
124 http=forwarders.PortPair(self._port, self._remote_debugging_port), 124 use_remote_port_forwarding=False)
125 https=None,
126 dns=None), use_remote_port_forwarding=False)
127 125
128 # Wait for oobe. 126 # Wait for oobe.
129 self._WaitForBrowserToComeUp() 127 self._WaitForBrowserToComeUp()
130 self._InitDevtoolsClientBackend( 128 self._InitDevtoolsClientBackend(
131 remote_devtools_port=self._remote_debugging_port) 129 remote_devtools_port=self._remote_debugging_port)
132 util.WaitFor(lambda: self.oobe_exists, 30) 130 util.WaitFor(lambda: self.oobe_exists, 30)
133 131
134 if self.browser_options.auto_login: 132 if self.browser_options.auto_login:
135 try: 133 try:
136 if self._is_guest: 134 if self._is_guest:
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 # Wait for cryptohome to mount. 241 # Wait for cryptohome to mount.
244 util.WaitFor(self._IsLoggedIn, 60) 242 util.WaitFor(self._IsLoggedIn, 60)
245 243
246 # For incognito mode, the session manager actually relaunches chrome with 244 # For incognito mode, the session manager actually relaunches chrome with
247 # new arguments, so we have to wait for the browser to come up. 245 # new arguments, so we have to wait for the browser to come up.
248 self._WaitForBrowserToComeUp() 246 self._WaitForBrowserToComeUp()
249 247
250 # Wait for extensions to load. 248 # Wait for extensions to load.
251 if self._supports_extensions: 249 if self._supports_extensions:
252 self._WaitForExtensionsToLoad() 250 self._WaitForExtensionsToLoad()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698