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

Unified Diff: chrome/content/tests/filterListener.js

Issue 6423769060999168: Issue 301 - adblockplustests: Use for (.. of ..) (Closed)
Patch Set: Created April 12, 2014, 1:48 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/tests/filterClasses.js ('k') | chrome/content/tests/filterNotifier.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/tests/filterListener.js
===================================================================
--- a/chrome/content/tests/filterListener.js
+++ b/chrome/content/tests/filterListener.js
@@ -19,17 +19,17 @@
restoreFilterComponents.call(this);
restorePrefs.call(this);
}
});
function checkKnownFilters(text, expected)
{
let result = {};
- for each (let type in ["blacklist", "whitelist"])
+ for (let type of ["blacklist", "whitelist"])
{
let matcher = defaultMatcher[type]
let filters = [];
for (let keyword in matcher.filterByKeyword)
{
let list = matcher.filterByKeyword[keyword];
for (let i = 0; i < list.length; i++)
{
@@ -49,17 +49,17 @@
result.elemhideexception = [];
for (let selector in ElemHideGlobal.exceptions)
{
let list = ElemHideGlobal.exceptions[selector];
for (let i = 0; i < list.length; i++)
result.elemhideexception.push(list[i].text);
}
- for each (let type in ["blacklist", "whitelist", "elemhide", "elemhideexception"])
+ for (let type of ["blacklist", "whitelist", "elemhide", "elemhideexception"])
if (!(type in expected))
expected[type] = [];
deepEqual(result, expected, text);
}
test("Adding and removing filters", function()
{
« no previous file with comments | « chrome/content/tests/filterClasses.js ('k') | chrome/content/tests/filterNotifier.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld