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

Side by Side Diff: test/filterStorage.js

Issue 29946572: Issue 7094 - Keep subscription filters by text only (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Rebase Created Feb. 16, 2019, 3:10 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/filterListener.js ('k') | test/subscriptionClasses.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 compareFilterSubscriptions(test, "filter1 subscriptions after adding http://te st2/", filter1, [subscription1]); 486 compareFilterSubscriptions(test, "filter1 subscriptions after adding http://te st2/", filter1, [subscription1]);
487 compareFilterSubscriptions(test, "filter2 subscriptions after adding http://te st2/", filter2, [subscription1, subscription2]); 487 compareFilterSubscriptions(test, "filter2 subscriptions after adding http://te st2/", filter2, [subscription1, subscription2]);
488 compareFilterSubscriptions(test, "filter3 subscriptions after adding http://te st2/", filter3, [subscription2]); 488 compareFilterSubscriptions(test, "filter3 subscriptions after adding http://te st2/", filter3, [subscription2]);
489 489
490 filterStorage.removeSubscription(subscription1); 490 filterStorage.removeSubscription(subscription1);
491 491
492 compareFilterSubscriptions(test, "filter1 subscriptions after removing http:// test1/", filter1, []); 492 compareFilterSubscriptions(test, "filter1 subscriptions after removing http:// test1/", filter1, []);
493 compareFilterSubscriptions(test, "filter2 subscriptions after removing http:// test1/", filter2, [subscription2]); 493 compareFilterSubscriptions(test, "filter2 subscriptions after removing http:// test1/", filter2, [subscription2]);
494 compareFilterSubscriptions(test, "filter3 subscriptions after removing http:// test1/", filter3, [subscription2]); 494 compareFilterSubscriptions(test, "filter3 subscriptions after removing http:// test1/", filter3, [subscription2]);
495 495
496 filterStorage.updateSubscriptionFilters(subscription3, [filter3]); 496 filterStorage.updateSubscriptionFilters(subscription3, [filter3.text]);
497 497
498 compareFilterSubscriptions(test, "filter1 subscriptions after updating http:// test3/ filters", filter1, []); 498 compareFilterSubscriptions(test, "filter1 subscriptions after updating http:// test3/ filters", filter1, []);
499 compareFilterSubscriptions(test, "filter2 subscriptions after updating http:// test3/ filters", filter2, [subscription2]); 499 compareFilterSubscriptions(test, "filter2 subscriptions after updating http:// test3/ filters", filter2, [subscription2]);
500 compareFilterSubscriptions(test, "filter3 subscriptions after updating http:// test3/ filters", filter3, [subscription2]); 500 compareFilterSubscriptions(test, "filter3 subscriptions after updating http:// test3/ filters", filter3, [subscription2]);
501 501
502 filterStorage.addSubscription(subscription3); 502 filterStorage.addSubscription(subscription3);
503 503
504 compareFilterSubscriptions(test, "filter1 subscriptions after adding http://te st3/", filter1, []); 504 compareFilterSubscriptions(test, "filter1 subscriptions after adding http://te st3/", filter1, []);
505 compareFilterSubscriptions(test, "filter2 subscriptions after adding http://te st3/", filter2, [subscription2]); 505 compareFilterSubscriptions(test, "filter2 subscriptions after adding http://te st3/", filter2, [subscription2]);
506 compareFilterSubscriptions(test, "filter3 subscriptions after adding http://te st3/", filter3, [subscription2, subscription3]); 506 compareFilterSubscriptions(test, "filter3 subscriptions after adding http://te st3/", filter3, [subscription2, subscription3]);
507 507
508 filterStorage.updateSubscriptionFilters(subscription3, [filter1, filter2]); 508 filterStorage.updateSubscriptionFilters(subscription3, [filter1.text, filter2. text]);
509 509
510 compareFilterSubscriptions(test, "filter1 subscriptions after updating http:// test3/ filters", filter1, [subscription3]); 510 compareFilterSubscriptions(test, "filter1 subscriptions after updating http:// test3/ filters", filter1, [subscription3]);
511 compareFilterSubscriptions(test, "filter2 subscriptions after updating http:// test3/ filters", filter2, [subscription2, subscription3]); 511 compareFilterSubscriptions(test, "filter2 subscriptions after updating http:// test3/ filters", filter2, [subscription2, subscription3]);
512 compareFilterSubscriptions(test, "filter3 subscriptions after updating http:// test3/ filters", filter3, [subscription2]); 512 compareFilterSubscriptions(test, "filter3 subscriptions after updating http:// test3/ filters", filter3, [subscription2]);
513 513
514 filterStorage.removeSubscription(subscription3); 514 filterStorage.removeSubscription(subscription3);
515 515
516 compareFilterSubscriptions(test, "filter1 subscriptions after removing http:// test3/", filter1, []); 516 compareFilterSubscriptions(test, "filter1 subscriptions after removing http:// test3/", filter1, []);
517 compareFilterSubscriptions(test, "filter2 subscriptions after removing http:// test3/", filter2, [subscription2]); 517 compareFilterSubscriptions(test, "filter2 subscriptions after removing http:// test3/", filter2, [subscription2]);
518 compareFilterSubscriptions(test, "filter3 subscriptions after removing http:// test3/", filter3, [subscription2]); 518 compareFilterSubscriptions(test, "filter3 subscriptions after removing http:// test3/", filter3, [subscription2]);
519 519
520 test.done(); 520 test.done();
521 }; 521 };
OLDNEW
« no previous file with comments | « test/filterListener.js ('k') | test/subscriptionClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld