1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
# Copyright 2014 Canonical
4
# This program is free software: you can redistribute it and/or modify it
5
# under the terms of the GNU Lesser General Public License version 3, as published
6
# by the Free Software Foundation.
8
"""Tests for the Ubuntu HTML5 Launcher package """
11
from autopilot.testcase import AutopilotTestCase
13
LAUNCHER_EXEC_NAME = 'ubuntu-html5-app-launcher'
15
LOCAL_LAUNCHER_PATH = os.path.abspath("%s/%s" % (os.path.dirname(os.path.realpath(__file__))
16
, '../../../../src/ubuntu-html5-app-launcher/' + LAUNCHER_EXEC_NAME))
17
INSTALLED_LAUNCHER_PATH = '/usr/bin/' + LAUNCHER_EXEC_NAME
20
class UbuntuHtml5LauncherTestCase (AutopilotTestCase):
23
super(UbuntuHtml5LauncherTestCase, self).setUp()
26
super(UbuntuHtml5LauncherTestCase, self).tearDown()
28
def get_launcher_path(self):
29
if os.path.exists(LOCAL_LAUNCHER_PATH):
30
return LOCAL_LAUNCHER_PATH
31
return INSTALLED_LAUNCHER_PATH
36
def launch_with_argument(self, args):
38
self.app = self.launch_test_application(self.get_launcher_path(), args)