| Index: test/browser/elemHideEmulation.js |
| =================================================================== |
| --- a/test/browser/elemHideEmulation.js |
| +++ b/test/browser/elemHideEmulation.js |
| @@ -524,16 +524,56 @@ |
| sibling: true, |
| sibling2: true, |
| toHide: true |
| }; |
| runTestPseudoClassHasSelectorWithHasAndWithSuffixSibling( |
| test, "div:-abp-has(> span:-abp-contains(Advertisment))", expectations); |
| }; |
| +// See issue https://issues.adblockplus.org/ticket/7359 |
| +// and issue https://issues.adblockplus.org/ticket/7428 |
| +async function runTestQualifier(test, selector) |
| +{ |
| + testDocument.body.innerHTML = ` |
| +<style> |
|
Manish Jethani
2019/04/03 17:09:30
Nit: We could just indent the HTML here for readab
hub
2019/04/03 17:59:59
Done.
|
| +span::before { |
| + content: "any"; |
| +} |
| +</style> |
| +<div id="toHide"> |
| + <a> |
| + <p> |
| + <span></span> |
| + </p> |
| + </a> |
| +</div> |
| +`; |
| + if (await applyElemHideEmulation(test, [selector])) |
| + expectHidden(test, testDocument.getElementById("toHide")); |
| + |
| + test.done(); |
| +} |
| + |
| +exports.testPropertySelectorCombinatorQualifier = function(test) |
| +{ |
| + runTestQualifier( |
| + test, |
| + "div:-abp-has(> a p > :-abp-properties(content: \"any\"))" |
| + ); |
| +}; |
| + |
| +exports.testPropertySelectorCombinatorQualifierNested = function(test) |
| +{ |
| + runTestQualifier( |
| + test, |
| + "div:-abp-has(> a p:-abp-has(> span:-abp-properties(content: \"any\")))" |
| + ); |
| +}; |
| + |
| async function runTestPseudoClassContains(test, selector, expectations) |
| { |
| testDocument.body.innerHTML = ` <style type="text/css"> |
| body { |
| margin: 0; |
| padding: 0; |
| } |
| .transparent { |