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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 testResult(test, elemHide, "foo.com", ["hello"]); | 247 testResult(test, elemHide, "foo.com", ["hello"]); |
248 removeFilter("##hello"); | 248 removeFilter("##hello"); |
249 testResult(test, elemHide, "foo.com", ["hello"]); | 249 testResult(test, elemHide, "foo.com", ["hello"]); |
250 removeFilter("foo.com##hello"); | 250 removeFilter("foo.com##hello"); |
251 testResult(test, elemHide, "foo.com", []); | 251 testResult(test, elemHide, "foo.com", []); |
252 })(ElemHide.create()); | 252 })(ElemHide.create()); |
253 | 253 |
254 test.done(); | 254 test.done(); |
255 }; | 255 }; |
256 | 256 |
257 exports.testZeroFilterKey = function(test) | 257 exports.testFilterException = function(test) |
258 { | 258 { |
259 withNAD([0, 1, 2], (elemHide, filter1, filter2) => | 259 withNAD([0, 1, 2], (elemHide, filter, exception) => |
260 { | 260 { |
261 elemHide.add(filter1); | 261 elemHide.add(filter); |
262 elemHide.add(filter2); | 262 elemHide.add(exception); |
263 testResult(test, elemHide, "foo.com", []); | 263 testResult(test, elemHide, "foo.com", []); |
264 testResult(test, elemHide, "bar.com", ["test"]); | 264 testResult(test, elemHide, "bar.com", ["test"]); |
265 })(ElemHide.create(), Filter.fromText("##test"), Filter.fromText("foo.com#@#te
st")); | 265 })(ElemHide.create(), Filter.fromText("##test"), Filter.fromText("foo.com#@#te
st")); |
266 | 266 |
267 test.done(); | 267 test.done(); |
268 }; | 268 }; |
LEFT | RIGHT |