arc: Fix arc tests by setting arc.enabled.
There is expected that arc.enabled is set while Arc is running.
There are several DCHECKs for this case which are not available
for integration tests. This is first part of fix. There is an
additional fix in ArcAuthService that starts Arc for tests
triggered by arc.enabled.
BUG=brillo:32660818
TEST=test_that $IP cheets_CTS.6.0_r12.arm.android.text.
test_that $IP cheets_ContainerSmokeTest
test_that $IP suite:bvt-inline
This test passes in 2 modes. First is without any additional
CLs. Second with following CLs on board:
http://crrev.com/2486393003
http://crrev.com/2468973006
Change-Id: I1958512fb98314a7bf663d9fc4e7ec36e10da302
Reviewed-on: https://chromium-review.googlesource.com/410056
Commit-Ready: Yury Khmel <khmel@chromium.org>
Tested-by: Yury Khmel <khmel@chromium.org>
Reviewed-by: Luis Hector Chavez <lhchavez@google.com>
diff --git a/client/common_lib/cros/chrome.py b/client/common_lib/cros/chrome.py
index 221e80c..d8d48e4 100644
--- a/client/common_lib/cros/chrome.py
+++ b/client/common_lib/cros/chrome.py
@@ -179,7 +179,10 @@
browser_to_create = browser_finder.FindBrowser(finder_options)
self._browser = browser_to_create.Create(finder_options)
if is_arc_available():
- if not disable_arc_opt_in:
+ if disable_arc_opt_in:
+ if arc_util.should_start_arc(arc_mode):
+ arc_util.enable_arc_setting(self.browser)
+ else:
arc_util.opt_in(self.browser)
arc_util.post_processing_after_browser(self)
break