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

Unified Diff: test/filterStorage_readwrite.js

Issue 29402582: Issue 5098 - Expose FilterStorage initialization state (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Fixed description Created April 5, 2017, 7:16 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
« no previous file with comments | « lib/filterStorage.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/filterStorage_readwrite.js
===================================================================
--- a/test/filterStorage_readwrite.js
+++ b/test/filterStorage_readwrite.js
@@ -105,22 +105,25 @@ function canonize(data)
});
return sections.map(
section => [section.header].concat(section.data).join("\n")
).join("\n");
}
function testReadWrite(test, withExternal)
{
+ test.ok(!FilterStorage.initialized, "Uninitialized before the first load");
+
return testData.then(data =>
{
dataFile.contents = data;
return loadFilters();
}).then(() =>
{
+ test.ok(FilterStorage.initialized, "Initialize after the first load");
test.equal(FilterStorage.fileProperties.version, FilterStorage.formatVersion, "File format version");
if (withExternal)
{
{
let subscription = new ExternalSubscription("~external~external subscription ID", "External subscription");
subscription.filters = [Filter.fromText("foo"), Filter.fromText("bar")];
FilterStorage.addSubscription(subscription);
« no previous file with comments | « lib/filterStorage.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld