Bug 1061112 - test_app_rep_windows.js needs some preference variables to be passed on comm-central. r=mmc,a=test-only
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Wed, 10 Sep 2014 07:49:03 +0100
changeset 224715 7d8ceef4fd5f757e8548392b3f70b795bd45814a
parent 224714 c42ce91dedaaa6c907d151ffcfa6711557f63c7f
child 224716 888f6e657035fda92e92c8ba227d9c4aa72be141
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmmc, test-only
bugs1061112
milestone34.0a2
Bug 1061112 - test_app_rep_windows.js needs some preference variables to be passed on comm-central. r=mmc,a=test-only
toolkit/components/downloads/test/unit/test_app_rep_windows.js
--- a/toolkit/components/downloads/test/unit/test_app_rep_windows.js
+++ b/toolkit/components/downloads/test/unit/test_app_rep_windows.js
@@ -174,18 +174,28 @@ add_task(function test_setup()
     }
   });
   // Set up a local HTTP server to return bad verdicts.
   Services.prefs.setCharPref("browser.safebrowsing.appRepURL",
                              "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);
+  Services.prefs.setBoolPref("browser.safebrowsing.downloads.enabled", true);
+  // Set block and allow tables explicitly, since the allowlist is normally
+  // disabled on comm-central.
+  Services.prefs.setCharPref("urlclassifier.downloadBlockTable",
+                             "goog-badbinurl-shavar");
+  Services.prefs.setCharPref("urlclassifier.downloadAllowTable",
+                             "goog-downloadwhite-digest256");
   do_register_cleanup(function() {
     Services.prefs.clearUserPref("browser.safebrowsing.malware.enabled");
+    Services.prefs.clearUserPref("browser.safebrowsing.downloads.enabled");
+    Services.prefs.clearUserPref("urlclassifier.downloadBlockTable");
+    Services.prefs.clearUserPref("urlclassifier.downloadAllowTable");
   });
 
   gHttpServer = new HttpServer();
   gHttpServer.registerDirectory("/", do_get_cwd());
 
   function createVerdict(aShouldBlock) {
     // We can't programmatically create a protocol buffer here, so just
     // hardcode some already serialized ones.