Skip to content

Commit

Permalink
Merge branch 't/12978' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed May 11, 2015
2 parents 26b9d35 + da6dd60 commit c666d44
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/plugins/uploadwidget/manual/_helpers/xhr.js
Expand Up @@ -24,7 +24,8 @@ window.FormData = function() {
};

window.XMLHttpRequest = function() {
var basePath = bender.config.tests[ bender.testData.group ].basePath;
var basePath = bender.config.tests[ bender.testData.group ].basePath,
interval;

return {
open: function() {},
Expand All @@ -35,8 +36,7 @@ window.XMLHttpRequest = function() {
step = Math.round( total / 10 ),
xhr = this,
onprogress = this.onprogress,
onload = this.onload,
interval;
onload = this.onload;

// Wait 400 ms for every step.
interval = setInterval( function() {
Expand Down Expand Up @@ -73,6 +73,8 @@ window.XMLHttpRequest = function() {

// Abort should call onabort.
abort: function() {
clearInterval( interval );
this.status = 0;
this.onabort();
}
};
Expand Down

0 comments on commit c666d44

Please sign in to comment.