Index: test/abp2blocklist.js |
=================================================================== |
--- a/test/abp2blocklist.js |
+++ b/test/abp2blocklist.js |
@@ -82,18 +82,17 @@ |
test.done(); |
}, |
testRequestFilters: function(test) |
{ |
testRules(test, ["/foo", "||test.com", "http://example.com/foo"], [ |
{trigger: {"url-filter": "^https?://.*/foo", |
"resource-type": ["image", "style-sheet", "script", "font", |
- "media", "raw", "document"], |
- "unless-top-url": ["^https?://.*/foo"]}, |
+ "media", "raw"]}, |
action: {type: "block"}}, |
{trigger: {"url-filter": "^https?://([^/]+\\.)?test\\.com", |
"url-filter-is-case-sensitive": true, |
"resource-type": ["image", "style-sheet", "script", "font", |
"media", "raw", "document"], |
"unless-top-url": ["^https?://([^/]+\\.)?test\\.com"], |
"top-url-filter-is-case-sensitive": true}, |
action: {type: "block"}}, |
@@ -217,32 +216,31 @@ |
testRequestTypeMapping: function(test) |
{ |
testRules( |
test, |
["1", "2$image", "3$stylesheet", "4$script", "5$font", "6$media", |
"7$popup", "8$object", "9$object_subrequest", "10$xmlhttprequest", |
"11$ping", "12$subdocument", "13$other", "14$IMAGE", |
"15$script,PING,Popup", "16$~image"], |
- [["image", "style-sheet", "script", "font", "media", "raw", "document" ], |
+ [["image", "style-sheet", "script", "font", "media", "raw"], |
["image"], |
["style-sheet"], |
["script"], |
["font"], |
["media"], |
["popup"], |
["media"], |
["raw"], |
["raw"], |
["raw"], |
- ["document"], |
["raw"], |
["image"], |
["script", "popup", "raw" ], |
- ["style-sheet", "script", "font", "media", "raw", "document"]], |
+ ["style-sheet", "script", "font", "media", "raw"]], |
rules => rules.map(rule => rule.trigger["resource-type"]) |
); |
test.done(); |
}, |
testUnsupportedfilters: function(test) |
{ |