diff --git a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js index d0e7173009f6..32b0d4742e42 100644 --- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js +++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js @@ -157,9 +157,10 @@ function testNext() { pos++; if (pos < TESTS.length) { if (TESTS[pos].onload) { + let position = pos; browser.addEventListener("load", function(aEvent) { browser.removeEventListener(aEvent.type, arguments.callee, true); - TESTS[pos].onload(aEvent); + TESTS[position].onload(aEvent); }, true); }