Bug 1316114 - reset sjs file at the end of the test case. r=mayhemer draft
authorJoel Maher <jmaher@mozilla.com>
Wed, 09 Nov 2016 16:18:08 -0500
changeset 436865 48e53096625b94a779f1d84f71186f4919b9b364
parent 436802 058b48a72e502bc73e1a85d5a0f2a197ed6a5c61
child 536458 81fc9c866b27ddd6b74770985b26912ebc28fbcf
push id35217
push userbmo:jmaher@mozilla.com
push dateWed, 09 Nov 2016 21:18:44 +0000
reviewersmayhemer
bugs1316114
milestone52.0a1
Bug 1316114 - reset sjs file at the end of the test case. r=mayhemer MozReview-Commit-ID: FKm93zKuFe1
dom/base/test/test_bug475156.html
--- 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>