| 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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 ["foo.com"], | 269 ["foo.com"], |
| 270 rules => rules[0]["trigger"]["if-domain"]); | 270 rules => rules[0]["trigger"]["if-domain"]); |
| 271 | 271 |
| 272 test.done(); | 272 test.done(); |
| 273 }, | 273 }, |
| 274 | 274 |
| 275 testUnicode: function(test) | 275 testUnicode: function(test) |
| 276 { | 276 { |
| 277 testRules(test, ["$domain=🐈.cat"], ["*xn--zn8h.cat"], | 277 testRules(test, ["$domain=🐈.cat"], ["*xn--zn8h.cat"], |
| 278 rules => rules[0]["trigger"]["if-domain"]); | 278 rules => rules[0]["trigger"]["if-domain"]); |
| 279 testRules(test, ["🐈$domain=🐈.cat"], []); | 279 testRules(test, ["||🐈"], "^https?://([^/]+\\.)?xn--zn8h", |
| 280 rules => rules[0]["trigger"]["url-filter"]); |
| 281 testRules(test, ["🐈$domain=🐈.cat"], "^https?://.*%F0%9F%90%88", |
| 282 rules => rules[0]["trigger"]["url-filter"]); |
| 283 testRules(test, ["🐈%F0%9F%90%88$domain=🐈.cat"], |
| 284 "^https?://.*%F0%9F%90%88%F0%9F%90%88", |
| 285 rules => rules[0]["trigger"]["url-filter"]); |
| 280 testRules(test, ["###🐈"], []); | 286 testRules(test, ["###🐈"], []); |
| 281 | 287 |
| 282 test.done(); | 288 test.done(); |
| 283 } | 289 } |
| 284 }; | 290 }; |
| OLD | NEW |