Left: | ||
Right: |
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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
378 doTest(text.replace("##", "#@#"), selector, selectorDomain); | 378 doTest(text.replace("##", "#@#"), selector, selectorDomain); |
379 } | 379 } |
380 | 380 |
381 test.done(); | 381 test.done(); |
382 }; | 382 }; |
383 | 383 |
384 exports.testElemHideRulesWithBraces = function(test) | 384 exports.testElemHideRulesWithBraces = function(test) |
385 { | 385 { |
386 let filter = Filter.fromText("###foo{color: red}"); | 386 let filter = Filter.fromText("###foo{color: red}"); |
387 test.equal(filter.type, "elemhide"); | 387 test.equal(filter.type, "elemhide"); |
388 test.equal(filter.selector, "#foo\\x7B color: red\\x7D "); | 388 test.equal(filter.selector, "#foo\\7B color: red\\7D "); |
389 filter.delete(); | 389 filter.delete(); |
390 | 390 |
391 filter = Filter.fromText("foo.com##[-abp-properties='/margin: [3-4]{2}/']"); | 391 filter = Filter.fromText("foo.com##[-abp-properties='/margin: [3-4]{2}/']"); |
hub
2017/10/16 18:39:43
we don't handle the new syntax yet.
Wladimir Palant
2017/10/17 10:24:33
Feel free to file an issue for that.
hub
2017/10/17 19:22:18
Filed https://issues.adblockplus.org/ticket/5870
| |
392 test.equal(filter.type, "elemhideemulation"); | 392 test.equal(filter.type, "elemhideemulation"); |
393 test.equal(filter.selector, "[-abp-properties='/margin: [3-4]\\x7B 2\\x7D /']" ); | 393 test.equal(filter.selector, "[-abp-properties='/margin: [3-4]\\7B 2\\7D /']"); |
394 filter.delete(); | 394 filter.delete(); |
395 | 395 |
396 test.done(); | 396 test.done(); |
397 }; | 397 }; |
398 | 398 |
399 exports.testNotifications = function(test) | 399 exports.testNotifications = function(test) |
400 { | 400 { |
401 function checkNotifications(action, expected, message) | 401 function checkNotifications(action, expected, message) |
402 { | 402 { |
403 let result = null; | 403 let result = null; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
446 filter.hitCount++; | 446 filter.hitCount++; |
447 }, ["filter.hitCount", "foobar"], "Increasing filter hit counts"); | 447 }, ["filter.hitCount", "foobar"], "Increasing filter hit counts"); |
448 checkNotifications(() => | 448 checkNotifications(() => |
449 { | 449 { |
450 filter.hitCount = 0; | 450 filter.hitCount = 0; |
451 }, ["filter.hitCount", "foobar"], "Resetting filter hit counts"); | 451 }, ["filter.hitCount", "foobar"], "Resetting filter hit counts"); |
452 | 452 |
453 filter.delete(); | 453 filter.delete(); |
454 test.done(); | 454 test.done(); |
455 }; | 455 }; |
LEFT | RIGHT |