Index: test/filterClasses.js |
diff --git a/test/filterClasses.js b/test/filterClasses.js |
index a25d7673d0c44e0c3fbf771d400644ef83d00e16..03a46b3c13dee9cb1de49d16632e80d1399c50ce 100644 |
--- a/test/filterClasses.js |
+++ b/test/filterClasses.js |
@@ -17,11 +17,14 @@ |
"use strict"; |
+let {createSandbox} = require("common"); |
+let sandboxedRequire = createSandbox(); |
+ |
let { |
Filter, InvalidFilter, CommentFilter, ActiveFilter, RegExpFilter, |
BlockingFilter, WhitelistFilter, ElemHideBase, ElemHideFilter, |
ElemHideException, CSSPropertyFilter |
-} = require("../lib/filterClasses"); |
+} = sandboxedRequire("filterClasses"); |
function serializeFilter(filter) |
{ |
@@ -244,7 +247,7 @@ exports.testFiltersWithState = function(test) |
test.done(); |
}; |
-let t = RegExpFilter.typeMap; |
+let t = require("filterClasses").RegExpFilter.typeMap; |
let defaultTypes = 0x7FFFFFFF & ~(t.ELEMHIDE | t.DOCUMENT | t.POPUP | t.GENERICHIDE | t.GENERICBLOCK); |
Wladimir Palant
2016/09/30 09:37:54
This needs to go into a function, called from the
kzar
2016/10/03 13:46:15
Done, well kinda. I simply moved this into setUp.
|
exports.testSpecialCharacters = function(test) |