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

Unified Diff: test/filterClasses.js

Issue 29573044: Issue 5147 - Invalidate wrapper on delete (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: tweaked the test. Created Oct. 11, 2017, 2:46 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 | « compiled/bindings/generator.cpp ('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
@@ -157,16 +157,21 @@
let filter2 = Filter.fromText("someknownfilter");
test.equal(filter2.hitCount, 432, "Known filter returned");
filter2.hitCount = 234;
test.equal(filter1.hitCount, 234, "Changing second wrapper modifies original as well");
filter1.delete();
+
+ test.throws(() => { filter1.delete(); });
+ test.throws(() => { filter1.hitCount; });
+ test.throws(() => { filter1._pointer; });
+
filter2.delete();
let filter3 = Filter.fromText("someknownfilter");
test.equal(filter3.hitCount, 0, "Filter data has been reset once previous instances have been released");
filter3.delete();
test.done();
};
« no previous file with comments | « compiled/bindings/generator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld