@@ -31,7 +31,6 @@ from ubuntuuitoolkit import (
33from unity8.application_lifecycle import tests
33from unity8.application_lifecycle import tests
34−from unity8.process_helpers import unlock_unity
35from unity8.shell import disable_qml_mocking
34from unity8.shell import disable_qml_mocking
36from unity8.shell.tests import _get_device_emulation_scenarios
35from unity8.shell.tests import _get_device_emulation_scenarios
@@ -44,12 +43,9 @@ class ApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
44 scenarios = _get_device_emulation_scenarios()
43 scenarios = _get_device_emulation_scenarios()
46 def setUp(self):
45 def setUp(self):
46+ if model() == 'Desktop':
47+ self.skipTest('Test cannot be run on the desktop.')
47 super(ApplicationLifecycleTests, self).setUp()
48 super(ApplicationLifecycleTests, self).setUp()
48− if model() == "Desktop":
49− self.skipTest("Test cannot be run on the desktop.")
51− unity_proxy = self.launch_unity()
52− unlock_unity(unity_proxy)
54 def swipe_screen_from_right(self):
50 def swipe_screen_from_right(self):
55 width = self.main_window.width
51 width = self.main_window.width
@@ -75,13 +71,11 @@ class ApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
75 app_type='qt')
71 app_type='qt')
76 return application_name
72 return application_name
79 def test_can_launch_application(self):
74 def test_can_launch_application(self):
80 """Must be able to launch an application."""
75 """Must be able to launch an application."""
81 application_name = self.launch_fake_app()
76 application_name = self.launch_fake_app()
82 self.assert_current_focused_application(application_name)
77 self.assert_current_focused_application(application_name)
85 def test_can_launch_multiple_applications(self):
79 def test_can_launch_multiple_applications(self):
86 """A second application launched must be focused."""
80 """A second application launched must be focused."""
87 application1_name = self.launch_fake_app()
81 application1_name = self.launch_fake_app()
@@ -91,7 +85,6 @@ class ApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
91 self.assertFalse(application1_name == application2_name)
85 self.assertFalse(application1_name == application2_name)
92 self.assert_current_focused_application(application2_name)
86 self.assert_current_focused_application(application2_name)
95 def test_app_moves_from_unfocused_to_focused(self):
88 def test_app_moves_from_unfocused_to_focused(self):
96 """An application that is in the unfocused state must be able to be
89 """An application that is in the unfocused state must be able to be
97 brought back to the focused state.
90 brought back to the focused state.