Index: test/filterListener.js |
=================================================================== |
--- a/test/filterListener.js |
+++ b/test/filterListener.js |
@@ -24,22 +24,17 @@ |
let Subscription = null; |
let Filter = null; |
let defaultMatcher = null; |
let SpecialSubscription = null; |
let ElemHideException = null; |
exports.setUp = function(callback) |
{ |
- sandboxedRequire = createSandbox({ |
- extraExports: { |
- elemHide: ["knownFilters"], |
- elemHideEmulation: ["filters"] |
- } |
- }); |
+ sandboxedRequire = createSandbox(); |
// We need to require the filterListener module so that filter changes will be |
// noticed, even though we don't directly use the module here. |
sandboxedRequire("../lib/filterListener"); |
( |
{FilterStorage} = sandboxedRequire("../lib/filterStorage"), |
{Subscription, SpecialSubscription} = sandboxedRequire("../lib/subscriptionClasses"), |
@@ -76,28 +71,28 @@ |
} |
} |
result[type] = filters; |
} |
let elemHide = sandboxedRequire("../lib/elemHide"); |
result.elemhide = []; |
result.elemhideexception = []; |
- for (let filter of elemHide.knownFilters) |
+ for (let filter of elemHide.ElemHide._knownFilters) |
{ |
if (filter instanceof ElemHideException) |
result.elemhideexception.push(filter.text); |
else |
result.elemhide.push(filter.text); |
} |
let elemHideEmulation = sandboxedRequire("../lib/elemHideEmulation"); |
result.elemhideemulation = []; |
- for (let filterText of elemHideEmulation.filters) |
- result.elemhideemulation.push(filterText); |
+ for (let filter of elemHideEmulation.ElemHideEmulation._knownFilters) |
+ result.elemhideemulation.push(filter.text); |
let types = ["blacklist", "whitelist", "elemhide", "elemhideexception", |
"elemhideemulation"]; |
for (let type of types) |
{ |
if (!(type in expected)) |
expected[type] = []; |
else |