From 735df00f02dcce7d00d596561f601e41e07dcf48 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 31 May 2023 22:50:51 +0200 Subject: [PATCH] chore: Remove deprecated and removed API from mocks Signed-off-by: Ferdinand Thiessen --- tests/unit/js/mocks/OC.js | 52 --------------------------------------- 1 file changed, 52 deletions(-) diff --git a/tests/unit/js/mocks/OC.js b/tests/unit/js/mocks/OC.js index e04020213..6881e3049 100644 --- a/tests/unit/js/mocks/OC.js +++ b/tests/unit/js/mocks/OC.js @@ -348,58 +348,6 @@ var OC={ return result.join('/'); }, - /** - * Load a script for the server and load it. If the script is already loaded, - * the event handler will be called directly - * @param {string} app the app id to which the script belongs - * @param {string} script the filename of the script - * @param ready event handler to be called when the script is loaded - */ - addScript:function(app,script,ready){ - var deferred, path=OC.filePath(app,'js',script+'.js'); - if(!OC.addScript.loaded[path]){ - if(ready){ - deferred=$.getScript(path,ready); - }else{ - deferred=$.getScript(path); - } - OC.addScript.loaded[path]=deferred; - }else{ - if(ready){ - ready(); - } - } - return OC.addScript.loaded[path]; - }, - /** - * Loads a CSS file - * @param {string} app the app id to which the css style belongs - * @param {string} style the filename of the css file - */ - addStyle:function(app,style){ - var path=OC.filePath(app,'css',style+'.css'); - if(OC.addStyle.loaded.indexOf(path)===-1){ - OC.addStyle.loaded.push(path); - if (document.createStyleSheet) { - document.createStyleSheet(path); - } else { - style=$(''); - $('head').append(style); - } - } - }, - - /** - * Loads translations for the given app asynchronously. - * - * @param {String} app app name - * @param {Function} callback callback to call after loading - * @return {Promise} - */ - addTranslations: function(app, callback) { - return OC.L10N.load(app, callback); - }, - /** * Returns the base name of the given path. * For example for "/abc/somefile.txt" it will return "somefile.txt"