| 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 27 matching lines...) Expand all Loading... |
| 38 .then(text => | 38 .then(text => |
| 39 { | 39 { |
| 40 let doc = new DOMParser().parseFromString(text, "application/xml"); | 40 let doc = new DOMParser().parseFromString(text, "application/xml"); |
| 41 let nodes = doc.getElementsByTagName("subscription"); | 41 let nodes = doc.getElementsByTagName("subscription"); |
| 42 | 42 |
| 43 let subs = chooseFilterSubscriptions(nodes); | 43 let subs = chooseFilterSubscriptions(nodes); |
| 44 assert.ok(subs); | 44 assert.ok(subs); |
| 45 assert.ok(subs.circumvention); | 45 assert.ok(subs.circumvention); |
| 46 assert.ok(subs.ads); | 46 assert.ok(subs.ads); |
| 47 | 47 |
| 48 assert.equal(subs.circumvention.getAttribute("prefixes"), "de,en,en-US")
; | 48 assert.equal(subs.circumvention.getAttribute("prefixes"), |
| 49 "de,en,en-US"); |
| 49 assert.equal(subs.circumvention.getAttribute("type"), "circumvention"); | 50 assert.equal(subs.circumvention.getAttribute("type"), "circumvention"); |
| 50 assert.equal(subs.ads.getAttribute("prefixes"), "en"); | 51 assert.equal(subs.ads.getAttribute("prefixes"), "en"); |
| 51 assert.equal(subs.ads.getAttribute("type"), "ads"); | 52 assert.equal(subs.ads.getAttribute("type"), "ads"); |
| 52 | 53 |
| 53 done(); | 54 done(); |
| 54 }) | 55 }) |
| 55 .catch(() => | 56 .catch(() => |
| 56 { | 57 { |
| 57 assert.ok(false); | 58 assert.ok(false); |
| 58 | 59 |
| 59 done(); | 60 done(); |
| 60 }); | 61 }); |
| 61 }); | 62 }); |
| 62 } | 63 } |
| LEFT | RIGHT |