@@ -125,11 +125,16 @@ class UnityTestCase(AutopilotTestCase):
126 # Hide Unity launcher
126 # Hide Unity launcher
127 self._unityshell_schema = Gio.Settings.new_with_path(
127 self._unityshell_schema = Gio.Settings.new_with_path(
128− UNITYSHELL_GSETTINGS_SCHEMA, UNITYSHELL_GSETTINGS_PATH)
128+ UNITYSHELL_GSETTINGS_SCHEMA,
129+ UNITYSHELL_GSETTINGS_PATH,
129 self._launcher_hide_mode = self._unityshell_schema.get_int(
131 self._launcher_hide_mode = self._unityshell_schema.get_int(
130− UNITYSHELL_LAUNCHER_KEY)
132+ UNITYSHELL_LAUNCHER_KEY,
131 self._unityshell_schema.set_int(
134 self._unityshell_schema.set_int(
135+ UNITYSHELL_LAUNCHER_KEY,
132− UNITYSHELL_LAUNCHER_KEY, UNITYSHELL_LAUNCHER_MODE)
136+ UNITYSHELL_LAUNCHER_MODE,
133 self.addCleanup(self._reset_launcher)
138 self.addCleanup(self._reset_launcher)
135 self._proxy = None
140 self._proxy = None
@@ -151,7 +156,9 @@ class UnityTestCase(AutopilotTestCase):
151 def _reset_launcher(self):
156 def _reset_launcher(self):
152 """Reset Unity launcher hide mode"""
157 """Reset Unity launcher hide mode"""
153 self._unityshell_schema.set_int(
158 self._unityshell_schema.set_int(
154− UNITYSHELL_LAUNCHER_KEY, self._launcher_hide_mode)
159+ UNITYSHELL_LAUNCHER_KEY,
160+ self._launcher_hide_mode,
156 def _setup_display_details(self):
163 def _setup_display_details(self):
157 scale_divisor = self._determine_geometry()
164 scale_divisor = self._determine_geometry()
@@ -233,7 +240,9 @@ class UnityTestCase(AutopilotTestCase):
233 logger.info("Resetting upstart env %s to %s", key, value)
240 logger.info("Resetting upstart env %s to %s", key, value)
234 if value is None:
241 if value is None:
235 subprocess.call(
242 subprocess.call(
236− ["/sbin/initctl", "unset-env", key], stderr=subprocess.STDOUT)
243+ ["/sbin/initctl", "unset-env", key],
244+ stderr=subprocess.STDOUT,
238 subprocess.call([
247 subprocess.call([
239 "/sbin/initctl",
248 "/sbin/initctl",
@@ -276,7 +285,7 @@ class UnityTestCase(AutopilotTestCase):
277 app_proxy = self._launch_unity_with_upstart(
286 app_proxy = self._launch_unity_with_upstart(
278 binary_path,
287 binary_path,
279− self.unity_geometry_args
288+ self.unity_geometry_args,
282 self._set_proxy(app_proxy)
291 self._set_proxy(app_proxy)
@@ -295,14 +304,16 @@ class UnityTestCase(AutopilotTestCase):
295 binary_arg = "BINARY=%s" % binary_path
304 binary_arg = "BINARY=%s" % binary_path
296 extra_args = "ARGS=%s" % " ".join(args)
305 extra_args = "ARGS=%s" % " ".join(args)
298− output = subprocess.check_output([
307+ output = subprocess.check_output(
299− "/sbin/initctl",
309+ "/sbin/initctl",
300− "start",
310+ "start",
301− "unity8",
311+ "unity8",
302− binary_arg,
312+ binary_arg,
303− extra_args
313+ extra_args,
304− ] + ["%s=%s" % (k, v) for k, v in self._environment.iteritems()],
314+ ] + ["%s=%s" % (k, v) for k, v in self._environment.iteritems()],
305− stderr=subprocess.STDOUT)
315+ stderr=subprocess.STDOUT,
307 self.addCleanup(self._cleanup_launching_upstart_unity)
318 self.addCleanup(self._cleanup_launching_upstart_unity)
@@ -387,7 +398,7 @@ class UnityTestCase(AutopilotTestCase):
387 self.assertThat(home_scope.isCurrent, Eventually(Equals(True)))
398 self.assertThat(home_scope.isCurrent, Eventually(Equals(True)))
389 def get_dash(self):
400 def get_dash(self):
390− dash = self._proxy.select_single(Dash)
401+ dash = self._proxy.wait_select_single(Dash)
391 return dash
402 return dash
393 @property
404 @property