Bug 981460 - Set download_block_table explicitly for testing applications. r=mmc, a=test-only
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Tue, 18 Mar 2014 10:46:34 +0000
changeset 192176 b70ad49d688284c5304ceb50aae8f429b68652a5
parent 192175 3f4a4fc2578be76eb03a8de8ee3b102f67eefb81
child 192177 9b482d6994fdf7f0d085f09a6847e36298525476
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmmc, test-only
bugs981460
milestone30.0a2
Bug 981460 - Set download_block_table explicitly for testing applications. r=mmc, a=test-only
toolkit/components/downloads/test/unit/test_app_rep.js
--- a/toolkit/components/downloads/test/unit/test_app_rep.js
+++ b/toolkit/components/downloads/test/unit/test_app_rep.js
@@ -55,16 +55,23 @@ function run_test() {
                              "http://localhost:4444/download");
   // Ensure safebrowsing is enabled for this test, even if the app
   // doesn't have it enabled.
   Services.prefs.setBoolPref("browser.safebrowsing.malware.enabled", true);
   do_register_cleanup(function() {
     Services.prefs.clearUserPref("browser.safebrowsing.malware.enabled");
   });
 
+  // Set download_block_table explicitly.
+  Services.prefs.setCharPref("urlclassifier.download_block_table",
+                             "goog-badbinurl-shavar");
+  do_register_cleanup(function() {
+    Services.prefs.clearUserPref("urlclassifier.download_block_table");
+  });
+
   gHttpServ = new HttpServer();
   gHttpServ.registerDirectory("/", do_get_cwd());
   gHttpServ.registerPathHandler("/download", function(request, response) {
     do_throw("This test should never make a remote lookup");
   });
   gHttpServ.start(4444);
 
   run_next_test();