Bug 1316114 - reset sjs file at the end of the test case. r=mayhemer
MozReview-Commit-ID: FKm93zKuFe1
--- a/dom/base/test/test_bug475156.html
+++ b/dom/base/test/test_bug475156.html
@@ -252,16 +252,30 @@ var tests = [
done: function(xhr)
{
is(xhr.status, 200, "We got cached version");
is(xhr.getResponseHeader("Etag"), "a3", "We got correct ETag");
is(xhr.responseText, "a3", "We got the expected file body");
},
},
+
+ // Load one last time to reset the state variable in the .sjs file
+ {
+ init: function (xhr) {
+ xhr.open("GET", path + "bug475156.sjs");
+ xhr.setRequestHeader("If-Match", "a1");
+ },
+
+ loading: function (xhr) {
+ },
+
+ done: function (xhr) {
+ },
+ },
]
function drive(test)
{
var xhr = new XMLHttpRequest();
test.init(xhr);
xhr.onreadystatechange = function() {
@@ -275,12 +289,11 @@ function drive(test)
else
drive(tests.shift());
}
}
xhr.send();
}
</script>
-</pre>
</body>
</html>