OLD | NEW |
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 for (let filter of elemHide.knownFilters) | 83 for (let filter of elemHide.knownFilters) |
84 result.elemhide.push(filter.text); | 84 result.elemhide.push(filter.text); |
85 | 85 |
86 let elemHideExceptions = sandboxedRequire("../lib/elemHideExceptions"); | 86 let elemHideExceptions = sandboxedRequire("../lib/elemHideExceptions"); |
87 result.elemhideexception = []; | 87 result.elemhideexception = []; |
88 for (let exception of elemHideExceptions.knownExceptions) | 88 for (let exception of elemHideExceptions.knownExceptions) |
89 result.elemhideexception.push(exception.text); | 89 result.elemhideexception.push(exception.text); |
90 | 90 |
91 let elemHideEmulation = sandboxedRequire("../lib/elemHideEmulation"); | 91 let elemHideEmulation = sandboxedRequire("../lib/elemHideEmulation"); |
92 result.elemhideemulation = []; | 92 result.elemhideemulation = []; |
93 for (let filterText of elemHideEmulation.filters) | 93 for (let filter of elemHideEmulation.filters) |
94 result.elemhideemulation.push(filterText); | 94 result.elemhideemulation.push(filter.text); |
95 | 95 |
96 let snippets = sandboxedRequire("../lib/snippets"); | 96 let snippets = sandboxedRequire("../lib/snippets"); |
97 result.snippets = []; | 97 result.snippets = []; |
98 for (let filterText of snippets.filters) | 98 for (let filter of snippets.filters) |
99 result.snippets.push(filterText); | 99 result.snippets.push(filter.text); |
100 | 100 |
101 let types = ["blacklist", "whitelist", "elemhide", "elemhideexception", | 101 let types = ["blacklist", "whitelist", "elemhide", "elemhideexception", |
102 "elemhideemulation", "snippets"]; | 102 "elemhideemulation", "snippets"]; |
103 for (let type of types) | 103 for (let type of types) |
104 { | 104 { |
105 if (!(type in expected)) | 105 if (!(type in expected)) |
106 expected[type] = []; | 106 expected[type] = []; |
107 else | 107 else |
108 expected[type].sort(); | 108 expected[type].sort(); |
109 result[type].sort(); | 109 result[type].sort(); |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 checkKnownFilters(test, "add special subscription with filter2", {snippets: [f
ilter1.text, filter2.text]}); | 356 checkKnownFilters(test, "add special subscription with filter2", {snippets: [f
ilter1.text, filter2.text]}); |
357 | 357 |
358 let subscription4 = Subscription.fromURL("https://easylist-downloads.adblockpl
us.org/abp-filters-anti-cv.txt"); | 358 let subscription4 = Subscription.fromURL("https://easylist-downloads.adblockpl
us.org/abp-filters-anti-cv.txt"); |
359 subscription4.filters = [filter3]; | 359 subscription4.filters = [filter3]; |
360 | 360 |
361 filterStorage.addSubscription(subscription4); | 361 filterStorage.addSubscription(subscription4); |
362 checkKnownFilters(test, "add ABP anti-circumvention subscription with filter3"
, {snippets: [filter1.text, filter2.text, filter3.text]}); | 362 checkKnownFilters(test, "add ABP anti-circumvention subscription with filter3"
, {snippets: [filter1.text, filter2.text, filter3.text]}); |
363 | 363 |
364 test.done(); | 364 test.done(); |
365 }; | 365 }; |
OLD | NEW |