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

Unified Diff: test/elemHide.js

Issue 29375915: Issue 4878 - Start using ESLint for adblockpluscore (Closed)
Patch Set: Removed unused imports Created March 15, 2017, 3:11 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/domainRestrictions.js ('k') | test/elemHideEmulation.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/elemHide.js
diff --git a/test/elemHide.js b/test/elemHide.js
index 93da5790bae3db70ff919cbcd51b9db68108385f..b0e7ab5802e5a6dd6b13db346144bdc89dee3f25 100644
--- a/test/elemHide.js
+++ b/test/elemHide.js
@@ -17,7 +17,7 @@
"use strict";
-let {createSandbox} = require("./_common");
+const {createSandbox} = require("./_common");
let ElemHide = null;
let Filter = null;
@@ -37,9 +37,9 @@ function normalizeSelectors(selectors)
{
// getSelectorsForDomain is currently allowed to return duplicate selectors
// for performance reasons, so we need to remove duplicates here.
- return selectors.sort().filter((selector, index, selectors) =>
+ return selectors.sort().filter((selector, index, sortedSelectors) =>
{
- return index == 0 || selector != selectors[index - 1];
+ return index == 0 || selector != sortedSelectors[index - 1];
});
}
@@ -215,7 +215,7 @@ exports.testGetSelectorsForDomain = function(test)
testResult(test, "foo.com", [], ElemHide.SPECIFIC_ONLY);
// Note: We don't take care to track conditional selectors which became
// unconditional when a filter was removed. This was too expensive.
- //testResult(test, "foo.com", [], ElemHide.NO_UNCONDITIONAL);
+ // testResult(test, "foo.com", [], ElemHide.NO_UNCONDITIONAL);
testResult(test, "foo.com", ["hello"], ElemHide.ALL_MATCHING);
testResult(test, "foo.com", ["hello"]);
testResult(test, "bar.com", [], ElemHide.SPECIFIC_ONLY);
« no previous file with comments | « test/domainRestrictions.js ('k') | test/elemHideEmulation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld