| Index: chrome/content/tests/elemhide.js |
| diff --git a/chrome/content/tests/elemhide.js b/chrome/content/tests/elemhide.js |
| index c1b9d7a6c9433e8b1826bbf6fdd2587a6953db57..f1cca9b73d9f150fa264acf446208521ce334d3b 100644 |
| --- a/chrome/content/tests/elemhide.js |
| +++ b/chrome/content/tests/elemhide.js |
| @@ -106,6 +106,13 @@ |
| [["localhost.###test1"], ["visible", "visible"]], |
| [["localhost.,localhost###test1"], ["hidden", "visible"]], |
| [["localhost.,foo.###test1"], ["visible", "visible"]], |
| + |
| + [["#div(test1)", "@@localhost$generichide"], ["visible", "visible"]], |
| + [["#div(test1)", "@@localhost$genericblock"], ["hidden", "visible"]], |
| + [["localhost#div(test1)", "@@localhost$generichide"], ["hidden", "visible"]], |
| + [["~example.com#div(test1)", "@@localhost$generichide"], ["visible", "visible"]], |
| + [["~example.com#div(test1)", "@@localhost$genericblock"], ["hidden", "visible"]], |
| + [["~example.com,localhost#div(test1)", "@@localhost$generichide"], ["hidden", "visible"]], |
| ]; |
| function runTest([filters, expected], stage) |
| @@ -138,11 +145,15 @@ |
| }); |
| }, false, true); |
| frame.setAttribute("src", "http://localhost:1234/test"); |
| - } |
| - FilterNotifier.addListener(listener); |
| + }; |
| for (let filter of filters) |
| - ElemHide.add(Filter.fromText(filter)); |
| + if (filter.substr(0, 2) == "@@") |
|
Sebastian Noack
2015/03/19 11:58:49
How about using two seperate lists istead this ugl
kzar
2015/03/19 16:24:26
You're right the switch is a little ugly but the a
Sebastian Noack
2015/03/20 09:56:12
You are right, this seems to be consistent with ex
|
| + defaultMatcher.add(Filter.fromText(filter));//exception_filters.push(filter); |
|
Sebastian Noack
2015/03/19 11:58:49
I suppose you forgot to remove that comment?
kzar
2015/03/19 16:24:26
Done.
|
| + else |
| + ElemHide.add(Filter.fromText(filter)); |
| + |
| + FilterNotifier.addListener(listener); |
| ElemHide.isDirty = true; |
| ElemHide.apply(); |
| } |