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

Unified Diff: test/filterClasses.js

Issue 29909555: Issue 7046 - Defer caching of domain maps (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Add @private tag Created Oct. 13, 2018, 11:16 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/filterClasses.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/filterClasses.js
===================================================================
--- a/test/filterClasses.js
+++ b/test/filterClasses.js
@@ -600,16 +600,19 @@
"http://example.com/?"
);
test.done();
};
exports.testDomainMapDeduplication = function(test)
{
+ // Make sure the generated domain map is cached on first access.
+ ActiveFilter.prototype._domainsAccessCount = Infinity;
+
let filter1 = Filter.fromText("example.com##.foo");
let filter2 = Filter.fromText("example.com##.bar");
// This compares the references to make sure that both refer to the same
// object (#6815).
test.equal(filter1.domains, filter2.domains);
let filter3 = Filter.fromText("www.example.com##.bar");
« no previous file with comments | « lib/filterClasses.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld