Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: test/filterClasses.js

Issue 29680684: [$csp1 adblockpluscore] Issue 6329 - Allow whitespace in filter option values (Closed)
Left Patch Set: Created Jan. 26, 2018, 5:32 p.m.
Right Patch Set: Addressed some of Manish's initial feedback Created Feb. 13, 2018, 11:55 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « lib/synchronizer.js ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 "type=elemhideemulation", 400 "type=elemhideemulation",
401 "text=foo.com#?#:-abp-properties(/margin: [3-4]{2}/)", 401 "text=foo.com#?#:-abp-properties(/margin: [3-4]{2}/)",
402 "selectorDomain=foo.com", 402 "selectorDomain=foo.com",
403 "selector=:-abp-properties(/margin: [3-4]\\7B 2\\7D /)", 403 "selector=:-abp-properties(/margin: [3-4]\\7B 2\\7D /)",
404 "domains=FOO.COM" 404 "domains=FOO.COM"
405 ] 405 ]
406 ); 406 );
407 test.done(); 407 test.done();
408 }; 408 };
409 409
410 exports.testFilterNormalisation = function(test) 410 exports.testFilterNormalization = function(test)
411 { 411 {
412 compareFilter(test, Filter.stripJunk(" domain.c om## #sele ctor "), [ 412 compareFilter(test, Filter.stripJunk(" domain.c om## #sele ctor "), [
413 "type=elemhide", 413 "type=elemhide",
414 "text=domain.com###sele ctor", 414 "text=domain.com###sele ctor",
415 "selectorDomain=domain.com", 415 "selectorDomain=domain.com",
416 "selector=#sele ctor", 416 "selector=#sele ctor",
417 "domains=DOMAIN.COM" 417 "domains=DOMAIN.COM"
418 ]); 418 ]);
419 compareFilter(test, Filter.stripJunk(" ! fo o## bar "), [ 419 compareFilter(test, Filter.stripJunk(" ! fo o## bar "), [
420 "type=comment", "text=! fo o## bar" 420 "type=comment", "text=! fo o## bar"
421 ]); 421 ]);
422 compareFilter(test, Filter.stripJunk(" bl a$sitekey= foo ,domain= do ma in.com |foo .com "), [ 422 compareFilter(test, Filter.stripJunk(" bl a$sitekey= foo ,domain= do ma in.com |foo .com "), [
423 "type=filterlist", 423 "type=filterlist",
424 "text=bla$sitekey=foo,domain=domain.com|foo.com", 424 "text=bla$sitekey=foo,domain=domain.com|foo.com",
425 "regexp=bla", 425 "regexp=bla",
426 "sitekeys=FOO", 426 "sitekeys=FOO",
427 "domains=DOMAIN.COM|FOO.COM" 427 "domains=DOMAIN.COM|FOO.COM"
428 ]); 428 ]);
429 compareFilter(test, Filter.stripJunk(" @@bl a$foo= bar ,domain = ab cd "), [ 429 compareFilter(test, Filter.stripJunk(" @@bl a$foo= bar ,domain = ab cd "), [
430 "type=invalid", 430 "type=invalid",
431 "text=@@bla$invalid=foo,domain=abcd", 431 "text=@@bla$invalid=foo,domain=abcd",
432 "reason=filter_unknown_option" 432 "reason=filter_unknown_option"
433 ]); 433 ]);
434 434
435 test.done(); 435 test.done();
436 }; 436 };
LEFTRIGHT

Powered by Google App Engine
This is Rietveld