Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/elemHide.js

Issue 29773570: Issue 6652 - Implement fast selector lookups for unknown domains (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Clean up Created May 12, 2018, 9:24 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/elemHide.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/elemHide.js
===================================================================
--- a/test/elemHide.js
+++ b/test/elemHide.js
@@ -55,16 +55,25 @@
exports.testGetSelectorsForDomain = function(test)
{
let addFilter = filterText => ElemHide.add(Filter.fromText(filterText));
let removeFilter = filterText => ElemHide.remove(Filter.fromText(filterText));
testResult(test, "", []);
+ addFilter("##star");
+ testResult(test, "", ["star"]);
+ testResult(test, "example.com", ["star"]);
+ addFilter("~special.example.com#@#star");
+ testResult(test, "", []);
+ testResult(test, "example.com", []);
+ testResult(test, "special.example.com", ["star"]);
+ testResult(test, "other.example.com", []);
+
addFilter("~foo.example.com,example.com##foo");
testResult(test, "barfoo.example.com", ["foo"]);
testResult(test, "bar.foo.example.com", []);
testResult(test, "foo.example.com", []);
testResult(test, "example.com", ["foo"]);
testResult(test, "com", []);
testResult(test, "", []);
« no previous file with comments | « lib/elemHide.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld