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

Delta Between Two Patch Sets: test/elemHide.js

Issue 29587914: Issue 5142 - Convert Element Hiding to C++ (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Use withNAD in the test. Created Jan. 25, 2018, 3:11 p.m.
Right Patch Set: mFiltersByDomain is now an OwnedStringMap Created Jan. 26, 2018, 8:41 p.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 | « meson.build ('k') | test/elemHideEmulation.js » ('j') | 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 testResult(test, elemHide, "foo.com", ["hello"]); 247 testResult(test, elemHide, "foo.com", ["hello"]);
248 removeFilter("##hello"); 248 removeFilter("##hello");
249 testResult(test, elemHide, "foo.com", ["hello"]); 249 testResult(test, elemHide, "foo.com", ["hello"]);
250 removeFilter("foo.com##hello"); 250 removeFilter("foo.com##hello");
251 testResult(test, elemHide, "foo.com", []); 251 testResult(test, elemHide, "foo.com", []);
252 })(ElemHide.create()); 252 })(ElemHide.create());
253 253
254 test.done(); 254 test.done();
255 }; 255 };
256 256
257 exports.testZeroFilterKey = function(test) 257 exports.testFilterException = function(test)
258 { 258 {
259 withNAD([0, 1, 2], (elemHide, filter1, filter2) => 259 withNAD([0, 1, 2], (elemHide, filter, exception) =>
260 { 260 {
261 elemHide.add(filter1); 261 elemHide.add(filter);
262 elemHide.add(filter2); 262 elemHide.add(exception);
263 testResult(test, elemHide, "foo.com", []); 263 testResult(test, elemHide, "foo.com", []);
264 testResult(test, elemHide, "bar.com", ["test"]); 264 testResult(test, elemHide, "bar.com", ["test"]);
265 })(ElemHide.create(), Filter.fromText("##test"), Filter.fromText("foo.com#@#te st")); 265 })(ElemHide.create(), Filter.fromText("##test"), Filter.fromText("foo.com#@#te st"));
266 266
267 test.done(); 267 test.done();
268 }; 268 };
LEFTRIGHT

Powered by Google App Engine
This is Rietveld