def _init_downloadmanager(self): log.init.debug("Initializing downloads...") qtnetwork_download_manager = objreg.get('qtnetwork-download-manager') try: webengine_download_manager = objreg.get( 'webengine-download-manager') except KeyError: webengine_download_manager = None download_model = downloads.DownloadModel(qtnetwork_download_manager, webengine_download_manager) objreg.register('download-model', download_model, scope='window', window=self.win_id)
def test_download_model(qapp, qtmodeltester, manager): """Simple check for download model internals.""" model = downloads.DownloadModel(manager) qtmodeltester.check(model)
def test_download_model(qapp, qtmodeltester, config_stub, cookiejar_and_cache, fake_args): """Simple check for download model internals.""" manager = qtnetworkdownloads.DownloadManager() model = downloads.DownloadModel(manager) qtmodeltester.check(model)
def test_download_model(qapp, qtmodeltester, config_stub, cookiejar_and_cache): """Simple check for download model internals.""" config_stub.data = {'general': {'private-browsing': False}} manager = qtnetworkdownloads.DownloadManager(win_id=0) model = downloads.DownloadModel(manager) qtmodeltester.check(model)
def model(qtnetwork_manager, qtmodeltester, qapp): """A simple DownloadModel.""" model = downloads.DownloadModel(qtnetwork_manager) qtmodeltester.check(model) return model