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

Unified Diff: test/subscriptionClasses.js

Issue 29426559: Issue 5137 - [emscripten] Added basic filter storage implementation (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Improved type names and added finally block Created May 8, 2017, 12:53 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 | « test/filterStorage.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/subscriptionClasses.js
===================================================================
--- a/test/subscriptionClasses.js
+++ b/test/subscriptionClasses.js
@@ -116,25 +116,28 @@ exports.testDefaultSubscriptionIDs = fun
exports.testSubscriptionDefaults = function(test)
{
let tests = [
["blocking", "test"],
["whitelist", "@@test"],
["elemhide", "##test"],
["elemhide", "#@#test"],
["elemhide", "foo##[-abp-properties='foo']"],
- ["blocking", "!test"],
- ["blocking", "/??/"],
+ ["", "!test"],
+ ["", "/??/"],
["blocking whitelist", "test", "@@test"],
["blocking elemhide", "test", "##test"]
];
for (let [defaults, ...filters] of tests)
{
- compareSubscription(test, "~user~" + filters.join("~"), ["url=~user~" + filters.join("~"), "defaults= " + defaults], subscription =>
+ let expected = ["url=~user~" + filters.join("~")];
+ if (defaults)
+ expected.push("defaults= " + defaults);
+ compareSubscription(test, "~user~" + filters.join("~"), expected, subscription =>
{
for (let text of filters)
{
let filter = Filter.fromText(text);
subscription.makeDefaultFor(filter);
filter.delete();
}
});
« no previous file with comments | « test/filterStorage.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld