// load the HTTPS Everywhere component var HTTPSEverywhere = null; try { HTTPSEverywhere = Components.classes["@eff.org/https-everywhere;1"] .getService(Components.interfaces.nsISupports) .wrappedJSObject; } catch(e) { // HTTPS Everywhere doesn't seem to be installed } // attach testRunner to the HTTPS Everywhere component so that status.js can run it if(HTTPSEverywhere) { HTTPSEverywhere.httpseRulesetTests = { testRunner: testRunner }; } function openStatus() { // make sure mixed content blocking preferences are correct Services.prefs.setBoolPref("security.mixed_content.block_display_content", false); Services.prefs.setBoolPref("security.mixed_content.block_active_content", true); // open the status tab var statusTab = gBrowser.addTab('chrome://https-everywhere/content/ruleset-tests-status.xul'); gBrowser.selectedTab = statusTab; } function testRunner() { Components.utils.import("resource://gre/modules/PopupNotifications.jsm"); const numTabs = 6; var finished = false; var output = []; var urls = []; var num = 0; for(var target in HTTPSEverywhere.https_rules.targets) { if(!target.indexOf("*") != -1) { urls.push({ url: 'https://'+target, target: target, ruleset_names: HTTPSEverywhere.https_rules.targets[target] }); } } function test() { var i; HTTPSEverywhere.httpseRulesetTests.updateStatusBar(num, urls.length); // start loading all the tabs window.focus for(i=0; i