Index: test/elemHide.js |
=================================================================== |
--- a/test/elemHide.js |
+++ b/test/elemHide.js |
@@ -19,29 +19,29 @@ |
const {createSandbox} = require("./_common"); |
let ElemHide = null; |
let createStyleSheet = null; |
let rulesFromStyleSheet = null; |
let ElemHideExceptions = null; |
let Filter = null; |
-let filtersByDomain = null; |
+let filterTextByDomain = null; |
let selectorGroupSize = null; |
exports.setUp = function(callback) |
{ |
let sandboxedRequire = createSandbox({ |
extraExports: { |
- elemHide: ["filtersByDomain", "selectorGroupSize"] |
+ elemHide: ["filterTextByDomain", "selectorGroupSize"] |
} |
}); |
( |
- {ElemHide, createStyleSheet, rulesFromStyleSheet, |
- filtersByDomain, selectorGroupSize} = sandboxedRequire("../lib/elemHide"), |
+ {ElemHide, createStyleSheet, rulesFromStyleSheet, filterTextByDomain, |
+ selectorGroupSize} = sandboxedRequire("../lib/elemHide"), |
{ElemHideExceptions} = sandboxedRequire("../lib/elemHideExceptions"), |
{Filter} = sandboxedRequire("../lib/filterClasses") |
); |
callback(); |
}; |
function normalizeSelectors(selectors) |
@@ -260,32 +260,32 @@ |
ElemHideExceptions.add(Filter.fromText("foo.com#@#test")); |
testResult(test, "foo.com", []); |
testResult(test, "bar.com", ["test"]); |
test.done(); |
}; |
exports.testFiltersByDomain = function(test) |
{ |
- test.equal(filtersByDomain.size, 0); |
+ test.equal(filterTextByDomain.size, 0); |
ElemHide.add(Filter.fromText("##test")); |
- test.equal(filtersByDomain.size, 0); |
+ test.equal(filterTextByDomain.size, 0); |
ElemHide.add(Filter.fromText("example.com##test")); |
- test.equal(filtersByDomain.size, 1); |
+ test.equal(filterTextByDomain.size, 1); |
ElemHide.add(Filter.fromText("example.com,~www.example.com##test")); |
- test.equal(filtersByDomain.size, 2); |
+ test.equal(filterTextByDomain.size, 2); |
ElemHide.remove(Filter.fromText("example.com##test")); |
- test.equal(filtersByDomain.size, 2); |
+ test.equal(filterTextByDomain.size, 2); |
ElemHide.remove(Filter.fromText("example.com,~www.example.com##test")); |
- test.equal(filtersByDomain.size, 0); |
+ test.equal(filterTextByDomain.size, 0); |
test.done(); |
}; |
exports.testCreateStyleSheet = function(test) |
{ |
test.equal( |
createStyleSheet([ |