class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self._fit = FitImpl()
        config_handle = ConfigHandle()
        result = config_handle.check_apps("com.mxtech.videoplayer.ad")
        if result == 0:
            self._composeui.install_apk('Mxplayer')
        self._composeui.init_local_video()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self._composeui.uninstall_mxtech()
        self._fit.open_wifi()
        self._composeui.delete_local_video()

    def test_immersemode_mxplayer(self):
        ''' refer TC test_ImmerseMode_MXPlayer
        '''
        print "[RunTest]: %s" % self.__str__()
        self._composeui.launch_mxtech_am()
        self._composeui.check_notification_during_playing()
        self._composeui.stop_mxtech_am()
Esempio n. 2
0
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        #### Replace with MX
        # self._flvvideoplayer = FLVVideoPlayer()
        # self._composeui = ComposeUiImpl()
        # self.photos = get_photo_implement()
        # config = TestConfig()
        # cfg_file = 'tests.tablet.composeui.conf'
        # cfg_arti = config.read(cfg_file, 'artifactory')
        # config_handle = ConfigHandle()
        # cfg_arti["location"] = config_handle.read_configuration('artifactory', 'location', '/etc/oat/', 'sys.conf')
        # arti = Artifactory(cfg_arti.get('location'))
        # cfg_apk = config.read(cfg_file, 'FLVplayer')
        # binary_name = cfg_apk.get("name")
        # file_path = arti.get(binary_name)
        # result = config_handle.check_apps("air.br.com.bitlabs.FLVPlayer")
        # if result == 0:
        #     g_common_obj.adb_cmd_common('install ' + file_path)
        # self.photos.rm_delete_photos()
        # self.photos.refresh_sdcard()
        # self._composeui.init_local_video()
        self._composeui = ComposeUiImpl()
        self._fit = FitImpl()
        config_handle = ConfigHandle()
        result = config_handle.check_apps("com.mxtech.videoplayer.ad")
        if result == 0:
            self._composeui.install_apk('Mxplayer')
        self._composeui.init_local_video()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        # self._composeui.delete_local_video()
        # self._flvvideoplayer.uninstall_app()
        self._composeui.uninstall_mxtech()
        self._fit.open_wifi()
        self._composeui.delete_local_video()

    def test_VideoPlayer_FLV(self):
        ''' refer TC test_VideoPlayer_FLV
        '''
        print "[RunTest]: %s" % self.__str__()
        # self._flvvideoplayer.launch_app_am()
        # self._flvvideoplayer.play_video()
        # self._flvvideoplayer.stop_app_am()
        self._composeui.launch_mxtech_am()
        self._composeui.check_notification_during_playing()
        self._composeui.stop_mxtech_am()