Bug 1288327 - Disable some HTTP cache tests when the old backend is used, followup to fix remaining failures. r=mayhemer
authoraleth <aleth@instantbird.org>
Tue, 26 Jul 2016 14:14:54 +0200
changeset 346749 37e371c92c11c20fa0a8dd32f4f6ecee7aea7b49
parent 346748 137df01eff02fcb191f47b81077f1fb0c621fac5
child 346750 39784b9cd9262a7ed15d31dc1f5b8f2cbf8ab412
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1288327
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1288327 - Disable some HTTP cache tests when the old backend is used, followup to fix remaining failures. r=mayhemer
netwerk/test/unit/test_cache2-29c-concurrent_read_half-interrupted.js
netwerk/test/unit/test_cache2-29d-concurrent_read_half-corrupted-206.js
netwerk/test/unit/test_cache2-29e-concurrent_read_half-non-206-response.js
--- a/netwerk/test/unit/test_cache2-29c-concurrent_read_half-interrupted.js
+++ b/netwerk/test/unit/test_cache2-29c-concurrent_read_half-interrupted.js
@@ -55,21 +55,16 @@ function contentHandler(metadata, respon
     let len = responseBody.length;
 	  response.setHeader("Content-Range", "0-" + (len - 1) + "/" + len);
   }
   response.bodyOutputStream.write(responseBody, responseBody.length);
 }
 
 function run_test()
 {
-  if (!newCacheBackEndUsed()) {
-    do_check_true(true, "This test doesn't run when the old cache back end is used since the behavior is different");
-    return;
-  }
-
   // Static check
   do_check_true(responseBody.length > 1024);
 
   do_get_profile();
 
   Services.prefs.setIntPref("browser.cache.disk.max_entry_size", 1);
 
   httpServer = new HttpServer();
--- a/netwerk/test/unit/test_cache2-29d-concurrent_read_half-corrupted-206.js
+++ b/netwerk/test/unit/test_cache2-29d-concurrent_read_half-corrupted-206.js
@@ -60,16 +60,21 @@ function contentHandler(metadata, respon
 
 function run_test()
 {
   // Static check
   do_check_true(responseBody.length > 1024);
 
   do_get_profile();
 
+  if (!newCacheBackEndUsed()) {
+    do_check_true(true, "This test doesn't run when the old cache back end is used since the behavior is different");
+    return;
+  }
+
   Services.prefs.setIntPref("browser.cache.disk.max_entry_size", 1);
 
   httpServer = new HttpServer();
   httpServer.registerPathHandler("/content", contentHandler);
   httpServer.start(-1);
 
   var chan1 = make_channel(URL + "/content");
   chan1.asyncOpen2(new ChannelListener(firstTimeThrough, null));
--- a/netwerk/test/unit/test_cache2-29e-concurrent_read_half-non-206-response.js
+++ b/netwerk/test/unit/test_cache2-29e-concurrent_read_half-non-206-response.js
@@ -50,26 +50,26 @@ function contentHandler(metadata, respon
   response.setHeader("Cache-Control", "max-age=99999");
   response.setHeader("Accept-Ranges", "bytes");
   response.setHeader("Content-Length", "" + responseBody.length);
   response.bodyOutputStream.write(responseBody, responseBody.length);
 }
 
 function run_test()
 {
+  // Static check
+  do_check_true(responseBody.length > 1024);
+
+  do_get_profile();
+
   if (!newCacheBackEndUsed()) {
     do_check_true(true, "This test doesn't run when the old cache back end is used since the behavior is different");
     return;
   }
 
-  // Static check
-  do_check_true(responseBody.length > 1024);
-
-  do_get_profile();
-
   Services.prefs.setIntPref("browser.cache.disk.max_entry_size", 1);
 
   httpServer = new HttpServer();
   httpServer.registerPathHandler("/content", contentHandler);
   httpServer.start(-1);
 
   var chan1 = make_channel(URL + "/content");
   chan1.asyncOpen2(new ChannelListener(firstTimeThrough, null));