src/sap.ui.core/src/sap/ui/qunit/utils/ControlIterator.js
function getAllLibraries(aExcludedLibraries, bIncludeDistLayer) {
		var mLibraries = sap.ui.getCore().getLoadedLibraries(),
			sInfoLibName,
			bNewLibrary,
			oInfo,
			i;

		// discover what is available in order to also test other libraries than those loaded in bootstrap
		oInfo = sap.ui.getVersionInfo();
		for (i = 0; i < oInfo.libraries.length; i++) {
			sInfoLibName = oInfo.libraries[i].name;
			if (jQuery.inArray(sInfoLibName, aExcludedLibraries) === -1 && !mLibraries[sInfoLibName]) {
				Log.info("Libary '" + sInfoLibName + "' is not loaded!");
				try {
					sap.ui.getCore().loadLibrary(sInfoLibName);
					bNewLibrary = true;
				} catch (e) {
					// not a control lib? This happens for e.g. "themelib_sap_bluecrystal"...
				}
			}
		}

		// Renew the libraries object if new libraries are added
		if (bNewLibrary) {
			mLibraries = sap.ui.getCore().getLoadedLibraries();
		}

		// excluded libraries should even be excluded when already loaded initially
		aExcludedLibraries.forEach(function(sLibraryName) {
			mLibraries[sLibraryName] = undefined;
		});

		// ignore dist-layer libraries if requested
		if (!bIncludeDistLayer) {
			for (var sLibName in mLibraries) {
				if (!ControlIterator.isKnownRuntimeLayerLibrary(sLibName)) {
					mLibraries[sLibName] = undefined;
				}
			}
		}

		return mLibraries;
	}
function getAllLibraries(aExcludedLibraries, bIncludeDistLayer) {
		var mLibraries = sap.ui.getCore().getLoadedLibraries(),
			sInfoLibName,
			bNewLibrary,
			oInfo,
			i;

		// discover what is available in order to also test other libraries than those loaded in bootstrap
		oInfo = sap.ui.getVersionInfo();
		for (i = 0; i < oInfo.libraries.length; i++) {
			sInfoLibName = oInfo.libraries[i].name;
			if (jQuery.inArray(sInfoLibName, aExcludedLibraries) === -1 && !mLibraries[sInfoLibName]) {
				Log.info("Libary '" + sInfoLibName + "' is not loaded!");
				try {
					sap.ui.getCore().loadLibrary(sInfoLibName);
					bNewLibrary = true;
				} catch (e) {
					// not a control lib? This happens for e.g. "themelib_sap_bluecrystal"...
				}
			}
		}

		// Renew the libraries object if new libraries are added
		if (bNewLibrary) {
			mLibraries = sap.ui.getCore().getLoadedLibraries();
		}

		// excluded libraries should even be excluded when already loaded initially
		aExcludedLibraries.forEach(function(sLibraryName) {
			mLibraries[sLibraryName] = undefined;
		});

		// ignore dist-layer libraries if requested
		if (!bIncludeDistLayer) {
			for (var sLibName in mLibraries) {
				if (!ControlIterator.isKnownRuntimeLayerLibrary(sLibName)) {
					mLibraries[sLibName] = undefined;
				}
			}
		}

		return mLibraries;
	}
function getAllLibraries ( aExcludedLibraries , bIncludeDistLayer ) { var mLibraries = sap . ui . getCore ( ) . getLoadedLibraries ( ) , sInfoLibName , bNewLibrary , oInfo , i ; // discover what is available in order to also test other libraries than those loaded in bootstrap oInfo = sap . ui . getVersionInfo ( ) ; for ( i = 0 ; i < oInfo . libraries . length ; i ++ ) { sInfoLibName = oInfo . libraries [ i ] . name ; if ( jQuery . inArray ( sInfoLibName , aExcludedLibraries ) === - 1 && ! mLibraries [ sInfoLibName ] ) { Log . info ( "Libary '" + sInfoLibName + "' is not loaded!" ) ; try { sap . ui . getCore ( ) . loadLibrary ( sInfoLibName ) ; bNewLibrary = true ; } catch ( e ) { // not a control lib? This happens for e.g. "themelib_sap_bluecrystal"... } } } // Renew the libraries object if new libraries are added if ( bNewLibrary ) { mLibraries = sap . ui . getCore ( ) . getLoadedLibraries ( ) ; } // excluded libraries should even be excluded when already loaded initially aExcludedLibraries . forEach ( function ( sLibraryName ) { mLibraries [ sLibraryName ] = undefined ; } ) ; // ignore dist-layer libraries if requested if ( ! bIncludeDistLayer ) { for ( var sLibName in mLibraries ) { if ( ! ControlIterator . isKnownRuntimeLayerLibrary ( sLibName ) ) { mLibraries [ sLibName ] = undefined ; } } } return mLibraries ; }
Returns a map with all libraries found, depending on the given arguments

@param {Array} aExcludedLibraries the list of libraries to exclude
@param {boolean} bIncludeDistLayer whether the list of libraries should be restricted to known runtime-layer libraries (superset of the OpenUI5 libraries) or include any dist-layer libraries
@returns a map of library infos
Returns a map with all libraries found depending on the given arguments