Skip to content
Permalink
Browse files

Merge branch 't/13171' into major

  • Loading branch information...
Reinmar committed Apr 13, 2015
2 parents 1f188a0 + ec1b135 commit 255747dc6228cf9f18c75c2ed198d457041d5fcd
@@ -7,14 +7,31 @@

// Mock the real XMLHttpRequest so the upload test may show the effect of an error during upload.

window.FormData = function() {
var total, filename;
return {
append: function( name, file, filename ) {
total = file.size;
filename = filename;
},
getTotal: function() {
return total;
},
getFileName: function() {
return filename;
}
};
};

window.XMLHttpRequest = function() {
return {
open: function() {},

send: function() {
send: function( formData ) {
// Total file size.
var loaded = 0,
step = 10,
var total = formData.getTotal(),
loaded = 0,
step = Math.round( total / 10 ),
onprogress = this.onprogress,
onerror = this.onerror,
interval;
@@ -7,5 +7,5 @@ This test emulates an error during upload. When upload hits 50% an error occurs.
* Drop an image.
* Check if `upload widget` is displayed.
* Check if image is removed after it reaches 50% of progress and no artifacts left.
* Check if image is removed when it reaches 50% of progress and no artifacts left.
* Check if you see a message about the error.

0 comments on commit 255747d

Please sign in to comment.
You can’t perform that action at this time.