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

Unified Diff: test/browser/elemHideEmulation.js

Issue 29836555: Issue 6680 - PropsSelector also depend on DOM modifications (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created July 23, 2018, 1:01 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 | « lib/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
@@ -236,16 +236,44 @@
).then(() =>
{
expectVisible(test, parent);
expectVisible(test, middle);
expectHidden(test, toHide);
}).catch(unexpectedError.bind(test)).then(() => test.done());
};
+//
Manish Jethani 2018/07/23 20:44:01 Nit: We don't need these extra blank lines in the
hub 2018/07/23 21:01:57 Done.
+// Add the style. Then added the element for that style.
Manish Jethani 2018/07/23 20:44:01 s/added/add/
hub 2018/07/23 21:01:57 Done.
+// This should retrigger the filter and hide it.
Manish Jethani 2018/07/23 20:44:01 s/filter/filtering/
hub 2018/07/23 21:01:58 Done.
+//
+exports.testPropertyPseudoSelectorAddedStyleAndElement = function(test)
Manish Jethani 2018/07/23 20:44:01 s/Added/Add/
hub 2018/07/23 21:01:58 Done.
+{
+ let styleElement;
+ let toHide;
+ applyElemHideEmulation(
+ [":-abp-properties(background-color: rgb(0, 0, 0))"]
+ ).then(() =>
+ {
+ styleElement = testDocument.createElement("style");
+ testDocument.head.appendChild(styleElement);
+ styleElement.sheet.insertRule("#toHide {background-color: #000}");
+ return timeout(REFRESH_INTERVAL);
+ }).then(() =>
+ {
+ toHide = createElement();
+ toHide.id = "toHide";
+ expectVisible(test, toHide);
+ return timeout(REFRESH_INTERVAL);
+ }).then(() =>
+ {
+ expectHidden(test, toHide);
+ }).catch(unexpectedError.bind(test)).then(() => test.done());
+};
+
exports.testPropertySelectorWithWildcard = function(test)
{
let toHide = createElementWithStyle("{background-color: #000}");
applyElemHideEmulation(
[":-abp-properties(*color: rgb(0, 0, 0))"]
).then(() =>
{
expectHidden(test, toHide);
« no previous file with comments | « lib/content/elemHideEmulation.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld