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

Unified Diff: chrome/content/tests/filterStorage_readwrite.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/filterNotifier.js ('k') | chrome/content/tests/matcher.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/tests/filterStorage_readwrite.js
===================================================================
--- a/chrome/content/tests/filterStorage_readwrite.js
+++ b/chrome/content/tests/filterStorage_readwrite.js
@@ -65,29 +65,29 @@
let tempFile2 = FileUtils.getFile("TmpD", ["temp_patterns2.ini"]);
tempFile.createUnique(tempFile.NORMAL_FILE_TYPE, FileUtils.PERMS_FILE);
createTempFile();
function canonize(data)
{
let curSection = null;
let sections = [];
- for each (let line in (data + "\n[end]").split(/[\r\n]+/))
+ for (let line of (data + "\n[end]").split(/[\r\n]+/))
{
if (/^\[.*\]$/.test(line))
{
if (curSection)
sections.push(curSection);
curSection = {header: line, data: []};
}
else if (curSection && /\S/.test(line))
curSection.data.push(line);
}
- for each (let section in sections)
+ for (let section of sections)
{
section.key = section.header + " " + section.data[0];
section.data.sort();
}
sections.sort(function(a, b)
{
if (a.key < b.key)
return -1;
« no previous file with comments | « chrome/content/tests/filterNotifier.js ('k') | chrome/content/tests/matcher.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld