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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 test.done(); | 438 test.done(); |
439 }; | 439 }; |
440 | 440 |
441 exports.testElemHideRulesWithBraces = function(test) | 441 exports.testElemHideRulesWithBraces = function(test) |
442 { | 442 { |
443 compareFilter( | 443 compareFilter( |
444 test, "###foo{color: red}", [ | 444 test, "###foo{color: red}", [ |
445 "type=elemhide", | 445 "type=elemhide", |
446 "text=###foo{color: red}", | 446 "text=###foo{color: red}", |
447 "selectorDomains=", | 447 "selectorDomains=", |
448 "selector=#foo\\7B color: red\\7D ", | 448 "selector=#foo{color: red}", |
449 "domains=" | 449 "domains=" |
450 ] | 450 ] |
451 ); | 451 ); |
452 compareFilter( | 452 compareFilter( |
453 test, "foo.com#?#:-abp-properties(/margin: [3-4]{2}/)", [ | 453 test, "foo.com#?#:-abp-properties(/margin: [3-4]{2}/)", [ |
454 "type=elemhideemulation", | 454 "type=elemhideemulation", |
455 "text=foo.com#?#:-abp-properties(/margin: [3-4]{2}/)", | 455 "text=foo.com#?#:-abp-properties(/margin: [3-4]{2}/)", |
456 "selectorDomains=foo.com", | 456 "selectorDomains=foo.com", |
457 "selector=:-abp-properties(/margin: [3-4]\\7B 2\\7D /)", | 457 "selector=:-abp-properties(/margin: [3-4]{2}/)", |
458 "domains=foo.com" | 458 "domains=foo.com" |
459 ] | 459 ] |
460 ); | 460 ); |
461 test.done(); | 461 test.done(); |
462 }; | 462 }; |
463 | 463 |
464 exports.testSnippetFilters = function(test) | 464 exports.testSnippetFilters = function(test) |
465 { | 465 { |
466 compareFilter(test, "foo.com#$#abc", ["type=snippet", "text=foo.com#$#abc", "s
criptDomains=foo.com", "script=abc", "domains=foo.com"]); | 466 compareFilter(test, "foo.com#$#abc", ["type=snippet", "text=foo.com#$#abc", "s
criptDomains=foo.com", "script=abc", "domains=foo.com"]); |
467 compareFilter(test, "foo.com,~bar.com#$#abc", ["type=snippet", "text=foo.com,~
bar.com#$#abc", "scriptDomains=foo.com", "script=abc", "domains=foo.com|~bar.com
"]); | 467 compareFilter(test, "foo.com,~bar.com#$#abc", ["type=snippet", "text=foo.com,~
bar.com#$#abc", "scriptDomains=foo.com", "script=abc", "domains=foo.com|~bar.com
"]); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 | 643 |
644 test.notEqual(filter2.domains, filter5.domains); | 644 test.notEqual(filter2.domains, filter5.domains); |
645 | 645 |
646 // Check twice for element hiding filters to make sure the internal cached | 646 // Check twice for element hiding filters to make sure the internal cached |
647 // values are also not equal. | 647 // values are also not equal. |
648 test.notEqual(filter4.domains, filter6.domains); | 648 test.notEqual(filter4.domains, filter6.domains); |
649 test.notEqual(filter4.domains, filter6.domains); | 649 test.notEqual(filter4.domains, filter6.domains); |
650 | 650 |
651 test.done(); | 651 test.done(); |
652 }; | 652 }; |
OLD | NEW |