20 """Test the integration with the URL dispatcher service."""
25 from autopilot
import platform
30 class URLDispatcherTestCase(tests.ApplicationLifeCycleTestCase):
33 if platform.model() ==
'Desktop':
34 self.skipTest(
"URL dispatcher doesn't work on the desktop.")
37 def test_swipe_out_application_started_by_url_dispatcher(self):
38 _, desktop_file_path = self.create_test_application()
39 desktop_file_name = os.path.basename(desktop_file_path)
40 application_name, _ = os.path.splitext(desktop_file_name)
43 'unity8-dash', self.main_window.get_current_focused_app_id())
44 self.addCleanup(os.system,
'pkill qmlscene')
46 subprocess.check_call(
47 [
'url-dispatcher',
'application:///{}'.format(desktop_file_name)])
48 self.assert_current_focused_application(application_name)
50 self.main_window.show_dash_swiping()
51 self.assert_current_focused_application(
'unity8-dash')