зеркало из https://github.com/mozilla/gecko-dev.git
Bug 614868: Blocklist test assumes that nothing on the system is blocked by the default blocklist. r=robstrong, a=tests
This commit is contained in:
Родитель
00456e70b2
Коммит
c7093bc68f
|
@ -117,6 +117,21 @@ function pathHandler(metadata, response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_test() {
|
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 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||||
|
"<blocklist xmlns=\"http://www.mozilla.org/2006/addons-blocklist\">\n" +
|
||||||
|
"</blocklist>\n";
|
||||||
|
stream.write(data, data.length);
|
||||||
|
stream.close();
|
||||||
|
|
||||||
var osVersion;
|
var osVersion;
|
||||||
var sysInfo = Components.classes["@mozilla.org/system-info;1"]
|
var sysInfo = Components.classes["@mozilla.org/system-info;1"]
|
||||||
.getService(Components.interfaces.nsIPropertyBag2);
|
.getService(Components.interfaces.nsIPropertyBag2);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче