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

Unified Diff: test/browser/elemHideEmulation.js

Issue 29481700: Issue 5339 - Properly select element for pseudo-element (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Reworked based on the new implementation proposal. Created Aug. 8, 2017, 4:56 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 | « chrome/content/elemHideEmulation.js ('k') | 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
@@ -270,16 +270,31 @@
{
expectHidden(test, toHide);
resolve();
}, 4000);
});
}).catch(unexpectedError.bind(test)).then(() => test.done());
};
+exports.testPseudoClassWithPropBeforeSelector = function(test)
+{
+ let parent = createElementWithStyle("{}");
+ let child = createElementWithStyle("{background-color: #000}", parent);
+ insertStyleRule(`#${child.id}::before {content: "publicite"}`);
+
+ applyElemHideEmulation(
+ ["div:-abp-properties(content: \"publicite\")"]
+ ).then(() =>
+ {
+ expectHidden(test, child);
+ expectVisible(test, parent);
+ }).catch(unexpectedError.bind(test)).then(() => test.done());
+};
+
exports.testPseudoClassHasSelector = function(test)
{
let toHide = createElementWithStyle("{}");
applyElemHideEmulation(
["div:-abp-has(div)"]
).then(() =>
{
expectVisible(test, toHide);
« no previous file with comments | « chrome/content/elemHideEmulation.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld