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

Delta Between Two Patch Sets: test/elemHide.js

Issue 29790638: Noissue - Add criteria test for ~example.com##world (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Created May 26, 2018, 12:24 a.m.
Right Patch Set: Rebase Created June 5, 2018, 5:38 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 | « no previous file | 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 removeFilter("~foo.example.com,example.com##foo"); 173 removeFilter("~foo.example.com,example.com##foo");
174 174
175 // Test criteria 175 // Test criteria
176 addFilter("##hello"); 176 addFilter("##hello");
177 addFilter("~example.com##world"); 177 addFilter("~example.com##world");
178 addFilter("foo.com##specific"); 178 addFilter("foo.com##specific");
179 testResult(test, "foo.com", ["specific"], true); 179 testResult(test, "foo.com", ["specific"], true);
180 testResult(test, "foo.com", ["hello", "specific", "world"], false); 180 testResult(test, "foo.com", ["hello", "specific", "world"], false);
181 testResult(test, "foo.com", ["hello", "specific", "world"]); 181 testResult(test, "foo.com", ["hello", "specific", "world"]);
182 testResult(test, "foo.com.", ["hello", "specific", "world"]);
182 testResult(test, "example.com", [], true); 183 testResult(test, "example.com", [], true);
Manish Jethani 2018/05/26 00:26:33 Surely the purpose of adding the filter ~example.c
183 removeFilter("foo.com##specific"); 184 removeFilter("foo.com##specific");
184 removeFilter("~example.com##world"); 185 removeFilter("~example.com##world");
185 removeFilter("##hello"); 186 removeFilter("##hello");
186 testResult(test, "foo.com", []); 187 testResult(test, "foo.com", []);
187 188
188 addFilter("##hello"); 189 addFilter("##hello");
189 testResult(test, "foo.com", [], true); 190 testResult(test, "foo.com", [], true);
190 testResult(test, "foo.com", ["hello"], false); 191 testResult(test, "foo.com", ["hello"], false);
191 testResult(test, "foo.com", ["hello"]); 192 testResult(test, "foo.com", ["hello"]);
192 testResult(test, "bar.com", [], true); 193 testResult(test, "bar.com", [], true);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 }; 233 };
233 234
234 exports.testZeroFilterKey = function(test) 235 exports.testZeroFilterKey = function(test)
235 { 236 {
236 ElemHide.add(Filter.fromText("##test")); 237 ElemHide.add(Filter.fromText("##test"));
237 ElemHide.add(Filter.fromText("foo.com#@#test")); 238 ElemHide.add(Filter.fromText("foo.com#@#test"));
238 testResult(test, "foo.com", []); 239 testResult(test, "foo.com", []);
239 testResult(test, "bar.com", ["test"]); 240 testResult(test, "bar.com", ["test"]);
240 test.done(); 241 test.done();
241 }; 242 };
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld