| Index: test/browser/elemHideEmulation.js |
| =================================================================== |
| --- a/test/browser/elemHideEmulation.js |
| +++ b/test/browser/elemHideEmulation.js |
| @@ -524,16 +524,60 @@ |
| 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 11:15:58
Shouldn't this be 7400?
hub
2019/04/03 16:30:07
The test is actually all based on issue #7359. It
Manish Jethani
2019/04/03 17:09:30
Sorry, isn't the second test here affected by 7400
Manish Jethani
2019/04/03 17:26:53
OK, I looked at 7359 again. The only thing it adds
Manish Jethani
2019/04/03 17:28:49
Misspoke, of course the `>span` case is valid only
|
| +// and issue https://issues.adblockplus.org/ticket/7428 |
| +async function runTestCombinatorQualifier(test, selector) |
|
Manish Jethani
2019/04/03 11:15:58
I think what you mean is `runTestCompoundQualifier
hub
2019/04/03 16:30:07
Done.
|
| +{ |
| + testDocument.body.innerHTML = ` |
| +<style> |
| +span::before { |
| + content: "any"; |
| +} |
| +</style> |
| +<div id="toHide"> |
| + <a> |
|
Manish Jethani
2019/04/03 11:15:58
Nit: It is more natural if `<a>` occurs with the `
hub
2019/04/03 16:30:07
if everything was done in a "natural way", lot of
Manish Jethani
2019/04/03 16:40:02
Fair enough :)
|
| + <p> |
| + <span></span> |
| + </p> |
| + </a> |
| +</div> |
| +`; |
| + if (await applyElemHideEmulation(test, [selector])) |
| + { |
|
Manish Jethani
2019/04/03 11:15:58
Nit: No need for the braces here.
hub
2019/04/03 16:30:07
Done.
|
| + expectHidden(test, testDocument.getElementById("toHide")); |
| + } |
| +} |
| + |
| +exports.testPropertySelectorCombinatorQualifier = async function(test) |
| +{ |
| + await runTestCombinatorQualifier( |
| + test, |
| + "div:-abp-has(> a p > :-abp-properties(content: \"any\"))" |
| + ); |
| + |
| + test.done(); |
|
Manish Jethani
2019/04/03 11:15:58
My reason for asking to move `test.done()` here wa
hub
2019/04/03 16:30:07
Having actually separate test cases is important b
Manish Jethani
2019/04/03 16:40:02
Well in that case I think it's OK to just move `te
hub
2019/04/03 16:41:57
already done :-)
|
| +}; |
| + |
| +exports.testPropertySelectorCombinatorQualifier2 = async function(test) |
| +{ |
| + await runTestCombinatorQualifier( |
| + test, |
| + "div:-abp-has(> a p:-abp-has(> span:-abp-properties(content: \"any\")))" |
| + ); |
| + |
| + test.done(); |
| +}; |
| + |
| async function runTestPseudoClassContains(test, selector, expectations) |
| { |
| testDocument.body.innerHTML = ` <style type="text/css"> |
| body { |
| margin: 0; |
| padding: 0; |
| } |
| .transparent { |