Bug 1288327 - Disable some HTTP cache tests when the old backend is used, r=dragana
authorHonza Bambas <honzab.moz@firemni.cz>
Thu, 21 Jul 2016 02:00:00 +0800
changeset 331405 730a8fbf67f951377326d659bc5c4d262700b3a2
parent 331296 968c7be2c2a62daedf768fdb1c8ac316220c2895
child 331406 21d15da870e8f74b933429f4b3efd651747b8b31
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdragana
bugs1288327
milestone50.0a1
Bug 1288327 - Disable some HTTP cache tests when the old backend is used, r=dragana
netwerk/test/unit/test_cache2-29c-concurrent_read_half-interrupted.js
netwerk/test/unit/test_cache2-29e-concurrent_read_half-non-206-response.js
netwerk/test/unit/test_cache2-29e-non-206-response.js
netwerk/test/unit/xpcshell.ini
--- 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,16 +55,21 @@ 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();
rename from netwerk/test/unit/test_cache2-29e-non-206-response.js
rename to netwerk/test/unit/test_cache2-29e-concurrent_read_half-non-206-response.js
--- a/netwerk/test/unit/test_cache2-29e-non-206-response.js
+++ b/netwerk/test/unit/test_cache2-29e-concurrent_read_half-non-206-response.js
@@ -50,16 +50,21 @@ 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()
 {
+  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/xpcshell.ini
+++ b/netwerk/test/unit/xpcshell.ini
@@ -69,17 +69,17 @@ skip-if = os == "android"
 skip-if = true
 [test_cache2-28a-OPEN_SECRETLY.js]
 # This test will be fixed in bug 1067931
 skip-if = true
 [test_cache2-29a-concurrent_read_resumable_entry_size_zero.js]
 [test_cache2-29b-concurrent_read_non-resumable_entry_size_zero.js]
 [test_cache2-29c-concurrent_read_half-interrupted.js]
 [test_cache2-29d-concurrent_read_half-corrupted-206.js]
-[test_cache2-29e-non-206-response.js]
+[test_cache2-29e-concurrent_read_half-non-206-response.js]
 [test_cache2-30a-entry-pinning.js]
 [test_cache2-30b-pinning-storage-clear.js]
 [test_cache2-30c-pinning-deferred-doom.js]
 [test_cache2-30d-pinning-WasEvicted-API.js]
 [test_partial_response_entry_size_smart_shrink.js]
 [test_304_responses.js]
 [test_421.js]
 [test_cacheForOfflineUse_no-store.js]