[autotest] facade_resource: Add a delay after login on daisy

For issue crbug.com/588579, add a 30 seconds delay after login
to avoid test accessing multimedia server during the time window that
Chrome might freeze.
Also, increase the timeout from 60s to 90s in remote_facade_factory.

BUG=chromium:591646
TEST=run audio_AudioBasicUSBRecord test on daisy.

Change-Id: I1979741e0cdaeeda7528dda8ee8b60f595b4b4db
Previous-Reviewed-on: https://chromium-review.googlesource.com/329929
(cherry picked from commit e3cdf4c60020b5b276e836c8766571e80c824648)
Reviewed-on: https://chromium-review.googlesource.com/332347
Reviewed-by: Kalin Stoyanov <kalin@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
diff --git a/client/cros/multimedia/facade_resource.py b/client/cros/multimedia/facade_resource.py
index 879abbc..c53dd0e 100644
--- a/client/cros/multimedia/facade_resource.py
+++ b/client/cros/multimedia/facade_resource.py
@@ -5,7 +5,10 @@
 """A module providing common resources for different facades."""
 
 import exceptions
+import logging
+import time
 
+from autotest_lib.client.bin import utils
 from autotest_lib.client.common_lib.cros import chrome
 from autotest_lib.client.common_lib.cros import retry
 from autotest_lib.client.cros import constants
@@ -46,6 +49,14 @@
         # Value is the tab object.
         self._tabs = dict()
 
+        # Workaround for issue crbug.com/588579.
+        # On daisy, Chrome freezes about 30 seconds after login because of
+        # TPM error. Avoid test accessing Chrome during this time.
+        # Check issue crbug.com/588579 and crbug.com/591646.
+        if utils.get_board() == 'daisy':
+            logging.warning('Delay 30s for issue 588579 on daisy')
+            time.sleep(30)
+
 
     def close(self):
         """Closes Chrome."""
diff --git a/server/cros/multimedia/remote_facade_factory.py b/server/cros/multimedia/remote_facade_factory.py
index 73adf0b..dbfa05d 100644
--- a/server/cros/multimedia/remote_facade_factory.py
+++ b/server/cros/multimedia/remote_facade_factory.py
@@ -50,7 +50,7 @@
 
     """
 
-    XMLRPC_CONNECT_TIMEOUT = 60
+    XMLRPC_CONNECT_TIMEOUT = 90
     XMLRPC_RETRY_TIMEOUT = 180
     XMLRPC_RETRY_DELAY = 10