autotest: Initialize network backend conditionally.
No functional change in this CL, but we introduce the facility to
not initialize network backend. cheets_MediaPlayerVideoHWDecodeUsed
(in a diff repo), needs to be updated before we can default
init_network_controller to False.
BUG=chromium:681944
TEST=trybots.
Change-Id: Id4a6886fececc1a26478f24d0c9c67b563a00693
Reviewed-on: https://chromium-review.googlesource.com/431133
Commit-Ready: Achuith Bhandarkar <achuith@chromium.org>
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Jacob Dufault <jdufault@chromium.org>
diff --git a/client/common_lib/cros/chrome.py b/client/common_lib/cros/chrome.py
index 053e883..149f00f 100644
--- a/client/common_lib/cros/chrome.py
+++ b/client/common_lib/cros/chrome.py
@@ -79,7 +79,8 @@
disable_gaia_services=True, disable_default_apps = True,
auto_login=True, gaia_login=False,
username=None, password=None, gaia_id=None,
- arc_mode=None, disable_arc_opt_in=True):
+ arc_mode=None, disable_arc_opt_in=True,
+ init_network_controller=True):
"""
Constructor of telemetry wrapper.
@@ -189,7 +190,8 @@
i, repr(e))
if i == num_tries-1:
raise
- self._browser.platform.network_controller.InitializeIfNeeded()
+ if init_network_controller:
+ self._browser.platform.network_controller.InitializeIfNeeded()
def __enter__(self):
return self