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

Unified Diff: test/elemHideEmulation.js

Issue 29453590: Issue 5287 - Change syntax for element hiding emulation filters and remove simplified element hidin… (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created June 1, 2017, 12:01 p.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
Index: test/elemHideEmulation.js
===================================================================
--- a/test/elemHideEmulation.js
+++ b/test/elemHideEmulation.js
@@ -56,57 +56,57 @@ exports.testDomainRestrictions = functio
ElemHideEmulation.clear();
ElemHide.clear();
}
testSelectorMatches(
"Ignore generic filters",
[
- "##[-abp-properties='foo']", "example.com##[-abp-properties='foo']",
- "~example.com##[-abp-properties='foo']"
+ "#?#:-abp-properties(foo)", "example.com#?#:-abp-properties(foo)",
+ "~example.com#?#:-abp-properties(foo)"
],
"example.com",
- ["example.com##[-abp-properties='foo']"]
+ ["example.com#?#:-abp-properties(foo)"]
);
testSelectorMatches(
"Ignore selectors with exceptions",
[
- "example.com##[-abp-properties='foo']",
- "example.com##[-abp-properties='bar']",
- "example.com#@#[-abp-properties='foo']"
+ "example.com#?#:-abp-properties(foo)",
+ "example.com#?#:-abp-properties(bar)",
+ "example.com#@#:-abp-properties(foo)"
],
"example.com",
- ["example.com##[-abp-properties='bar']"]
+ ["example.com#?#:-abp-properties(bar)"]
);
testSelectorMatches(
"Ignore filters that include parent domain but exclude subdomain",
[
- "~www.example.com,example.com##[-abp-properties='foo']"
+ "~www.example.com,example.com#?#:-abp-properties(foo)"
],
"www.example.com",
[]
);
testSelectorMatches(
"Ignore filters with parent domain if exception matches subdomain",
[
- "www.example.com#@#[-abp-properties='foo']",
- "example.com##[-abp-properties='foo']"
+ "www.example.com#@#:-abp-properties(foo)",
+ "example.com#?#:-abp-properties(foo)"
],
"www.example.com",
[]
);
testSelectorMatches(
"Ignore filters for other subdomain",
[
- "www.example.com##[-abp-properties='foo']",
- "other.example.com##[-abp-properties='foo']"
+ "www.example.com#?#:-abp-properties(foo)",
+ "other.example.com#?#:-abp-properties(foo)"
],
"other.example.com",
- ["other.example.com##[-abp-properties='foo']"]
+ ["other.example.com#?#:-abp-properties(foo)"]
);
test.done();
};
exports.testElemHideEmulationFiltersContainer = function(test)
{
function compareRules(description, domain, expectedMatches)
« no previous file with comments | « test/domainRestrictions.js ('k') | test/filterClasses.js » ('j') | test/filterClasses.js » ('J')

Powered by Google App Engine
This is Rietveld