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

Unified Diff: test/browser/elemHideEmulation.js

Issue 29559743: Issue 5650 - Apply emulation filters to shadow DOMs Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Use pure generator function to extract added subtrees Created Oct. 22, 2017, 7:51 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
@@ -104,31 +104,32 @@
}
// Create a new ElemHideEmulation instance with @selectors.
function applyElemHideEmulation(selectors)
{
return Promise.resolve().then(() =>
{
let elemHideEmulation = new ElemHideEmulation(
+ testDocument,
+ null,
newSelectors =>
{
if (!newSelectors.length)
return;
let selector = newSelectors.join(", ");
insertStyleRule(selector + "{display: none !important;}");
},
elems =>
{
for (let elem of elems)
elem.style.display = "none";
}
);
- elemHideEmulation.document = testDocument;
elemHideEmulation.MIN_INVOCATION_INTERVAL = REFRESH_INTERVAL / 2;
elemHideEmulation.apply(selectors.map(selector => ({selector})));
return elemHideEmulation;
});
}
exports.testVerbatimPropertySelector = function(test)
{
« 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