From c7093bc68f10e2e97bb1b6233ba9ca6ce399f401 Mon Sep 17 00:00:00 2001 From: Dave Townsend Date: Thu, 2 Dec 2010 09:31:13 -0800 Subject: [PATCH] Bug 614868: Blocklist test assumes that nothing on the system is blocked by the default blocklist. r=robstrong, a=tests --- .../extensions/test/xpcshell/test_bug430120.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js b/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js index 7a8845b8041d..9b0708337e23 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js @@ -117,6 +117,21 @@ function pathHandler(metadata, response) { } function run_test() { + // Write out an empty blocklist.xml file to the profile to ensure nothing + // is blocklisted by default + var blockFile = gProfD.clone(); + blockFile.append("blocklist.xml"); + var stream = AM_Cc["@mozilla.org/network/file-output-stream;1"]. + createInstance(AM_Ci.nsIFileOutputStream); + stream.init(blockFile, FileUtils.MODE_WRONLY | FileUtils.MODE_CREATE | FileUtils.MODE_TRUNCATE, + FileUtils.PERMS_FILE, 0); + + var data = "\n" + + "\n" + + "\n"; + stream.write(data, data.length); + stream.close(); + var osVersion; var sysInfo = Components.classes["@mozilla.org/system-info;1"] .getService(Components.interfaces.nsIPropertyBag2);