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

Unified Diff: test/filterClasses.js

Issue 29354864: Issue 4223 - Migrate some more of adblockplustests (Closed)
Patch Set: Migrate filterStorage tests Created Sept. 29, 2016, 7:24 p.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
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)

Powered by Google App Engine
This is Rietveld