Bug 1316114 - reset sjs file at the end of the test case. r=jmaher
authorJoel Maher <jmaher@mozilla.com>
Wed, 09 Nov 2016 16:18:08 -0500
changeset 351885 5c62fafdf68285f5696a9210bfab362ded36ff1d
parent 351884 9bf5be90848a3819636fcc65986c02ec65e66fd7
child 351886 f6377025e793a60af4a30aa913ff896e26a5cd6d
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1316114
milestone52.0a1
Bug 1316114 - reset sjs file at the end of the test case. r=jmaher 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>