Add devtools_http.DevToolsClientConnectionError to did_browser_crash.
Use did_browser_crash everywhere since telemetry exceptions seem to be growing.
BUG=chromium:450278
TEST=manual
Change-Id: I5b18a9c30880a2a1b89333af88d181beeb1596a5
Reviewed-on: https://chromium-review.googlesource.com/243398
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>
diff --git a/client/common_lib/cros/enrollment.py b/client/common_lib/cros/enrollment.py
index dbdad22..fda488f 100644
--- a/client/common_lib/cros/enrollment.py
+++ b/client/common_lib/cros/enrollment.py
@@ -5,8 +5,7 @@
import logging
from autotest_lib.client.bin import utils
-from autotest_lib.client.common_lib.cros import tpm_utils
-from telemetry.core import exceptions
+from autotest_lib.client.common_lib.cros import chrome, tpm_utils
from telemetry.core.platform import cros_interface
@@ -24,12 +23,10 @@
"""
_cri = cros_interface.CrOSInterface()
pid = _cri.GetChromePid()
- try:
- # This will restart the browser.
- _ExecuteOobeCmd(browser, 'Oobe.remoraRequisitionForTesting();')
- except (exceptions.BrowserConnectionGoneException,
- exceptions.DevtoolsTargetCrashException):
- pass
+ # This will restart the browser.
+ chrome.Chrome.did_browser_crash(
+ lambda: _ExecuteOobeCmd(browser,
+ 'Oobe.remoraRequisitionForTesting();'))
utils.poll_for_condition(lambda: pid != _cri.GetChromePid(), timeout=60)
utils.poll_for_condition(lambda: browser.oobe_exists, timeout=30)