Index: test/browser/elemHideEmulation.js |
=================================================================== |
--- a/test/browser/elemHideEmulation.js |
+++ b/test/browser/elemHideEmulation.js |
@@ -524,16 +524,57 @@ |
sibling: true, |
sibling2: true, |
toHide: true |
}; |
runTestPseudoClassHasSelectorWithHasAndWithSuffixSibling( |
test, "div:-abp-has(> span:-abp-contains(Advertisment))", expectations); |
}; |
+// See issue https://issues.adblockplus.org/ticket/7359 |
+async function runTestCombinatorQualifier(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) |
+{ |
+ runTestCombinatorQualifier( |
+ test, |
+ "div:-abp-has(> a p > :-abp-properties(content: \"any\"))" |
+ ); |
+}; |
+ |
+exports.testPropertySelectorCombinatorQualifier2 = function(test) |
+{ |
+ runTestCombinatorQualifier( |
Manish Jethani
2019/04/02 06:29:10
Can this (and possibly more tests in the future) b
hub
2019/04/02 14:29:11
Done
|
+ 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 { |