| Index: test/browser/elemHideEmulation.js |
| =================================================================== |
| --- a/test/browser/elemHideEmulation.js |
| +++ b/test/browser/elemHideEmulation.js |
| @@ -524,16 +524,74 @@ |
| sibling: true, |
| sibling2: true, |
| toHide: true |
| }; |
| runTestPseudoClassHasSelectorWithHasAndWithSuffixSibling( |
| test, "div:-abp-has(> span:-abp-contains(Advertisment))", expectations); |
| }; |
| +// See issue https://issues.adblockplus.org/ticket/7359 |
|
Manish Jethani
2019/04/03 18:56:19
Shouldn't these rather be moved to the individual
|
| +// and issue https://issues.adblockplus.org/ticket/7428 |
| +async function runTestQualifier(test, selector) |
| +{ |
| + testDocument.body.innerHTML = ` |
| + <style> |
| + 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( |
|
Manish Jethani
2019/04/03 18:56:19
We could reference 7428 here.
hub
2019/04/03 19:57:40
Done.
|
| + test, |
| + "div:-abp-has(> a p > :-abp-properties(content: \"any\"))" |
| + ); |
| +}; |
| + |
| +exports.testPropertySelectorCombinatorQualifierNested = function(test) |
| +{ |
| + runTestQualifier( |
|
Manish Jethani
2019/04/03 18:56:19
We could reference 7359 here.
hub
2019/04/03 19:57:40
Done.
|
| + test, |
| + "div:-abp-has(> a p:-abp-has(> :-abp-properties(content: \"any\")))" |
| + ); |
| +}; |
| + |
| +// See issue https://issues.adblockplus.org/ticket/7400 |
| +exports.testPropertySelectorIdenticalTypeQualifier = function(test) |
| +{ |
| + runTestQualifier( |
| + test, |
| + "div:-abp-has(span:-abp-properties(content: \"any\"))" |
| + ); |
| +}; |
| + |
| +// See issue https://issues.adblockplus.org/ticket/7400 |
| +exports.testPropertySelectorIdenticalTypeQualifierNested = function(test) |
| +{ |
| + runTestQualifier( |
| + test, |
| + "div:-abp-has(p:-abp-has(span:-abp-properties(content: \"any\")))" |
| + ); |
| +}; |
| + |
| async function runTestPseudoClassContains(test, selector, expectations) |
| { |
| testDocument.body.innerHTML = `<div id="parent"> |
| <div id="middle"> |
| <div id="middle1"><div id="inside" class="inside"></div></div> |
| </div> |
| <div id="sibling"> |
| <div id="tohide">to hide \ud83d\ude42!</div> |