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: Do not cache value for generic filters Created Oct. 14, 2018, 12:26 a.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
« lib/filterClasses.js ('K') | « 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._domainsAccessCacheThreshold = 0;
+
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");
« lib/filterClasses.js ('K') | « lib/filterClasses.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld