src/sap.ui.core/src/sap/ui/qunit/utils/ControlIterator.js
function(aControls, aControlsToTest, aExcludedControls, bIncludeNonRenderable, bIncludeNonInstantiable, fnCallback) {
		return new Promise(function(resolve, reject){
			var iControlCountInLib = 0;

			var loop = function(i) {
				if (i < aControls.length) {

					var sControlName = aControls[i];
					handleControl(sControlName, aControlsToTest, aExcludedControls, bIncludeNonRenderable, bIncludeNonInstantiable, fnCallback).then(function(bCountThisControl){
						if (bCountThisControl) {
							iControlCountInLib++;
						}
						loop(i + 1);
					});
				} else {
					resolve(iControlCountInLib);
				}
			};

			loop(0);
		});
	}
function(aControls, aControlsToTest, aExcludedControls, bIncludeNonRenderable, bIncludeNonInstantiable, fnCallback) {
		return new Promise(function(resolve, reject){
			var iControlCountInLib = 0;

			var loop = function(i) {
				if (i < aControls.length) {

					var sControlName = aControls[i];
					handleControl(sControlName, aControlsToTest, aExcludedControls, bIncludeNonRenderable, bIncludeNonInstantiable, fnCallback).then(function(bCountThisControl){
						if (bCountThisControl) {
							iControlCountInLib++;
						}
						loop(i + 1);
					});
				} else {
					resolve(iControlCountInLib);
				}
			};

			loop(0);
		});
	}
function ( aControls , aControlsToTest , aExcludedControls , bIncludeNonRenderable , bIncludeNonInstantiable , fnCallback ) { return new Promise ( function ( resolve , reject ) { var iControlCountInLib = 0 ; var loop = function ( i ) { if ( i < aControls . length ) { var sControlName = aControls [ i ] ; handleControl ( sControlName , aControlsToTest , aExcludedControls , bIncludeNonRenderable , bIncludeNonInstantiable , fnCallback ) . then ( function ( bCountThisControl ) { if ( bCountThisControl ) { iControlCountInLib ++ ; } loop ( i + 1 ) ; } ) ; } else { resolve ( iControlCountInLib ) ; } } ; loop ( 0 ) ; } ) ; }
Calls the callback function for all controls in the given array, unless they are explicitly excluded
Calls the callback function for all controls in the given array unless they are explicitly excluded