Bug 901198 Ensure safe browsing is enabled when running test_app_rep.js so that testing applications that don't enable it will pass as well. r=paolo

This commit is contained in:
Mark Banner 2013-08-05 10:16:30 +01:00
Родитель 27731f2af6
Коммит bcbb560ea9
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -19,6 +19,13 @@ function run_test() {
// 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);
do_register_cleanup(function() {
Services.prefs.clearUserPref("browser.safebrowsing.malware.enabled");
});
gHttpServ = new HttpServer();
gHttpServ.registerDirectory("/", do_get_cwd());