Do not clear enterprise policy for login_OwnershipNotRetaken.
BUG=chromium:367005,chromium:358728
TEST=manual
Change-Id: I218ed450135628d9654f211ee2beda20d12236eb
Reviewed-on: https://chromium-review.googlesource.com/197054
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>
diff --git a/client/common_lib/cros/chrome.py b/client/common_lib/cros/chrome.py
index be7efe2..0cf4e81 100644
--- a/client/common_lib/cros/chrome.py
+++ b/client/common_lib/cros/chrome.py
@@ -18,8 +18,8 @@
def __init__(self, logged_in=True, extension_paths=[], autotest_ext=False,
is_component=True, num_tries=3, extra_browser_args=None,
- auto_login=True, gaia_login=False,
- username=None, password=None):
+ clear_enterprise_policy=True, auto_login=True,
+ gaia_login=False, username=None, password=None):
"""
Constructor of telemetry wrapper.
@@ -32,6 +32,8 @@
@param num_tries: Number of attempts to log in.
@param extra_browser_args: Additional argument(s) to pass to the
browser. It can be a string or a list.
+ @param clear_enterprise_policy: Clear enterprise policy before
+ logging in.
@param auto_login: Does not login automatically if this is False.
Useful if you need to examine oobe.
@param gaia_login: Logs in to real gaia.
@@ -67,6 +69,7 @@
b_options = finder_options.browser_options
b_options.disable_component_extensions_with_background_pages = False
b_options.create_browser_with_oobe = True
+ b_options.clear_enterprise_policy = clear_enterprise_policy
b_options.auto_login = auto_login
b_options.gaia_login = gaia_login