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

Side by Side Diff: test/elemHide.js

Issue 29356018: Issue 4450 - Prevent ElemHide filters with empty domains (Closed)
Patch Set: Created Oct. 5, 2016, 2:24 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 testResult("foo.com", []); 234 testResult("foo.com", []);
235 235
236 addFilter("##hello"); 236 addFilter("##hello");
237 addFilter("foo.com##hello"); 237 addFilter("foo.com##hello");
238 testResult("foo.com", ["hello"]); 238 testResult("foo.com", ["hello"]);
239 removeFilter("##hello"); 239 removeFilter("##hello");
240 testResult("foo.com", ["hello"]); 240 testResult("foo.com", ["hello"]);
241 removeFilter("foo.com##hello"); 241 removeFilter("foo.com##hello");
242 testResult("foo.com", []); 242 testResult("foo.com", []);
243 243
244 // Advanced filter keys test
245 testResult("", []);
246 addFilter("##dupe");
247 addFilter(",,##dupe");
248 addFilter(",,,##dupe");
249 addFilter("foo.com##dupe");
250 testResult("", ["dupe"]);
251 removeFilter(",,,##dupe");
252 testResult("", ["dupe"]);
253 removeFilter("foo.com##dupe");
254 testResult("", ["dupe"]);
255 removeFilter(",,##dupe");
256 testResult("", ["dupe"]);
257 removeFilter("##dupe");
258 testResult("", []);
259
260 test.done(); 244 test.done();
261 }; 245 };
OLDNEW

Powered by Google App Engine
This is Rietveld