Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/browser/elemHideEmulation.js

Issue 30035555: Issue 7428, 7400 - Add test case for nested :-abp-properties() (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created April 1, 2019, 8:46 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld