forked from EFForg/https-everywhere
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruleset-tests-status.js
More file actions
31 lines (24 loc) · 953 Bytes
/
ruleset-tests-status.js
File metadata and controls
31 lines (24 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var HTTPSEverywhere = null;
function updateStatusBar(current_test, total_tests) {
var labelText = "Test "+current_test+" of "+total_tests;
document.getElementById("progress-bar-label").value = labelText;
var percent = current_test / total_tests;
document.getElementById("progress-bar").value = percent;
}
function updateLog(msg) {
document.getElementById("log").value += msg+'\n';
}
function cancel() {
updateLog("Canceling early ...");
HTTPSEverywhere.httpseRulesetTests.cancel = true;
}
function start() {
HTTPSEverywhere = Components.classes["@eff.org/https-everywhere;1"]
.getService(Components.interfaces.nsISupports)
.wrappedJSObject;
HTTPSEverywhere.httpseRulesetTests.updateStatusBar = updateStatusBar;
HTTPSEverywhere.httpseRulesetTests.updateLog = updateLog;
HTTPSEverywhere.httpseRulesetTests.cancel = false;
updateLog("Starting ruleset tests ...");
HTTPSEverywhere.httpseRulesetTests.testRunner();
}