Commit 3b8f3e1b 3b8f3e1bda953f213c50e5f8ad00f841511d3321 by Nathan Black

Update step.timeout to have the same params as onStepTimeout

1 parent 414f83d2
...@@ -437,7 +437,7 @@ Emitted when a navigation step has been started. ...@@ -437,7 +437,7 @@ Emitted when a navigation step has been started.
437 ``step.timeout`` 437 ``step.timeout``
438 ~~~~~~~~~~~~~~~~ 438 ~~~~~~~~~~~~~~~~
439 439
440 **Arguments:** ``None`` 440 **Arguments:** ``[step, timeout]``
441 441
442 Emitted when a navigation step has been executed. 442 Emitted when a navigation step has been executed.
443 443
......
...@@ -1504,7 +1504,7 @@ Casper.prototype.runStep = function runStep(step) { ...@@ -1504,7 +1504,7 @@ Casper.prototype.runStep = function runStep(step) {
1504 var stepTimeoutCheckInterval = setInterval(function _check(self, start, stepNum) { 1504 var stepTimeoutCheckInterval = setInterval(function _check(self, start, stepNum) {
1505 if (new Date().getTime() - start > self.options.stepTimeout) { 1505 if (new Date().getTime() - start > self.options.stepTimeout) {
1506 if (getCurrentSuiteId(self) === stepNum) { 1506 if (getCurrentSuiteId(self) === stepNum) {
1507 self.emit('step.timeout'); 1507 self.emit('step.timeout', stepNum, self.options.onStepTimeout);
1508 if (utils.isFunction(self.options.onStepTimeout)) { 1508 if (utils.isFunction(self.options.onStepTimeout)) {
1509 self.options.onStepTimeout.call(self, self.options.stepTimeout, stepNum); 1509 self.options.onStepTimeout.call(self, self.options.stepTimeout, stepNum);
1510 } 1510 }
......