Comparing version 1.7.0 to 1.7.1
@@ -307,2 +307,5 @@ /** | ||
this.dispatchEvent(new sinon.Event("abort", false, false, this)); | ||
if (typeof this.onerror === "function") { | ||
this.onerror(); | ||
} | ||
}, | ||
@@ -388,2 +391,6 @@ | ||
this.setResponseBody(body || ""); | ||
if (typeof this.onload === "function"){ | ||
this.onload(); | ||
} | ||
} | ||
@@ -390,0 +397,0 @@ }); |
{ | ||
"name": "sinon", | ||
"description": "JavaScript test spies, stubs and mocks.", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"homepage": "http://cjohansen.no/sinon/", | ||
@@ -6,0 +6,0 @@ "author": "Christian Johansen", |
/** | ||
* Sinon.JS 1.7.0, 2013/05/07 | ||
* Sinon.JS 1.7.1, 2013/05/07 | ||
* | ||
@@ -4,0 +4,0 @@ * @author Christian Johansen (christian@cjohansen.no) |
@@ -628,2 +628,11 @@ /*jslint onevar: false, eqeqeq: false, browser: true*/ | ||
"fire onload event": function () { | ||
var fireOnLoad = false; | ||
this.onload = function(){ | ||
fireOnLoad = true; | ||
} | ||
this.xhr.respond(200, {}, ""); | ||
assert.isTrue(fireOnLoad); | ||
}, | ||
"calls readystate handler with readyState DONE once": function () { | ||
@@ -792,2 +801,3 @@ this.xhr.respond(200, {}, ""); | ||
"sets responseText to null": function () { | ||
@@ -809,2 +819,12 @@ this.xhr.responseText = "Partial data"; | ||
"fire onerror event": function () { | ||
var testFlag = false, | ||
this.onerror = function(){ | ||
testFlag = true; | ||
}; | ||
this.xhr.aborted = true; | ||
this.xhr.abort(); | ||
assert.isTrue(testFlag); | ||
}, | ||
"nulls request headers": function () { | ||
@@ -811,0 +831,0 @@ this.xhr.open("GET", "/"); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1891376
60
41299
6
9