Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// check arguments
oSelf.assertTrue(a === 1);
oSelf.assertTrue(b === 2);
oSelf.assertTrue(c === 3);
oSelf.assertTrue(d === 4);
oSelf.assertTrue(!e);
// check scope
oSelf.assertTrue(this === scope);
// validate execution
executed = true;
};
// creates the binded function
var binded = ariaUtilsFunction.bind(myFunction, scope, 1, 2);
// call it several time to be sure parameters are still ok
binded(3, 4);
binded(3, 4);
this.assertTrue(executed);
},
runTemplateTest : function () {
var regexps = [];
regexps.push(/Use JawsKey\+Alt\+M to move to controlled element/g);
regexps.push(this._createLineRegExp(' *')); // empty line
regexps.push(/ +(?=\s)/g); // multiple consecutive spaces
regexps.push(this._createLineRegExp(this._getData().elementBefore.textContent));
this._filter = ariaUtilsFunction.bind(this._applyRegExps, this, regexps);
this._localAsyncSequence(function (add) {
add('_test');
add('_checkHistory');
}, this.end);
},
initialSetup : function() {
this.myAutoCompleteWidget = this.getWidgetInstance(this.myAutoCompleteId);
var checkFn = this.myAutoCompleteAccessible ? this.checkAccessibilityEnabled : this.checkAccessibilityDisabled;
this.myAutoCompleteCheckFn = fnUtils.bind(checkFn, this, this.myAutoCompleteWidget);
},
ariaUtilsArray.forEach(traversals, function(traversal) {
var key = traversal.key;
var name = traversal.name;
var traversalTestData = testData[traversal.name];
var actionsCount = traversalTestData.actionsCount;
var expectedOutput = traversalTestData.expectedOutput;
selectStartPoint();
ariaUtilsAlgo.times(actionsCount, ariaUtilsFunction.bind(specialKey, null, key));
says(expectedOutput.join('\n'));
});
});
_filterWidgetsTypes: function(widgetsTypes) {
return ariaUtilsArray.filter(
widgetsTypes,
ariaUtilsFunction.bind(this._keepWidgetTypePredicate, this)
);
},
$constructor : function () {
this.$TestCase.constructor.call(this);
this.handleAsyncTestError = ariaUtilsFunction.bind(this.handleAsyncTestError, this);
},
$destructor : function () {
function autoBindAndAlias(container, spec) {
var method = ariaUtilsFunction.bind(container[spec.name], container);
ariaUtilsArray.forEach(spec.aliases, function(alias) {
container[alias] = method;
});
return method;
}
runTemplateTest : function () {
var regexps = [];
regexps.push(this._createLineRegExp('Element before .*'));
regexps.push(this._createLineRegExp('separator'));
regexps.push(this._createLineRegExp('AT test*'));
regexps.push(/Use JawsKey\+Alt\+M to move to controlled element\s*/g);
this._filter = ariaUtilsFunction.bind(this._applyRegExps, this, regexps);
this._localAsyncSequence(function (add) {
add('_testGroups');
add('_checkHistory');
}, this.end);
},