Index: chrome/content/tests/policy.js |
diff --git a/chrome/content/tests/policy.js b/chrome/content/tests/policy.js |
index d977b44850f4a2718fc04d45e971dce7e1e1c259..a044f23d5e32874823ece075fedac539c5d97ace 100644 |
--- a/chrome/content/tests/policy.js |
+++ b/chrome/content/tests/policy.js |
@@ -298,13 +298,21 @@ |
defaultMatcher.clear(); |
if (stage > 1) |
- defaultMatcher.add(Filter.fromText(expectedURL)); |
+ if (stage == 7) |
+ defaultMatcher.add(Filter.fromText(expectedURL + "$domain=127.0.0.1")); |
+ else |
+ defaultMatcher.add(Filter.fromText(expectedURL)); |
+ |
if (stage == 3) |
defaultMatcher.add(Filter.fromText("@@||127.0.0.1:1234/test|$document")); |
if (stage == 4) |
defaultMatcher.add(Filter.fromText("@@||127.0.0.1:1234/test|$~document")); |
if (stage == 5) |
defaultMatcher.add(Filter.fromText("@@||127.0.0.1:1234/test|$document,sitekey=" + publickey)); |
+ if (stage == 6 || stage == 7) |
+ defaultMatcher.add(Filter.fromText("@@||127.0.0.1:1234/test|$genericblock")); |
+ if (stage == 8) |
+ defaultMatcher.add(Filter.fromText("@@||127.0.0.1:1234/test|$genericblock,sitekey=" + publickey)); |
if (!explicitEvent) |
{ |
@@ -363,11 +371,11 @@ |
var callback = function() |
{ |
let expectedStatus = "allowed"; |
- if (stage == 3) |
+ if (stage == 3 || stage == 6) |
equal(policyHits.length, 0, "Number of policy hits"); |
// We cannot rely on the correctness of policy hits for sitekey filters due to blocking |
// filter hits being counted even if the resource doesn't end up getting blocked |
- else if (stage != 5) |
+ else if (stage != 5 && stage != 8) |
{ |
equal(policyHits.length, 1, "Number of policy hits"); |
if (policyHits.length == 1) |
@@ -401,7 +409,10 @@ |
2: "running with filter %S", |
3: "running with filter %S and site exception", |
4: "running with filter %S and exception not applicable to sites", |
- 5: "running with filter %S and sitekey exception" |
+ 5: "running with filter %S and sitekey exception", |
+ 6: "running with filter %S and $genericblock exception", |
+ 7: "running with filter %S$domain=127.0.0.1 and $genericblock exception", |
+ 8: "running with filter %S and $genericblock,sitekey exception" |
}; |
for (let test = 0; test < tests.length; test++) |