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

Unified Diff: test/elemHideEmulation.js

Issue 29375915: Issue 4878 - Start using ESLint for adblockpluscore (Closed)
Patch Set: Rebased Created March 10, 2017, 7:02 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 | « test/elemHide.js ('k') | test/filterClasses.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/elemHideEmulation.js
diff --git a/test/elemHideEmulation.js b/test/elemHideEmulation.js
index 342be885e12fb631956759f9d82dfce667340eeb..b00ac8591f843aa723425e7f6e3d4e4839518e16 100644
--- a/test/elemHideEmulation.js
+++ b/test/elemHideEmulation.js
@@ -17,7 +17,7 @@
"use strict";
-let {createSandbox} = require("./_common");
+const {createSandbox} = require("./_common");
let ElemHideEmulationFilter = null;
let ElemHideEmulation = null;
@@ -60,36 +60,46 @@ exports.testDomainRestrictions = function(test)
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']"]
);
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']"]
);
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']"]
);
@@ -102,7 +112,7 @@ exports.testElemHideEmulationFiltersContainer = function(test)
function compareRules(description, domain, expectedMatches)
{
let result = ElemHideEmulation.getRulesForDomain(domain)
- .map((filter) => filter.text);
+ .map(filter => filter.text);
expectedMatches = expectedMatches.map(filter => filter.text);
test.deepEqual(result.sort(), expectedMatches.sort(), description);
}
« no previous file with comments | « test/elemHide.js ('k') | test/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld