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

Unified Diff: chrome/content/tests/performance/page_load_overhead.html

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/performance/matching.html ('k') | chrome/content/tests/popupBlocker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/tests/performance/page_load_overhead.html
===================================================================
--- a/chrome/content/tests/performance/page_load_overhead.html
+++ b/chrome/content/tests/performance/page_load_overhead.html
@@ -66,45 +66,45 @@
document.getElementById("progress").style.display = "";
if (document.getElementById("enableABP").checked)
{
let filters = document.getElementById("filters").value.replace(/^[\r\n]+/, "")
.replace(/[\r\n]+$/, "")
.split(/[\r\n]+/)
.map(function(text) Filter.fromText(text));
- for each (let filter in filters)
+ for (let filter of filters)
{
if (filter instanceof RegExpFilter)
defaultMatcher.add(filter);
else if (filter instanceof ElemHideFilter)
ElemHide.add(filter);
}
ElemHide.apply();
}
else
{
- for each (let category in PolicyPrivate.xpcom_categories)
+ for (let category of PolicyPrivate.xpcom_categories)
Utils.categoryManager.deleteCategoryEntry(category, PolicyPrivate.classDescription, false);
}
server.start(1234);
runTests(runTest, null, finalize);
}
function runTest()
{
let frame = document.getElementById("frame");
let loaded;
let eventListener = function() {loaded = true;};
frame.addEventListener("load", eventListener, false);
- for each (let url in urls)
+ for (let url of urls)
{
loaded = false;
frame.src = url;
while (!loaded)
thread.processNextEvent(true);
}
frame.removeEventListener("load", eventListener, false);
@@ -112,17 +112,17 @@
function finalize()
{
defaultMatcher.clear();
ElemHide.clear();
server.stop();
- for each (let category in PolicyPrivate.xpcom_categories)
+ for (let category of PolicyPrivate.xpcom_categories)
Utils.categoryManager.addCategoryEntry(category, PolicyPrivate.classDescription, PolicyPrivate.contractID, false, true);
document.getElementById("progress").style.display = "none";
document.getElementById("enableABP").disabled = false;
document.getElementById("filters").disabled = !document.getElementById("enableABP").checked;
document.getElementById("startButton").disabled = false;
}
</script>
« no previous file with comments | « chrome/content/tests/performance/matching.html ('k') | chrome/content/tests/popupBlocker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld