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

Unified Diff: chrome/content/tests/filterClasses.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/elemhide.js ('k') | chrome/content/tests/filterListener.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/tests/filterClasses.js
===================================================================
--- a/chrome/content/tests/filterClasses.js
+++ b/chrome/content/tests/filterClasses.js
@@ -62,17 +62,17 @@
}
return result;
}
function addDefaults(expected)
{
let type = null;
let hasProperty = {};
- for each (let entry in expected)
+ for (let entry of expected)
{
if (/^type=(.*)/.test(entry))
type = RegExp.$1;
else if (/^(\w+)/.test(entry))
hasProperty[RegExp.$1] = true;
}
function addProperty(prop, value)
@@ -117,17 +117,17 @@
// Test round-trip
let filter2;
let buffer = [];
filter.serialize(buffer);
if (buffer.length)
{
let map = {__proto__: null};
- for each (let line in buffer.slice(1))
+ for (let line of buffer.slice(1))
{
if (/(.*?)=(.*)/.test(line))
map[RegExp.$1] = RegExp.$2;
}
filter2 = Filter.fromObject(map);
}
else
{
« no previous file with comments | « chrome/content/tests/elemhide.js ('k') | chrome/content/tests/filterListener.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld