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

Unified Diff: test/filterListener.js

Issue 29757591: Issue 6562 - Remove filter keys from the element hiding code (Closed)
Patch Set: Created April 20, 2018, 6:41 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
« lib/elemHide.js ('K') | « lib/elemHide.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/filterListener.js
diff --git a/test/filterListener.js b/test/filterListener.js
index 42cd0398e21398c6ff6c0f5411c39e9fb31f9ab2..f432877905ad8687e36e8aad71b3599d38e3e944 100644
--- a/test/filterListener.js
+++ b/test/filterListener.js
@@ -30,7 +30,7 @@ exports.setUp = function(callback)
{
sandboxedRequire = createSandbox({
extraExports: {
- elemHide: ["filterByKey", "exceptions"],
+ elemHide: ["filtersByDomain", "filterBySelector", "exceptions"],
elemHideEmulation: ["filters"]
}
});
@@ -79,8 +79,13 @@ function checkKnownFilters(test, text, expected)
let elemHide = sandboxedRequire("../lib/elemHide");
result.elemhide = [];
- for (let key in elemHide.filterByKey)
- result.elemhide.push(elemHide.filterByKey[key].text);
+ for (let filters of elemHide.filtersByDomain.values())
+ {
+ for (let filter of filters.keys())
+ result.elemhide.push(filter.text);
+ }
+ for (let filter of elemHide.filterBySelector.values())
+ result.elemhide.push(filter.text);
result.elemhideexception = [];
for (let [, list] of elemHide.exceptions)
« lib/elemHide.js ('K') | « lib/elemHide.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld