Skip to content

Commit af9cbc2

Browse files
committed
Load a Reddit URL and test for rewrite.
1 parent b4f8257 commit af9cbc2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

https-everywhere-tests/test/test-httpse-installed.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,16 @@ exports["test httpse potentiallyApplicableRulesets"] = function(assert) {
2020
"Test that HTTPSE finds one applicable rule for www.eff.org");
2121
}
2222

23+
exports["test sample ruleset"] = function(assert, done) {
24+
var tabs = require("sdk/tabs");
25+
26+
tabs.on('ready', function(tab) {
27+
assert.equal(tab.url, "https://www.reddit.com/robots.txt",
28+
"Test that Reddit URLs are rewritten to HTTPS.");
29+
done();
30+
});
31+
32+
tabs.open("http://www.reddit.com/robots.txt");
33+
}
34+
2335
require("sdk/test").run(exports);

0 commit comments

Comments
 (0)