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

Unified Diff: test/filterListener.js

Issue 29780560: Issue 6665 - Optimize element hiding emulation filter lookups (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created May 13, 2018, 7:28 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
« no previous file with comments | « lib/elemHideEmulation.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/filterListener.js
===================================================================
--- a/test/filterListener.js
+++ b/test/filterListener.js
@@ -27,17 +27,17 @@
let SpecialSubscription = null;
let ElemHideException = null;
exports.setUp = function(callback)
{
sandboxedRequire = createSandbox({
extraExports: {
elemHide: ["knownFilters"],
- elemHideEmulation: ["filters"]
+ elemHideEmulation: ["knownFilters"]
}
});
// 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");
(
@@ -86,17 +86,17 @@
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)
+ for (let {text: filterText} of elemHideEmulation.knownFilters)
result.elemhideemulation.push(filterText);
let types = ["blacklist", "whitelist", "elemhide", "elemhideexception",
"elemhideemulation"];
for (let type of types)
{
if (!(type in expected))
expected[type] = [];
« no previous file with comments | « lib/elemHideEmulation.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld