| LEFT | RIGHT |
| 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 28 matching lines...) Expand all Loading... |
| 39 callback(); | 39 callback(); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 function addListener(listener) | 42 function addListener(listener) |
| 43 { | 43 { |
| 44 let makeWrapper = name => (...args) => listener(name, ...args); | 44 let makeWrapper = name => (...args) => listener(name, ...args); |
| 45 | 45 |
| 46 filterNotifier.on("subscription.added", makeWrapper("subscription.added")); | 46 filterNotifier.on("subscription.added", makeWrapper("subscription.added")); |
| 47 filterNotifier.on("subscription.removed", | 47 filterNotifier.on("subscription.removed", |
| 48 makeWrapper("subscription.removed")); | 48 makeWrapper("subscription.removed")); |
| 49 filterNotifier.on("subscription.moved", makeWrapper("subscription.moved")); | |
| 50 | 49 |
| 51 filterNotifier.on("filter.added", makeWrapper("filter.added")); | 50 filterNotifier.on("filter.added", makeWrapper("filter.added")); |
| 52 filterNotifier.on("filter.removed", makeWrapper("filter.removed")); | 51 filterNotifier.on("filter.removed", makeWrapper("filter.removed")); |
| 53 filterNotifier.on("filter.moved", makeWrapper("filter.moved")); | 52 filterNotifier.on("filter.moved", makeWrapper("filter.moved")); |
| 54 | 53 |
| 55 filterNotifier.on("filter.hitCount", makeWrapper("filter.hitCount")); | 54 filterNotifier.on("filter.hitCount", makeWrapper("filter.hitCount")); |
| 56 filterNotifier.on("filter.lastHit", makeWrapper("filter.lastHit")); | 55 filterNotifier.on("filter.lastHit", makeWrapper("filter.lastHit")); |
| 57 } | 56 } |
| 58 | 57 |
| 59 function compareSubscriptionList(test, testMessage, list, | 58 function compareSubscriptionList(test, testMessage, list, |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 compareFilterSubscriptions(test, "filter3 subscriptions after updating http://
test3/ filters", filter3, [subscription2]); | 500 compareFilterSubscriptions(test, "filter3 subscriptions after updating http://
test3/ filters", filter3, [subscription2]); |
| 502 | 501 |
| 503 FilterStorage.removeSubscription(subscription3); | 502 FilterStorage.removeSubscription(subscription3); |
| 504 | 503 |
| 505 compareFilterSubscriptions(test, "filter1 subscriptions after removing http://
test3/", filter1, []); | 504 compareFilterSubscriptions(test, "filter1 subscriptions after removing http://
test3/", filter1, []); |
| 506 compareFilterSubscriptions(test, "filter2 subscriptions after removing http://
test3/", filter2, [subscription2]); | 505 compareFilterSubscriptions(test, "filter2 subscriptions after removing http://
test3/", filter2, [subscription2]); |
| 507 compareFilterSubscriptions(test, "filter3 subscriptions after removing http://
test3/", filter3, [subscription2]); | 506 compareFilterSubscriptions(test, "filter3 subscriptions after removing http://
test3/", filter3, [subscription2]); |
| 508 | 507 |
| 509 test.done(); | 508 test.done(); |
| 510 }; | 509 }; |
| LEFT | RIGHT |