Bug 1178863 - ESLint cleanup for tests. r=pbro
authorJennifer Fong <jen@ednapiranha.com>
Thu, 02 Jul 2015 11:18:00 -0400
changeset 270162 69d41db364e8eadec5a277afa2affcbe37632a31
parent 270161 663108a1d580c00a51335d6a1060006788cee438
child 270163 d57875a9877ea2dd66edb06811c514a3a450da96
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-esr52@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro
bugs1178863
milestone42.0a1
Bug 1178863 - ESLint cleanup for tests. r=pbro
browser/devtools/webconsole/test/browser_console_variables_view.js
browser/devtools/webconsole/test/browser_console_variables_view_highlighter.js
browser/devtools/webconsole/test/browser_console_variables_view_while_debugging_and_inspecting.js
browser/devtools/webconsole/test/browser_result_format_as_string.js
browser/devtools/webconsole/test/browser_webconsole_allow_mixedcontent_securityerrors.js
browser/devtools/webconsole/test/browser_webconsole_autocomplete_and_selfxss.js
browser/devtools/webconsole/test/browser_webconsole_bug_579412_input_focus.js
browser/devtools/webconsole/test/browser_webconsole_bug_580001_closing_after_completion.js
browser/devtools/webconsole/test/browser_webconsole_bug_585237_line_limit.js
browser/devtools/webconsole/test/browser_webconsole_bug_585956_console_trace.js
browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js
browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_popup.js
browser/devtools/webconsole/test/browser_webconsole_bug_586388_select_all.js
browser/devtools/webconsole/test/browser_webconsole_bug_587617_output_copy.js
browser/devtools/webconsole/test/browser_webconsole_bug_588342_document_focus.js
browser/devtools/webconsole/test/browser_webconsole_bug_588730_text_node_insertion.js
browser/devtools/webconsole/test/browser_webconsole_bug_588967_input_expansion.js
browser/devtools/webconsole/test/browser_webconsole_bug_589162_css_filter.js
browser/devtools/webconsole/test/browser_webconsole_bug_592442_closing_brackets.js
browser/devtools/webconsole/test/browser_webconsole_bug_593003_iframe_wrong_hud.js
browser/devtools/webconsole/test/browser_webconsole_bug_594477_clickable_output.js
browser/devtools/webconsole/test/browser_webconsole_bug_594497_history_arrow_keys.js
browser/devtools/webconsole/test/browser_webconsole_bug_595223_file_uri.js
browser/devtools/webconsole/test/browser_webconsole_bug_595350_multiple_windows_and_tabs.js
browser/devtools/webconsole/test/browser_webconsole_bug_595934_message_categories.js
browser/devtools/webconsole/test/browser_webconsole_bug_597103_deactivateHUDForContext_unfocused_window.js
browser/devtools/webconsole/test/browser_webconsole_bug_597136_network_requests_from_chrome.js
browser/devtools/webconsole/test/browser_webconsole_bug_597460_filter_scroll.js
browser/devtools/webconsole/test/browser_webconsole_bug_597756_reopen_closed_tab.js
browser/devtools/webconsole/test/browser_webconsole_bug_599725_response_headers.js
browser/devtools/webconsole/test/browser_webconsole_bug_600183_charset.js
browser/devtools/webconsole/test/browser_webconsole_bug_601177_log_levels.js
browser/devtools/webconsole/test/browser_webconsole_bug_601352_scroll.js
browser/devtools/webconsole/test/browser_webconsole_bug_601667_filter_buttons.js
browser/devtools/webconsole/test/browser_webconsole_bug_602572_log_bodies_checkbox.js
browser/devtools/webconsole/test/browser_webconsole_bug_603750_websocket.js
browser/devtools/webconsole/test/browser_webconsole_bug_611795.js
browser/devtools/webconsole/test/browser_webconsole_bug_613013_console_api_iframe.js
browser/devtools/webconsole/test/browser_webconsole_bug_613280_jsterm_copy.js
browser/devtools/webconsole/test/browser_webconsole_bug_613642_maintain_scroll.js
browser/devtools/webconsole/test/browser_webconsole_bug_613642_prune_scroll.js
browser/devtools/webconsole/test/browser_webconsole_bug_614793_jsterm_scroll.js
browser/devtools/webconsole/test/browser_webconsole_bug_618078_network_exceptions.js
browser/devtools/webconsole/test/browser_webconsole_bug_618311_close_panels.js
browser/devtools/webconsole/test/browser_webconsole_bug_621644_jsterm_dollar.js
browser/devtools/webconsole/test/browser_webconsole_bug_622303_persistent_filters.js
browser/devtools/webconsole/test/browser_webconsole_bug_623749_ctrl_a_select_all_winnt.js
browser/devtools/webconsole/test/browser_webconsole_bug_630733_response_redirect_headers.js
browser/devtools/webconsole/test/browser_webconsole_bug_632275_getters_document_width.js
browser/devtools/webconsole/test/browser_webconsole_bug_632347_iterators_generators.js
browser/devtools/webconsole/test/browser_webconsole_bug_632817.js
browser/devtools/webconsole/test/browser_webconsole_bug_642108_pruneTest.js
browser/devtools/webconsole/test/browser_webconsole_bug_644419_log_limits.js
browser/devtools/webconsole/test/browser_webconsole_bug_646025_console_file_location.js
browser/devtools/webconsole/test/browser_webconsole_bug_651501_document_body_autocomplete.js
browser/devtools/webconsole/test/browser_webconsole_bug_653531_highlighter_console_helper.js
browser/devtools/webconsole/test/browser_webconsole_bug_658368_time_methods.js
browser/devtools/webconsole/test/browser_webconsole_bug_659907_console_dir.js
browser/devtools/webconsole/test/browser_webconsole_bug_660806_history_nav.js
browser/devtools/webconsole/test/browser_webconsole_bug_664131_console_group.js
browser/devtools/webconsole/test/browser_webconsole_bug_686937_autocomplete_JSTerm_helpers.js
browser/devtools/webconsole/test/browser_webconsole_bug_704295.js
browser/devtools/webconsole/test/browser_webconsole_bug_734061_No_input_change_and_Tab_key_pressed.js
browser/devtools/webconsole/test/browser_webconsole_bug_737873_mixedcontent.js
browser/devtools/webconsole/test/browser_webconsole_bug_752559_ineffective_iframe_sandbox_warning.js
browser/devtools/webconsole/test/browser_webconsole_bug_762593_insecure_passwords_about_blank_web_console_warning.js
browser/devtools/webconsole/test/browser_webconsole_bug_762593_insecure_passwords_web_console_warning.js
browser/devtools/webconsole/test/browser_webconsole_bug_764572_output_open_url.js
browser/devtools/webconsole/test/browser_webconsole_bug_770099_violation.js
browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js
browser/devtools/webconsole/test/browser_webconsole_bug_804845_ctrl_key_nav.js
browser/devtools/webconsole/test/browser_webconsole_bug_837351_securityerrors.js
browser/devtools/webconsole/test/browser_webconsole_bug_846918_hsts_invalid-headers.js
browser/devtools/webconsole/test/browser_webconsole_bug_915141_toggle_response_logging_with_keyboard.js
browser/devtools/webconsole/test/browser_webconsole_cached_autocomplete.js
browser/devtools/webconsole/test/browser_webconsole_cd_iframe.js
--- a/browser/devtools/webconsole/test/browser_console_variables_view.js
+++ b/browser/devtools/webconsole/test/browser_console_variables_view.js
@@ -1,15 +1,17 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // Check that variables view works as expected in the web console.
 
+"use strict";
+
 const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
                  "test/test-eval-in-stackframe.html";
 
 let gWebConsole, gJSTerm, gVariablesView;
 
 let hud;
 
 let test = asyncTest(function* () {
--- a/browser/devtools/webconsole/test/browser_console_variables_view_highlighter.js
+++ b/browser/devtools/webconsole/test/browser_console_variables_view_highlighter.js
@@ -1,16 +1,18 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // Check that variables view is linked to the inspector for highlighting and
 // selecting DOM nodes
 
+"use strict";
+
 const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
                  "test/test-bug-952277-highlight-nodes-in-vview.html";
 
 let gWebConsole, gJSTerm, gVariablesView, gToolbox;
 
 function test() {
   loadTab(TEST_URI).then(() => {
     openConsole().then(hud => {
--- a/browser/devtools/webconsole/test/browser_console_variables_view_while_debugging_and_inspecting.js
+++ b/browser/devtools/webconsole/test/browser_console_variables_view_while_debugging_and_inspecting.js
@@ -1,16 +1,18 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // Test that makes sure web console eval works while the js debugger paused the
 // page, and while the inspector is active. See bug 886137.
 
+"use strict";
+
 const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
                  "test/test-eval-in-stackframe.html";
 
 let gWebConsole, gJSTerm, gDebuggerWin, gThread, gDebuggerController,
     gStackframes, gVariablesView;
 
 function test() {
   loadTab(TEST_URI).then(() => {
@@ -21,27 +23,27 @@ function test() {
 function consoleOpened(hud) {
   gWebConsole = hud;
   gJSTerm = hud.jsterm;
 
   info("openDebugger");
   openDebugger().then(debuggerOpened);
 }
 
-function debuggerOpened(aResult) {
+function debuggerOpened(result) {
   info("debugger opened");
-  gDebuggerWin = aResult.panelWin;
+  gDebuggerWin = result.panelWin;
   gDebuggerController = gDebuggerWin.DebuggerController;
   gThread = gDebuggerController.activeThread;
   gStackframes = gDebuggerController.StackFrames;
 
   openInspector().then(inspectorOpened);
 }
 
-function inspectorOpened(aPanel) {
+function inspectorOpened() {
   info("inspector opened");
   gThread.addOneTimeListener("framesadded", onFramesAdded);
 
   info("firstCall()");
   content.wrappedJSObject.firstCall();
 }
 
 function onFramesAdded() {
--- a/browser/devtools/webconsole/test/browser_result_format_as_string.js
+++ b/browser/devtools/webconsole/test/browser_result_format_as_string.js
@@ -1,14 +1,16 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Make sure that JS eval result are properly formatted as strings.
 
+"use strict";
+
 const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
                  "test/test-result-format-as-string.html";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
--- a/browser/devtools/webconsole/test/browser_webconsole_allow_mixedcontent_securityerrors.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_allow_mixedcontent_securityerrors.js
@@ -4,16 +4,18 @@
 // The test loads a web page with mixed active and display content
 // on it while the "block mixed content" settings are _off_.
 // It then checks that the loading mixed content warning messages
 // are logged to the console and have the correct "Learn More"
 // url appended to them.
 // Bug 875456 - Log mixed content messages from the Mixed Content
 // Blocker to the Security Pane in the Web Console
 
+"use strict";
+
 const TEST_URI = "https://example.com/browser/browser/devtools/webconsole/" +
                  "test/test-mixedcontent-securityerrors.html";
 const LEARN_MORE_URI = "https://developer.mozilla.org/docs/Security/" +
                        "MixedContent";
 
 let test = asyncTest(function* () {
   yield pushPrefEnv();
 
--- a/browser/devtools/webconsole/test/browser_webconsole_autocomplete_and_selfxss.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_autocomplete_and_selfxss.js
@@ -70,17 +70,17 @@ function consoleOpened(HUD) {
     is(WebConsoleUtils.usageCount, 4, "Usage count incremented");
     WebConsoleUtils.usageCount = 0;
     updateEditUIVisibility();
 
     let oldVal = jsterm.inputNode.value;
     goDoCommand("cmd_paste");
     let notificationbox = jsterm.hud.document.getElementById("webconsole-notificationbox");
     let notification = notificationbox.getNotificationWithValue("selfxss-notification");
-    ok(notification,  "Self-xss notification shown");
+    ok(notification, "Self-xss notification shown");
     is(oldVal, jsterm.inputNode.value, "Paste blocked by self-xss prevention");
 
     // Allow pasting
     jsterm.inputNode.value = "allow pasting";
     let evt = document.createEvent("KeyboardEvent");
     evt.initKeyEvent("keyup", true, true, window,
                      0, 0, 0, 0,
                      0, " ".charCodeAt(0));
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_579412_input_focus.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_579412_input_focus.js
@@ -3,17 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Tests that the input field is focused when the console is opened.
 
 "use strict";
 
 const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
-				 "test/test-console.html";
+                 "test/test-console.html";
 
 let test = asyncTest(function*() {
   yield loadTab(TEST_URI);
   let hud = yield openConsole();
   hud.jsterm.clearOutput();
 
   let inputNode = hud.jsterm.inputNode;
   ok(inputNode.getAttribute("focused"), "input node is focused");
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_580001_closing_after_completion.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_580001_closing_after_completion.js
@@ -1,16 +1,18 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Tests to ensure that errors don't appear when the console is closed while a
 // completion is being performed.
 
+"use strict";
+
 const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
                  "test/test-console.html";
 
 let test = asyncTest(function* () {
   let { browser } = yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
   yield testClosingAfterCompletion(hud, browser);
@@ -40,9 +42,8 @@ function testClosingAfterCompletion(hud,
   if (Services.appinfo.OS == "Darwin") {
     EventUtils.synthesizeKey("i", { accelKey: true, altKey: true });
   } else {
     EventUtils.synthesizeKey("i", { accelKey: true, shiftKey: true });
   }
 
   return deferred.promise;
 }
-
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_585237_line_limit.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_585237_line_limit.js
@@ -27,17 +27,18 @@ let test = asyncTest(function* () {
   outputNode = hud.outputNode;
 
   hud.jsterm.clearOutput();
 
   let prefBranch = Services.prefs.getBranch("devtools.hud.loglimit.");
   prefBranch.setIntPref("console", 20);
 
   for (let i = 0; i < 30; i++) {
-    console.log("foo #" + i); // must change message to prevent repeats
+    // must change message to prevent repeats
+    console.log("foo #" + i);
   }
 
   yield waitForMessages({
     webconsole: hud,
     messages: [{
       text: "foo #29",
       category: CATEGORY_WEBDEV,
       severity: SEVERITY_LOG,
@@ -58,17 +59,18 @@ let test = asyncTest(function* () {
     }],
   });
 
   is(countMessageNodes(), 20, "there are still 20 message nodes in the " +
      "output when adding one more");
 
   prefBranch.setIntPref("console", 30);
   for (let i = 0; i < 20; i++) {
-    console.log("boo #" + i); // must change message to prevent repeats
+    // must change message to prevent repeats
+    console.log("boo #" + i);
   }
 
   yield waitForMessages({
     webconsole: hud,
     messages: [{
       text: "boo #19",
       category: CATEGORY_WEBDEV,
       severity: SEVERITY_LOG,
@@ -81,9 +83,8 @@ let test = asyncTest(function* () {
   prefBranch.clearUserPref("console");
 
   outputNode = null;
 });
 
 function countMessageNodes() {
   return outputNode.querySelectorAll(".message").length;
 }
-
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_585956_console_trace.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_585956_console_trace.js
@@ -1,16 +1,17 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-585956-console-trace.html";
+const TEST_URI = "http://example.com/browser/browser/devtools/" +
+                 "webconsole/test/test-bug-585956-console-trace.html";
 
 function test() {
   Task.spawn(runner).then(finishTest);
 
   function* runner() {
     let {tab} = yield loadTab("data:text/html;charset=utf8,<p>hello");
     let hud = yield openConsole(tab);
 
@@ -30,19 +31,44 @@ function test() {
     let node = [...result.matched][0];
     ok(node, "found trace log node");
 
     let obj = node._messageObject;
     ok(obj, "console.trace message object");
 
     // The expected stack trace object.
     let stacktrace = [
-      { columnNumber: 3, filename: TEST_URI, functionName: "window.foobar585956c", language: 2, lineNumber: 9 },
-      { columnNumber: 10, filename: TEST_URI, functionName: "foobar585956b", language: 2, lineNumber: 14 },
-      { columnNumber: 10, filename: TEST_URI, functionName: "foobar585956a", language: 2, lineNumber: 18 },
-      { columnNumber: 1, filename: TEST_URI, functionName: "", language: 2, lineNumber: 21 }
+      {
+        columnNumber: 3,
+        filename: TEST_URI,
+        functionName: "window.foobar585956c",
+        language: 2,
+        lineNumber: 9
+      },
+      {
+        columnNumber: 10,
+        filename: TEST_URI,
+        functionName: "foobar585956b",
+        language: 2,
+        lineNumber: 14
+      },
+      {
+        columnNumber: 10,
+        filename: TEST_URI,
+        functionName: "foobar585956a",
+        language: 2,
+        lineNumber: 18
+      },
+      {
+        columnNumber: 1,
+        filename: TEST_URI,
+        functionName: "",
+        language: 2,
+        lineNumber: 21
+      }
     ];
 
     ok(obj._stacktrace, "found stacktrace object");
-    is(obj._stacktrace.toSource(), stacktrace.toSource(), "stacktrace is correct");
+    is(obj._stacktrace.toSource(), stacktrace.toSource(),
+       "stacktrace is correct");
     isnot(node.textContent.indexOf("bug-585956"), -1, "found file name");
   }
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js
@@ -1,14 +1,17 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-const TEST_URI = "data:text/html;charset=utf-8,<p>bug 585991 - autocomplete popup keyboard usage test";
+"use strict";
+
+const TEST_URI = "data:text/html;charset=utf-8,<p>bug 585991 - autocomplete " +
+                 "popup keyboard usage test";
 let HUD, popup, jsterm, inputNode, completeNode;
 
 let test = asyncTest(function*() {
   yield loadTab(TEST_URI);
   let hud = yield openConsole();
 
   yield consoleOpened(hud);
   yield popupHideAfterTab();
@@ -49,17 +52,19 @@ let consoleOpened = Task.async(function*
     ok(popup.isOpen, "popup is open");
 
     // 4 values, and the following properties:
     // __defineGetter__  __defineSetter__ __lookupGetter__ __lookupSetter__
     // __proto__ hasOwnProperty isPrototypeOf propertyIsEnumerable
     // toLocaleString toString toSource unwatch valueOf watch constructor.
     is(popup.itemCount, 19, "popup.itemCount is correct");
 
-    let sameItems = popup.getItems().reverse().map(function(e) {return e.label;});
+    let sameItems = popup.getItems().reverse().map(function(e) {
+      return e.label;
+    });
     ok(sameItems.every(function(prop, index) {
       return [
         "__defineGetter__",
         "__defineSetter__",
         "__lookupGetter__",
         "__lookupSetter__",
         "__proto__",
         "constructor",
@@ -71,17 +76,18 @@ let consoleOpened = Task.async(function*
         "item3",
         "propertyIsEnumerable",
         "toLocaleString",
         "toSource",
         "toString",
         "unwatch",
         "valueOf",
         "watch",
-      ][index] === prop}), "getItems returns the items we expect");
+      ][index] === prop;
+    }), "getItems returns the items we expect");
 
     is(popup.selectedIndex, 18,
        "Index of the first item from bottom is selected.");
     EventUtils.synthesizeKey("VK_DOWN", {});
 
     let prefix = jsterm.inputNode.value.replace(/[\S]/g, " ");
 
     is(popup.selectedIndex, 0, "index 0 is selected");
@@ -108,17 +114,18 @@ let consoleOpened = Task.async(function*
     EventUtils.synthesizeKey("VK_PAGE_DOWN", {});
 
     ok(popup.selectedIndex > currentSelectionIndex,
       "Index is greater after PGDN");
 
     currentSelectionIndex = popup.selectedIndex;
     EventUtils.synthesizeKey("VK_PAGE_UP", {});
 
-    ok(popup.selectedIndex < currentSelectionIndex, "Index is less after Page UP");
+    ok(popup.selectedIndex < currentSelectionIndex,
+       "Index is less after Page UP");
 
     EventUtils.synthesizeKey("VK_END", {});
     is(popup.selectedIndex, 18, "index is last after End");
 
     EventUtils.synthesizeKey("VK_HOME", {});
     is(popup.selectedIndex, 0, "index is first after Home");
 
     info("press Tab and wait for popup to hide");
@@ -131,18 +138,17 @@ let consoleOpened = Task.async(function*
 
   info("wait for completion: window.foobarBug585991.");
   jsterm.setInputValue("window.foobarBug585991");
   EventUtils.synthesizeKey(".", {});
 
   return deferred.promise;
 });
 
-function popupHideAfterTab()
-{
+function popupHideAfterTab() {
   let deferred = promise.defer();
 
   // At this point the completion suggestion should be accepted.
   ok(!popup.isOpen, "popup is not open");
 
   is(inputNode.value, "window.foobarBug585991.watch",
      "completion was successful after VK_TAB");
 
@@ -188,18 +194,17 @@ function popupHideAfterTab()
   executeSoon(function() {
     jsterm.setInputValue("window.foobarBug585991");
     EventUtils.synthesizeKey(".", {});
   });
 
   return deferred.promise;
 }
 
-function testReturnKey()
-{
+function testReturnKey() {
   let deferred = promise.defer();
 
   popup._panel.addEventListener("popupshown", function onShown() {
     popup._panel.removeEventListener("popupshown", onShown, false);
 
     ok(popup.isOpen, "popup is open");
 
     is(popup.itemCount, 19, "popup.itemCount is correct");
@@ -245,33 +250,34 @@ function testReturnKey()
     jsterm.setInputValue("window.foobarBug58599");
     EventUtils.synthesizeKey("1", {});
     EventUtils.synthesizeKey(".", {});
   });
 
   return deferred.promise;
 }
 
-function dontShowArrayNumbers()
-{
+function dontShowArrayNumbers() {
   let deferred = promise.defer();
 
   info("dontShowArrayNumbers");
   content.wrappedJSObject.foobarBug585991 = ["Sherlock Holmes"];
 
-  let jsterm = HUD.jsterm;
-  let popup = jsterm.autocompletePopup;
-  let completeNode = jsterm.completeNode;
+  jsterm = HUD.jsterm;
+  popup = jsterm.autocompletePopup;
 
   popup._panel.addEventListener("popupshown", function onShown() {
     popup._panel.removeEventListener("popupshown", onShown, false);
 
-    let sameItems = popup.getItems().map(function(e) {return e.label;});
-    ok(!sameItems.some(function(prop, index) { prop === "0"; }),
-       "Completing on an array doesn't show numbers.");
+    let sameItems = popup.getItems().map(function(e) {
+      return e.label;
+    });
+    ok(!sameItems.some(function(prop) {
+      prop === "0";
+    }), "Completing on an array doesn't show numbers.");
 
     popup._panel.addEventListener("popuphidden", function popupHidden() {
       popup._panel.removeEventListener("popuphidden", popupHidden, false);
       deferred.resolve();
     }, false);
 
     info("wait for popup to hide");
     executeSoon(() => EventUtils.synthesizeKey("VK_ESCAPE", {}));
@@ -281,18 +287,17 @@ function dontShowArrayNumbers()
   executeSoon(() => {
     jsterm.setInputValue("window.foobarBug585991");
     EventUtils.synthesizeKey(".", {});
   });
 
   return deferred.promise;
 }
 
-function testReturnWithNoSelection()
-{
+function testReturnWithNoSelection() {
   let deferred = promise.defer();
 
   info("test pressing return with open popup, but no selection, see bug 873250");
 
   popup._panel.addEventListener("popupshown", function onShown() {
     popup._panel.removeEventListener("popupshown", onShown);
 
     ok(popup.isOpen, "popup is open");
@@ -311,30 +316,28 @@ function testReturnWithNoSelection()
     info("wait for popup to show");
     jsterm.setInputValue("window.testBu");
     EventUtils.synthesizeKey("g", {});
   });
 
   return deferred.promise;
 }
 
-function popupHideAfterReturnWithNoSelection()
-{
+function popupHideAfterReturnWithNoSelection() {
   ok(!popup.isOpen, "popup is not open after VK_RETURN");
 
   is(inputNode.value, "", "inputNode is empty after VK_RETURN");
   is(completeNode.value, "", "completeNode is empty");
-  is(jsterm.history[jsterm.history.length-1], "window.testBug",
+  is(jsterm.history[jsterm.history.length - 1], "window.testBug",
      "jsterm history is correct");
 
   return promise.resolve();
 }
 
-function testCompletionInText()
-{
+function testCompletionInText() {
   info("test that completion works inside text, see bug 812618");
 
   let deferred = promise.defer();
 
   popup._panel.addEventListener("popupshown", function onShown() {
     popup._panel.removeEventListener("popupshown", onShown);
 
     ok(popup.isOpen, "popup is open");
@@ -358,20 +361,20 @@ function testCompletionInText()
   });
 
   jsterm.setInputValue("dump(window.testBu)");
   inputNode.selectionStart = inputNode.selectionEnd = 18;
   EventUtils.synthesizeKey("g", {});
   return deferred.promise;
 }
 
-function popupHideAfterCompletionInText()
-{
+function popupHideAfterCompletionInText() {
   // At this point the completion suggestion should be accepted.
   ok(!popup.isOpen, "popup is not open");
   is(inputNode.value, "dump(window.testBug873250b)",
      "completion was successful after VK_TAB");
   is(inputNode.selectionStart, 26, "cursor location is correct");
-  is(inputNode.selectionStart, inputNode.selectionEnd, "cursor location (confirmed)");
+  is(inputNode.selectionStart, inputNode.selectionEnd,
+     "cursor location (confirmed)");
   ok(!completeNode.value, "completeNode is empty");
 
   return promise.resolve();
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_popup.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_popup.js
@@ -1,16 +1,17 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-const TEST_URI = "data:text/html;charset=utf-8,<p>bug 585991 - autocomplete popup test";
+"use strict";
 
-"use strict";
+const TEST_URI = "data:text/html;charset=utf-8,<p>bug 585991 - autocomplete " +
+                 "popup test";
 
 let test = asyncTest(function*() {
   yield loadTab(TEST_URI);
   let hud = yield openConsole();
 
   yield consoleOpened(hud);
 });
 
@@ -29,18 +30,18 @@ function consoleOpened(HUD) {
   function getActiveDescendant() {
     return input.ownerDocument.getElementById(
       input.getAttribute("aria-activedescendant"));
   }
 
   ok(!popup.isOpen, "popup is not open");
   ok(!input.hasAttribute("aria-activedescendant"), "no aria-activedescendant");
 
-  popup._panel.addEventListener("popupshown", function() {
-    popup._panel.removeEventListener("popupshown", arguments.callee, false);
+  popup._panel.addEventListener("popupshown", function onPopupPanel() {
+    popup._panel.removeEventListener("popupshown", onPopupPanel, false);
 
     ok(popup.isOpen, "popup is open");
 
     is(popup.itemCount, 0, "no items");
     ok(!input.hasAttribute("aria-activedescendant"),
        "no aria-activedescendant");
 
     popup.setItems(items);
@@ -111,9 +112,8 @@ function consoleOpened(HUD) {
     popup.hidePopup();
     deferred.resolve();
   }, false);
 
   popup.openPopup();
 
   return deferred.promise;
 }
-
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_586388_select_all.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_586388_select_all.js
@@ -3,30 +3,29 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Patrick Walton <pcwalton@mozilla.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/";
+"use strict";
 
-"use strict";
+const TEST_URI = "http://example.com/";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
   yield testSelectionWhenMovingBetweenBoxes(hud);
   performTestsAfterOutput(hud);
-})
+});
 
-let testSelectionWhenMovingBetweenBoxes = Task.async(function *(aHud) {
-  let hud = aHud;
+let testSelectionWhenMovingBetweenBoxes = Task.async(function*(hud) {
   let jsterm = hud.jsterm;
 
   // Fill the console with some output.
   jsterm.clearOutput();
   yield jsterm.execute("1 + 2");
   yield jsterm.execute("3 + 4");
   yield jsterm.execute("5 + 6");
 
@@ -42,18 +41,17 @@ let testSelectionWhenMovingBetweenBoxes 
     },
     {
       text: "11",
       category: CATEGORY_OUTPUT,
     }],
   });
 });
 
-function performTestsAfterOutput(aHud) {
-  let hud = aHud;
+function performTestsAfterOutput(hud) {
   let outputNode = hud.outputNode;
 
   ok(outputNode.childNodes.length >= 3, "the output node has children after " +
      "executing some JavaScript");
 
   // Test that the global Firefox "Select All" functionality (e.g. Edit >
   // Select All) works properly in the Web Console.
   let commandController = hud.ui._commandController;
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_587617_output_copy.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_587617_output_copy.js
@@ -3,22 +3,23 @@
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *  Patrick Walton <pcwalton@mozilla.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-console.html";
 
 let HUD, outputNode;
 
-"use strict";
-
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
   yield consoleOpened(hud);
   yield testContextMenuCopy();
 
   HUD = outputNode = null;
@@ -29,18 +30,18 @@ function consoleOpened(aHud) {
 
   let deferred = promise.defer();
 
   // See bugs 574036, 586386 and 587617.
   outputNode = HUD.outputNode;
 
   HUD.jsterm.clearOutput();
 
-  let controller = top.document.commandDispatcher.
-                   getControllerForCommand("cmd_copy");
+  let controller = top.document.commandDispatcher
+                               .getControllerForCommand("cmd_copy");
   is(controller.isCommandEnabled("cmd_copy"), false, "cmd_copy is disabled");
 
   content.console.log("Hello world! bug587617");
 
   waitForMessages({
     webconsole: HUD,
     messages: [{
       text: "bug587617",
@@ -49,28 +50,32 @@ function consoleOpened(aHud) {
     }],
   }).then(([result]) => {
     let msg = [...result.matched][0];
     HUD.ui.output.selectMessage(msg);
 
     outputNode.focus();
 
     goUpdateCommand("cmd_copy");
-    controller = top.document.commandDispatcher.getControllerForCommand("cmd_copy");
+    controller = top.document.commandDispatcher
+                             .getControllerForCommand("cmd_copy");
     is(controller.isCommandEnabled("cmd_copy"), true, "cmd_copy is enabled");
 
-    // Remove new lines since getSelection() includes one between message and line
-    // number, but the clipboard doesn't (see bug 1119503)
-    let selection = (HUD.iframeWindow.getSelection() + "").replace(/\r?\n|\r/g, " ");
+    // Remove new lines since getSelection() includes one between message and
+    // line number, but the clipboard doesn't (see bug 1119503)
+    let selection = (HUD.iframeWindow.getSelection() + "")
+      .replace(/\r?\n|\r/g, " ");
     isnot(selection.indexOf("bug587617"), -1,
           "selection text includes 'bug587617'");
 
-    waitForClipboard((str) => { return selection.trim() == str.trim(); },
-      () => { goDoCommand("cmd_copy") },
-      deferred.resolve, deferred.resolve);
+    waitForClipboard((str) => {
+      return selection.trim() == str.trim();
+    }, () => {
+      goDoCommand("cmd_copy");
+    }, deferred.resolve, deferred.resolve);
   });
   return deferred.promise;
 }
 
 // Test that the context menu "Copy" (which has a different code path) works
 // properly as well.
 function testContextMenuCopy() {
   let deferred = promise.defer();
@@ -79,20 +84,22 @@ function testContextMenuCopy() {
   let contextMenu = HUD.ui.document.getElementById(contextMenuId);
   ok(contextMenu, "the output node has a context menu");
 
   let copyItem = contextMenu.querySelector("*[command='cmd_copy']");
   ok(copyItem, "the context menu on the output node has a \"Copy\" item");
 
   // Remove new lines since getSelection() includes one between message and line
   // number, but the clipboard doesn't (see bug 1119503)
-  let selection = (HUD.iframeWindow.getSelection() + "").replace(/\r?\n|\r/g, " ");
+  let selection = (HUD.iframeWindow.getSelection() + "")
+    .replace(/\r?\n|\r/g, " ");
 
   copyItem.doCommand();
 
-  waitForClipboard((str) => { return selection.trim() == str.trim(); },
-    () => { goDoCommand("cmd_copy") },
-    deferred.resolve, deferred.resolve);
+  waitForClipboard((str) => {
+    return selection.trim() == str.trim();
+  }, () => {
+    goDoCommand("cmd_copy");
+  }, deferred.resolve, deferred.resolve);
   HUD = outputNode = null;
 
   return deferred.promise;
 }
-
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_588342_document_focus.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_588342_document_focus.js
@@ -3,22 +3,22 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
+"use strict";
+
 const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 588342";
 
 let fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
 
-"use strict";
-
 let test = asyncTest(function* () {
   let { browser } = yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
   yield consoleOpened(hud);
 
   is(fm.focusedWindow, browser.contentWindow,
      "content document has focus");
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_588730_text_node_insertion.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_588730_text_node_insertion.js
@@ -1,18 +1,19 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Tests that adding text to one of the output labels doesn't cause errors.
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
+"use strict";
 
-"use strict";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-console.html";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   yield testTextNodeInsertion(hud);
 });
@@ -45,9 +46,8 @@ function testTextNodeInsertion(hud) {
   executeSoon(function() {
     Services.console.unregisterListener(listener);
     ok(!error, "no error when adding text nodes as children of labels");
 
     return deferred.resolve();
   });
   return deferred.promise;
 }
-
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_588967_input_expansion.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_588967_input_expansion.js
@@ -1,26 +1,26 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
+"use strict";
 
-"use strict";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-console.html";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   testInputExpansion(hud);
 });
 
-
 function testInputExpansion(hud) {
   let input = hud.jsterm.inputNode;
 
   input.focus();
 
   is(input.getAttribute("multiline"), "true", "multiline is enabled");
 
   let ordinaryHeight = input.clientHeight;
@@ -37,9 +37,8 @@ function testInputExpansion(hud) {
 
   // Test if the inputNode shrinks again.
   input.value = "";
   EventUtils.synthesizeKey("d", {});
   is(input.clientHeight, ordinaryHeight, "the input's height is normal again");
 
   input = length = null;
 }
-
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_589162_css_filter.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_589162_css_filter.js
@@ -4,20 +4,20 @@
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *  Patrick Walton <pcwalton@mozilla.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-"use strict"
+"use strict";
 
 const TEST_URI = "data:text/html;charset=utf-8,<div style='font-size:3em;" +
-  "foobarCssParser:baz'>test CSS parser filter</div>";
+                 "foobarCssParser:baz'>test CSS parser filter</div>";
 
 /**
  * Unit test for bug 589162:
  * CSS filtering on the console does not work
  */
 function test() {
   Task.spawn(runner).then(finishTest);
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_592442_closing_brackets.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_592442_closing_brackets.js
@@ -23,15 +23,14 @@ let test = asyncTest(function*() {
   hud.jsterm.clearOutput();
   let jsterm = hud.jsterm;
 
   jsterm.setInputValue("document.getElementById)");
 
   let error = false;
   try {
     jsterm.complete(jsterm.COMPLETE_HINT_ONLY);
-  }
-  catch (ex) {
+  } catch (ex) {
     error = true;
   }
 
   ok(!error, "no error was thrown when an extraneous bracket was inserted");
 });
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_593003_iframe_wrong_hud.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_593003_iframe_wrong_hud.js
@@ -1,18 +1,24 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-593003-iframe-wrong-hud.html";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-593003-iframe-wrong-hud.html";
 
-const TEST_IFRAME_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-593003-iframe-wrong-hud-iframe.html";
+const TEST_IFRAME_URI = "http://example.com/browser/browser/devtools/" +
+                        "webconsole/test/test-bug-593003-iframe-wrong-" +
+                        "hud-iframe.html";
 
-const TEST_DUMMY_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
+const TEST_DUMMY_URI = "http://example.com/browser/browser/devtools/" +
+                       "webconsole/test/test-console.html";
 
 let tab1, tab2;
 
 function test() {
   loadTab(TEST_URI).then(({tab}) => {
     tab1 = tab;
 
     content.console.log("FOO");
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_594477_clickable_output.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_594477_clickable_output.js
@@ -3,23 +3,24 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-console.html";
 let HUD;
 let outputItem;
 let outputNode;
 
-"use strict";
-
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   HUD = yield openConsole();
   outputNode = HUD.outputNode;
 
   // reload the tab
   BrowserReload();
@@ -113,17 +114,17 @@ function networkPanelHidden() {
     document.removeEventListener("popupshown", networkPanelShowFailure, false);
 
     // Done with the network output. Now test the jsterm output and the property
     // panel.
     HUD.jsterm.execute("document").then((msg) => {
       info("jsterm execute 'document' callback");
 
       HUD.jsterm.once("variablesview-open", deferred.resolve);
-      let outputItem = msg.querySelector(".message-body a");
+      outputItem = msg.querySelector(".message-body a");
       ok(outputItem, "jsterm output message found");
 
       // Send the mousedown and click events such that the property panel opens.
       EventUtils.sendMouseEvent({type: "mousedown"}, outputItem);
       EventUtils.sendMouseEvent({type: "click"}, outputItem);
     });
   });
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_594497_history_arrow_keys.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_594497_history_arrow_keys.js
@@ -3,20 +3,22 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
+"use strict";
+
 let inputNode, values;
 
-let TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 594497 and bug 619598";
-"use strict";
+let TEST_URI = "data:text/html;charset=utf-8,Web Console test for " +
+               "bug 594497 and bug 619598";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   setup(hud);
   performTests();
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_595223_file_uri.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_595223_file_uri.js
@@ -55,10 +55,10 @@ function testMessages() {
       category: CATEGORY_NETWORK,
       severity: SEVERITY_LOG,
     },
     {
       text: "testscript.js",
       category: CATEGORY_NETWORK,
       severity: SEVERITY_LOG,
     }],
-  })
+  });
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_595350_multiple_windows_and_tabs.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_595350_multiple_windows_and_tabs.js
@@ -7,16 +7,18 @@
  *  Patrick Walton <pcwalton@mozilla.com>
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that the Web Console doesn't leak when multiple tabs and windows are
 // opened and then closed.
 
+"use strict";
+
 const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 595350";
 
 let win1 = window, win2;
 let openTabs = [];
 let loadedTabCount = 0;
 
 function test() {
   requestLongerTimeout(3);
@@ -93,9 +95,8 @@ function closeConsoles() {
 
   win2.close();
 
   win1.gBrowser.removeTab(openTabs[0]);
   win1.gBrowser.removeTab(openTabs[1]);
 
   openTabs = win1 = win2 = null;
 }
-
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_595934_message_categories.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_595934_message_categories.js
@@ -3,75 +3,90 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 595934 - message categories coverage.";
-const TESTS_PATH = "http://example.com/browser/browser/devtools/webconsole/test/";
+"use strict";
+
+const TEST_URI = "data:text/html;charset=utf-8,Web Console test for " +
+                 "bug 595934 - message categories coverage.";
+const TESTS_PATH = "http://example.com/browser/browser/devtools/webconsole/" +
+                   "test/";
 const TESTS = [
-  { // #0
+  {
+    // #0
     file: "test-bug-595934-css-loader.html",
     category: "CSS Loader",
     matchString: "text/css",
   },
-  { // #1
+  {
+    // #1
     file: "test-bug-595934-imagemap.html",
     category: "Layout: ImageMap",
     matchString: "shape=\"rect\"",
   },
-  { // #2
+  {
+    // #2
     file: "test-bug-595934-html.html",
     category: "HTML",
     matchString: "multipart/form-data",
     onload: function() {
       let form = content.document.querySelector("form");
       form.submit();
     },
   },
-  { // #3
+  {
+    // #3
     file: "test-bug-595934-workers.html",
     category: "Web Worker",
     matchString: "fooBarWorker",
     expectError: true,
   },
-  { // #4
+  {
+    // #4
     file: "test-bug-595934-malformedxml.xhtml",
     category: "malformed-xml",
     matchString: "no element found",
   },
-  { // #5
+  {
+    // #5
     file: "test-bug-595934-svg.xhtml",
     category: "SVG",
     matchString: "fooBarSVG",
   },
-  { // #6
+  {
+    // #6
     file: "test-bug-595934-css-parser.html",
     category: "CSS Parser",
     matchString: "foobarCssParser",
   },
-  { // #7
+  {
+    // #7
     file: "test-bug-595934-malformedxml-external.html",
     category: "malformed-xml",
     matchString: "</html>",
   },
-  { // #8
+  {
+    // #8
     file: "test-bug-595934-empty-getelementbyid.html",
     category: "DOM",
     matchString: "getElementById",
   },
-  { // #9
+  {
+    // #9
     file: "test-bug-595934-canvas-css.html",
     category: "CSS Parser",
     matchString: "foobarCanvasCssParser",
   },
-  { // #10
+  {
+    // #10
     file: "test-bug-595934-image.html",
     category: "Image",
     matchString: "corrupt",
   },
 ];
 
 let pos = -1;
 
@@ -82,40 +97,38 @@ let pageError = false;
 let output = null;
 let jsterm = null;
 let hud = null;
 let testEnded = false;
 
 let TestObserver = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
 
-  observe: function test_observe(aSubject)
-  {
-    if (testEnded || !(aSubject instanceof Ci.nsIScriptError)) {
+  observe: function testObserve(subject) {
+    if (testEnded || !(subject instanceof Ci.nsIScriptError)) {
       return;
     }
 
-    var expectedCategory = TESTS[pos].category;
+    let expectedCategory = TESTS[pos].category;
 
-    info("test #" + pos + " console observer got " + aSubject.category +
+    info("test #" + pos + " console observer got " + subject.category +
          ", is expecting " + expectedCategory);
 
-    if (aSubject.category == expectedCategory) {
+    if (subject.category == expectedCategory) {
       foundCategory = true;
       startNextTest();
-    }
-    else {
-      info("unexpected message was: " + aSubject.sourceName + ":" +
-           aSubject.lineNumber + "; " + aSubject.errorMessage);
+    } else {
+      info("unexpected message was: " + subject.sourceName + ":" +
+           subject.lineNumber + "; " + subject.errorMessage);
     }
   }
 };
 
-function consoleOpened(aHud) {
-  hud = aHud;
+function consoleOpened(hudConsole) {
+  hud = hudConsole;
   output = hud.outputNode;
   jsterm = hud.jsterm;
 
   Services.console.registerListener(TestObserver);
 
   registerCleanupFunction(testEnd);
 
   testNext();
@@ -126,57 +139,55 @@ function testNext() {
   foundCategory = false;
   foundText = false;
   pageLoaded = false;
   pageError = false;
 
   pos++;
   info("testNext: #" + pos);
   if (pos < TESTS.length) {
-    let test = TESTS[pos];
+    test = TESTS[pos];
 
     waitForMessages({
       webconsole: hud,
       messages: [{
-        name: "message for test #" + pos + ": '" + test.matchString +"'",
+        name: "message for test #" + pos + ": '" + test.matchString + "'",
         text: test.matchString,
       }],
     }).then(() => {
       foundText = true;
       startNextTest();
     });
 
     let testLocation = TESTS_PATH + test.file;
-    gBrowser.selectedBrowser.addEventListener("load", function onLoad(aEvent) {
+    gBrowser.selectedBrowser.addEventListener("load", function onLoad(evt) {
       if (content.location.href != testLocation) {
         return;
       }
-      gBrowser.selectedBrowser.removeEventListener(aEvent.type, onLoad, true);
+      gBrowser.selectedBrowser.removeEventListener(evt.type, onLoad, true);
 
       pageLoaded = true;
-      test.onload && test.onload(aEvent);
+      test.onload && test.onload(evt);
 
       if (test.expectError) {
         content.addEventListener("error", function _onError() {
           content.removeEventListener("error", _onError);
           pageError = true;
           startNextTest();
         });
         expectUncaughtException();
-      }
-      else {
+      } else {
         pageError = true;
       }
 
       startNextTest();
     }, true);
 
     content.location = testLocation;
-  }
-  else {
+  } else {
     testEnded = true;
     finishTest();
   }
 }
 
 function testEnd() {
   if (!testEnded) {
     info("foundCategory " + foundCategory + " foundText " + foundText +
@@ -195,9 +206,8 @@ function startNextTest() {
 
 function test() {
   requestLongerTimeout(2);
 
   loadTab(TEST_URI).then(() => {
     openConsole().then(consoleOpened);
   });
 }
-
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_597103_deactivateHUDForContext_unfocused_window.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_597103_deactivateHUDForContext_unfocused_window.js
@@ -3,17 +3,20 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-console.html";
 
 let tab1, tab2, win1, win2;
 let noErrors = true;
 
 function tab1Loaded() {
   win2 = OpenBrowserWindow();
   whenDelayedStartupFinished(win2, win2Loaded);
 }
@@ -34,47 +37,43 @@ function tab2Loaded(aEvent) {
       executeSoon(closeConsoles);
     }
   }
 
   function openConsoles() {
     try {
       let target1 = TargetFactory.forTab(tab1);
       gDevTools.showToolbox(target1, "webconsole").then(onWebConsoleOpen);
-    }
-    catch (ex) {
+    } catch (ex) {
       ok(false, "gDevTools.showToolbox(target1) exception: " + ex);
       noErrors = false;
     }
 
     try {
       let target2 = TargetFactory.forTab(tab2);
       gDevTools.showToolbox(target2, "webconsole").then(onWebConsoleOpen);
-    }
-    catch (ex) {
+    } catch (ex) {
       ok(false, "gDevTools.showToolbox(target2) exception: " + ex);
       noErrors = false;
     }
   }
 
   function closeConsoles() {
     try {
       let target1 = TargetFactory.forTab(tab1);
       gDevTools.closeToolbox(target1).then(function() {
         try {
           let target2 = TargetFactory.forTab(tab2);
           gDevTools.closeToolbox(target2).then(testEnd);
-        }
-        catch (ex) {
+        } catch (ex) {
           ok(false, "gDevTools.closeToolbox(target2) exception: " + ex);
           noErrors = false;
         }
       });
-    }
-    catch (ex) {
+    } catch (ex) {
       ok(false, "gDevTools.closeToolbox(target1) exception: " + ex);
       noErrors = false;
     }
   }
 
   function testEnd() {
     ok(noErrors, "there were no errors");
 
@@ -96,9 +95,8 @@ function tab2Loaded(aEvent) {
 
 function test() {
   loadTab(TEST_URI).then(() => {
     tab1 = gBrowser.selectedTab;
     win1 = window;
     tab1Loaded();
   });
 }
-
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_597136_network_requests_from_chrome.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_597136_network_requests_from_chrome.js
@@ -1,48 +1,50 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests that network requests from chrome don't cause the Web Console to
 // throw exceptions.
 
+"use strict";
+
 const TEST_URI = "http://example.com/";
 
 let good = true;
 let listener = {
-    QueryInterface: XPCOMUtils.generateQI([ Ci.nsIObserver ]),
-    observe: function(aSubject, aTopic, aData) {
-        if (aSubject instanceof Ci.nsIScriptError &&
-            aSubject.category === "XPConnect JavaScript" &&
-            aSubject.sourceName.contains("webconsole")) {
-            good = false;
-        }
+  QueryInterface: XPCOMUtils.generateQI([ Ci.nsIObserver ]),
+  observe: function(subject) {
+    if (subject instanceof Ci.nsIScriptError &&
+        subject.category === "XPConnect JavaScript" &&
+        subject.sourceName.contains("webconsole")) {
+      good = false;
     }
+  }
 };
 
 let xhr;
 
 function test() {
-    Services.console.registerListener(listener);
+  Services.console.registerListener(listener);
 
-    HUDService; // trigger a lazy-load of the HUD Service
+  // trigger a lazy-load of the HUD Service
+  HUDService;
 
-    xhr = new XMLHttpRequest();
-    xhr.addEventListener("load", xhrComplete, false);
-    xhr.open("GET", TEST_URI, true);
-    xhr.send(null);
+  xhr = new XMLHttpRequest();
+  xhr.addEventListener("load", xhrComplete, false);
+  xhr.open("GET", TEST_URI, true);
+  xhr.send(null);
 }
 
 function xhrComplete() {
-    xhr.removeEventListener("load", xhrComplete, false);
-    window.setTimeout(checkForException, 0);
+  xhr.removeEventListener("load", xhrComplete, false);
+  window.setTimeout(checkForException, 0);
 }
 
 function checkForException() {
-    ok(good, "no exception was thrown when sending a network request from a " +
-       "chrome window");
+  ok(good, "no exception was thrown when sending a network request from a " +
+     "chrome window");
 
-    Services.console.unregisterListener(listener);
-    listener = xhr = null;
+  Services.console.unregisterListener(listener);
+  listener = xhr = null;
 
-    finishTest();
+  finishTest();
 }
-
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_597460_filter_scroll.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_597460_filter_scroll.js
@@ -3,17 +3,20 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-network.html";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-network.html";
 const PREF = "devtools.webconsole.persistlog";
 
 let test = asyncTest(function* () {
   Services.prefs.setBoolPref(PREF, true);
 
   yield loadTab(TEST_URI);
   let hud = yield openConsole();
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_597756_reopen_closed_tab.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_597756_reopen_closed_tab.js
@@ -3,17 +3,20 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-597756-reopen-closed-tab.html";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-597756-reopen-closed-tab.html";
 
 let HUD;
 
 let test = asyncTest(function* () {
   expectUncaughtException();
 
   let { browser } = yield loadTab(TEST_URI);
   HUD = yield openConsole();
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_599725_response_headers.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_599725_response_headers.js
@@ -3,39 +3,40 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
+"use strict";
+
 const INIT_URI = "data:text/plain;charset=utf8,hello world";
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-599725-response-headers.sjs";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-599725-response-headers.sjs";
 
 let loads = 0;
-function performTest(aRequest, aConsole)
-{
+function performTest(request, console) {
   let deferred = promise.defer();
 
   let headers = null;
 
-  function readHeader(aName)
-  {
+  function readHeader(name) {
     for (let header of headers) {
-      if (header.name == aName) {
+      if (header.name == name) {
         return header.value;
       }
     }
     return null;
   }
 
-  aConsole.webConsoleClient.getResponseHeaders(aRequest.actor,
-    function (aResponse) {
-      headers = aResponse.headers;
+  console.webConsoleClient.getResponseHeaders(request.actor,
+    function(response) {
+      headers = response.headers;
       ok(headers, "we have the response headers for reload");
 
       let contentType = readHeader("Content-Type");
       let contentLength = readHeader("Content-Length");
 
       ok(!contentType, "we do not have the Content-Type header");
       isnot(contentLength, 60, "Content-Length != 60");
 
@@ -66,17 +67,17 @@ function waitForRequest() {
     performTest(req, console).then(deferred.resolve);
   };
   return deferred.promise;
 }
 
 let test = asyncTest(function* () {
   let { browser } = yield loadTab(INIT_URI);
 
-  let hud = yield openConsole();
+  yield openConsole();
 
   let gotLastRequest = waitForRequest();
 
   let loaded = loadBrowser(browser);
   content.location = TEST_URI;
   yield loaded;
 
   let reloaded = loadBrowser(browser);
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_600183_charset.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_600183_charset.js
@@ -3,35 +3,38 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const INIT_URI = "data:text/html;charset=utf-8,Web Console - bug 600183 test";
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-600183-charset.html";
+"use strict";
 
-function performTest(lastFinishedRequest, aConsole)
-{
+const INIT_URI = "data:text/html;charset=utf-8,Web Console - bug 600183 test";
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-600183-charset.html";
+
+function performTest(lastFinishedRequest, console) {
   let deferred = promise.defer();
 
   ok(lastFinishedRequest, "charset test page was loaded and logged");
   HUDService.lastFinishedRequest.callback = null;
 
   executeSoon(() => {
-    aConsole.webConsoleClient.getResponseContent(lastFinishedRequest.actor,
-      (aResponse) => {
-        ok(!aResponse.contentDiscarded, "response body was not discarded");
+    console.webConsoleClient.getResponseContent(lastFinishedRequest.actor,
+      (response) => {
+        ok(!response.contentDiscarded, "response body was not discarded");
 
-        let body = aResponse.content.text;
+        let body = response.content.text;
         ok(body, "we have the response body");
 
-        let chars = "\u7684\u95ee\u5019!"; // 的问候!
+        // 的问候!
+        let chars = "\u7684\u95ee\u5019!";
         isnot(body.indexOf("<p>" + chars + "</p>"), -1,
           "found the chinese simplified string");
 
         HUDService.lastFinishedRequest.callback = null;
         executeSoon(deferred.resolve);
       });
   });
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_601177_log_levels.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_601177_log_levels.js
@@ -3,23 +3,27 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 601177: log levels";
-const TEST_URI2 = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-601177-log-levels.html";
+"use strict";
+
+const TEST_URI = "data:text/html;charset=utf-8,Web Console test for " +
+                 "bug 601177: log levels";
+const TEST_URI2 = "http://example.com/browser/browser/devtools/webconsole/" +
+                  "test/test-bug-601177-log-levels.html";
 
 let test = asyncTest(function* () {
   Services.prefs.setBoolPref("javascript.options.strict", true);
 
-  let { browser } = yield loadTab(TEST_URI);
+  yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   expectUncaughtException();
 
   yield testLogLevels(hud);
 
   Services.prefs.clearUserPref("javascript.options.strict");
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_601352_scroll.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_601352_scroll.js
@@ -1,20 +1,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Test that the console output scrolls to JS eval results when there are many
 // messages displayed. See bug 601352.
 
+"use strict";
+
 function test() {
   Task.spawn(runner).then(finishTest);
 
   function* runner() {
-    let {tab} = yield loadTab("data:text/html;charset=utf-8,Web Console test for bug 601352");
+    let {tab} = yield loadTab("data:text/html;charset=utf-8,Web Console test " +
+                              "for bug 601352");
     let hud = yield openConsole(tab);
     hud.jsterm.clearOutput();
 
     let longMessage = "";
     for (let i = 0; i < 50; i++) {
       longMessage += "LongNonwrappingMessage";
     }
 
@@ -44,26 +47,30 @@ function test() {
     });
 
     let node = yield hud.jsterm.execute("1+1");
 
     let scrollNode = hud.outputNode.parentNode;
     let rectNode = node.getBoundingClientRect();
     let rectOutput = scrollNode.getBoundingClientRect();
     console.debug("rectNode", rectNode, "rectOutput", rectOutput);
-    console.log("scrollNode scrollHeight", scrollNode.scrollHeight, "scrollTop", scrollNode.scrollTop, "clientHeight", scrollNode.clientHeight);
+    console.log("scrollNode scrollHeight", scrollNode.scrollHeight,
+                "scrollTop", scrollNode.scrollTop, "clientHeight",
+                scrollNode.clientHeight);
 
     isnot(scrollNode.scrollTop, 0, "scroll location is not at the top");
 
     // The bounding client rect .top/left coordinates are relative to the
     // console iframe.
 
     // Visible scroll viewport.
     let height = rectOutput.height;
 
-    // Top and bottom coordinates of the last message node, relative to the outputNode.
+    // Top and bottom coordinates of the last message node, relative to the
+    // outputNode.
     let top = rectNode.top - rectOutput.top;
     let bottom = top + rectNode.height;
-    info("node top " + top + " node bottom " + bottom + " node clientHeight " + node.clientHeight);
+    info("node top " + top + " node bottom " + bottom + " node clientHeight " +
+         node.clientHeight);
 
     ok(top >= 0 && bottom <= height, "last message is visible");
   }
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_601667_filter_buttons.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_601667_filter_buttons.js
@@ -1,13 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests that the filter button UI logic works correctly.
 
+"use strict";
+
 const TEST_URI = "http://example.com/";
 
 let hud, hudId, hudBox;
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   hud = yield openConsole();
@@ -28,23 +30,23 @@ function testFilterButtons() {
 
   testIsolateFilterButton("net");
   testIsolateFilterButton("css");
   testIsolateFilterButton("js");
   testIsolateFilterButton("logging");
   testIsolateFilterButton("security");
 }
 
-function testMenuFilterButton(aCategory) {
-  let selector = ".webconsole-filter-button[category=\"" + aCategory + "\"]";
+function testMenuFilterButton(category) {
+  let selector = ".webconsole-filter-button[category=\"" + category + "\"]";
   let button = hudBox.querySelector(selector);
-  ok(button, "we have the \"" + aCategory + "\" button");
+  ok(button, "we have the \"" + category + "\" button");
 
   let firstMenuItem = button.querySelector("menuitem");
-  ok(firstMenuItem, "we have the first menu item for the \"" + aCategory +
+  ok(firstMenuItem, "we have the first menu item for the \"" + category +
      "\" button");
 
   // Turn all the filters off, if they were on.
   let menuItem = firstMenuItem;
   while (menuItem != null) {
     if (menuItem.hasAttribute("prefKey") && isChecked(menuItem)) {
       chooseMenuItem(menuItem);
     }
@@ -54,74 +56,74 @@ function testMenuFilterButton(aCategory)
   // Turn all the filters on; make sure the button gets checked.
   menuItem = firstMenuItem;
   let prefKey;
   while (menuItem) {
     if (menuItem.hasAttribute("prefKey")) {
       prefKey = menuItem.getAttribute("prefKey");
       chooseMenuItem(menuItem);
       ok(isChecked(menuItem), "menu item " + prefKey + " for category " +
-         aCategory + " is checked after clicking it");
+         category + " is checked after clicking it");
       ok(hud.ui.filterPrefs[prefKey], prefKey + " messages are " +
          "on after clicking the appropriate menu item");
     }
     menuItem = menuItem.nextSibling;
   }
-  ok(isChecked(button), "the button for category " + aCategory + " is " +
+  ok(isChecked(button), "the button for category " + category + " is " +
      "checked after turning on all its menu items");
 
   // Turn one filter off; make sure the button is still checked.
   prefKey = firstMenuItem.getAttribute("prefKey");
   chooseMenuItem(firstMenuItem);
   ok(!isChecked(firstMenuItem), "the first menu item for category " +
-     aCategory + " is no longer checked after clicking it");
+     category + " is no longer checked after clicking it");
   ok(!hud.ui.filterPrefs[prefKey], prefKey + " messages are " +
      "turned off after clicking the appropriate menu item");
-  ok(isChecked(button), "the button for category " + aCategory + " is still " +
+  ok(isChecked(button), "the button for category " + category + " is still " +
      "checked after turning off its first menu item");
 
   // Turn all the filters off by clicking the main part of the button.
   let subbutton = getMainButton(button);
-  ok(subbutton, "we have the subbutton for category " + aCategory);
+  ok(subbutton, "we have the subbutton for category " + category);
 
   clickButton(subbutton);
-  ok(!isChecked(button), "the button for category " + aCategory + " is " +
+  ok(!isChecked(button), "the button for category " + category + " is " +
      "no longer checked after clicking its main part");
 
   menuItem = firstMenuItem;
   while (menuItem) {
-    let prefKey = menuItem.getAttribute("prefKey");
+    prefKey = menuItem.getAttribute("prefKey");
     if (prefKey) {
       ok(!isChecked(menuItem), "menu item " + prefKey + " for category " +
-         aCategory + " is no longer checked after clicking the button");
+         category + " is no longer checked after clicking the button");
       ok(!hud.ui.filterPrefs[prefKey], prefKey + " messages are " +
          "off after clicking the button");
     }
     menuItem = menuItem.nextSibling;
   }
 
   // Turn all the filters on by clicking the main part of the button.
   clickButton(subbutton);
 
-  ok(isChecked(button), "the button for category " + aCategory + " is " +
+  ok(isChecked(button), "the button for category " + category + " is " +
      "checked after clicking its main part");
 
   menuItem = firstMenuItem;
   while (menuItem) {
     if (menuItem.hasAttribute("prefKey")) {
-      let prefKey = menuItem.getAttribute("prefKey");
+      prefKey = menuItem.getAttribute("prefKey");
       // The CSS/Log menu item should not be checked. See bug 971798.
-      if (aCategory == "css" && prefKey == "csslog") {
+      if (category == "css" && prefKey == "csslog") {
         ok(!isChecked(menuItem), "menu item " + prefKey + " for category " +
-           aCategory + " should not be checked after clicking the button");
+           category + " should not be checked after clicking the button");
         ok(!hud.ui.filterPrefs[prefKey], prefKey + " messages are " +
            "off after clicking the button");
       } else {
         ok(isChecked(menuItem), "menu item " + prefKey + " for category " +
-           aCategory + " is checked after clicking the button");
+           category + " is checked after clicking the button");
         ok(hud.ui.filterPrefs[prefKey], prefKey + " messages are " +
            "on after clicking the button");
       }
     }
     menuItem = menuItem.nextSibling;
   }
 
   // Uncheck the main button by unchecking all the filters
@@ -131,111 +133,110 @@ function testMenuFilterButton(aCategory)
     // Make sure it is not selected. See bug 971798.
     prefKey = menuItem.getAttribute("prefKey");
     if (prefKey && prefKey != "csslog") {
       chooseMenuItem(menuItem);
     }
     menuItem = menuItem.nextSibling;
   }
 
-  ok(!isChecked(button), "the button for category " + aCategory + " is " +
+  ok(!isChecked(button), "the button for category " + category + " is " +
      "unchecked after unchecking all its filters");
 
   // Turn all the filters on again by clicking the button.
   clickButton(subbutton);
 }
 
-function testIsolateFilterButton(aCategory) {
-  let selector = ".webconsole-filter-button[category=\"" + aCategory + "\"]";
+function testIsolateFilterButton(category) {
+  let selector = ".webconsole-filter-button[category=\"" + category + "\"]";
   let targetButton = hudBox.querySelector(selector);
-  ok(targetButton, "we have the \"" + aCategory + "\" button");
+  ok(targetButton, "we have the \"" + category + "\" button");
 
   // Get the main part of the filter button.
   let subbutton = getMainButton(targetButton);
-  ok(subbutton, "we have the subbutton for category " + aCategory);
+  ok(subbutton, "we have the subbutton for category " + category);
 
   // Turn on all the filters by alt clicking the main part of the button.
   altClickButton(subbutton);
-  ok(isChecked(targetButton), "the button for category " + aCategory +
+  ok(isChecked(targetButton), "the button for category " + category +
      " is checked after isolating for filter");
 
   // Check if all the filters for the target button are on.
   let menuItems = targetButton.querySelectorAll("menuitem");
   Array.forEach(menuItems, (item) => {
     let prefKey = item.getAttribute("prefKey");
     // The CSS/Log filter should not be checked. See bug 971798.
-    if (aCategory == "css" && prefKey == "csslog") {
+    if (category == "css" && prefKey == "csslog") {
       ok(!isChecked(item), "menu item " + prefKey + " for category " +
-        aCategory + " should not be checked after isolating for " + aCategory);
+        category + " should not be checked after isolating for " + category);
       ok(!hud.ui.filterPrefs[prefKey], prefKey + " messages should be " +
-        "turned off after isolating for " + aCategory);
+        "turned off after isolating for " + category);
     } else if (prefKey) {
       ok(isChecked(item), "menu item " + prefKey + " for category " +
-        aCategory + " is checked after isolating for " + aCategory);
+        category + " is checked after isolating for " + category);
       ok(hud.ui.filterPrefs[prefKey], prefKey + " messages are " +
-        "turned on after isolating for " + aCategory);
+        "turned on after isolating for " + category);
     }
   });
 
   // Ensure all other filter buttons are toggled off and their
   // associated filters are turned off
   let buttons = hudBox.querySelectorAll(".webconsole-filter-button[category]");
   Array.forEach(buttons, (filterButton) => {
     if (filterButton !== targetButton) {
-      let category = filterButton.getAttribute("category");
+      let categoryBtn = filterButton.getAttribute("category");
       ok(!isChecked(filterButton), "the button for category " +
-        category + " is unchecked after isolating for " + aCategory);
+         categoryBtn + " is unchecked after isolating for " + category);
 
       menuItems = filterButton.querySelectorAll("menuitem");
       Array.forEach(menuItems, (item) => {
         let prefKey = item.getAttribute("prefKey");
         if (prefKey) {
           ok(!isChecked(item), "menu item " + prefKey + " for category " +
-            aCategory + " is unchecked after isolating for " + aCategory);
+            category + " is unchecked after isolating for " + category);
           ok(!hud.ui.filterPrefs[prefKey], prefKey + " messages are " +
-            "turned off after isolating for " + aCategory);
+            "turned off after isolating for " + category);
         }
       });
 
       // Turn all the filters on again by clicking the button.
       let mainButton = getMainButton(filterButton);
       clickButton(mainButton);
     }
   });
 }
 
 /**
  * Return the main part of the target filter button.
  */
-function getMainButton(aTargetButton) {
-  let anonymousNodes = hud.ui.document.getAnonymousNodes(aTargetButton);
+function getMainButton(targetButton) {
+  let anonymousNodes = hud.ui.document.getAnonymousNodes(targetButton);
   let subbutton;
 
   for (let i = 0; i < anonymousNodes.length; i++) {
     let node = anonymousNodes[i];
     if (node.classList.contains("toolbarbutton-menubutton-button")) {
       subbutton = node;
       break;
     }
   }
 
   return subbutton;
 }
 
-function clickButton(aNode) {
-  EventUtils.sendMouseEvent({ type: "click" }, aNode);
+function clickButton(node) {
+  EventUtils.sendMouseEvent({ type: "click" }, node);
 }
 
-function altClickButton(aNode) {
-  EventUtils.sendMouseEvent({ type: "click", altKey: true }, aNode);
+function altClickButton(node) {
+  EventUtils.sendMouseEvent({ type: "click", altKey: true }, node);
 }
 
-function chooseMenuItem(aNode) {
+function chooseMenuItem(node) {
   let event = document.createEvent("XULCommandEvent");
   event.initCommandEvent("command", true, true, window, 0, false, false, false,
                          false, null);
-  aNode.dispatchEvent(event);
+  node.dispatchEvent(event);
 }
 
-function isChecked(aNode) {
-  return aNode.getAttribute("checked") === "true";
+function isChecked(node) {
+  return node.getAttribute("checked") === "true";
 }
-
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_602572_log_bodies_checkbox.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_602572_log_bodies_checkbox.js
@@ -3,166 +3,175 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *   Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-let menuitems = [], menupopups = [], huds = [], tabs = [], runCount = 0;
+"use strict";
 
-const TEST_URI1 = "data:text/html;charset=utf-8,Web Console test for bug 602572: log bodies checkbox. tab 1";
-const TEST_URI2 = "data:text/html;charset=utf-8,Web Console test for bug 602572: log bodies checkbox. tab 2";
+let menuitems = [];
+let menupopups = [];
+let huds = [];
+let tabs = [];
+let runCount = 0;
 
-function test()
-{
+const TEST_URI1 = "data:text/html;charset=utf-8,Web Console test for " +
+                  "bug 602572: log bodies checkbox. tab 1";
+const TEST_URI2 = "data:text/html;charset=utf-8,Web Console test for " +
+                  "bug 602572: log bodies checkbox. tab 2";
+
+function test() {
   if (runCount == 0) {
     requestLongerTimeout(2);
   }
 
+  // open tab 2
+  function openTab() {
+    loadTab(TEST_URI2).then((tab) => {
+      tabs.push(tab.tab);
+      openConsole().then((hud) => {
+        hud.iframeWindow.mozRequestAnimationFrame(startTest);
+      });
+    });
+  }
+
   // open tab 1
   loadTab(TEST_URI1).then((tab) => {
     tabs.push(tab.tab);
     openConsole().then((hud) => {
       hud.iframeWindow.mozRequestAnimationFrame(() => {
         info("iframe1 root height " + hud.ui.rootElement.clientHeight);
 
-        // open tab 2
-        loadTab(TEST_URI2).then((tab) => {
-          tabs.push(tab.tab);
-          openConsole().then((hud) => hud.iframeWindow.mozRequestAnimationFrame(startTest));
-        });
+        openTab();
       });
     });
   });
 }
 
-function startTest()
-{
+function startTest() {
   // Find the relevant elements in the Web Console of tab 2.
-  let win2 = tabs[runCount*2 + 1].linkedBrowser.contentWindow;
+  let win2 = tabs[runCount * 2 + 1].linkedBrowser.contentWindow;
   huds[1] = HUDService.getHudByWindow(win2);
   info("startTest: iframe2 root height " + huds[1].ui.rootElement.clientHeight);
 
   if (runCount == 0) {
     menuitems[1] = huds[1].ui.rootElement.querySelector("#saveBodies");
-  }
-  else {
-    menuitems[1] = huds[1].ui.rootElement.querySelector("#saveBodiesContextMenu");
+  } else {
+    menuitems[1] = huds[1].ui.rootElement
+                             .querySelector("#saveBodiesContextMenu");
   }
   menupopups[1] = menuitems[1].parentNode;
 
   // Open the context menu from tab 2.
   menupopups[1].addEventListener("popupshown", onpopupshown2, false);
   executeSoon(function() {
     menupopups[1].openPopup();
   });
 }
 
-function onpopupshown2(aEvent)
-{
-  menupopups[1].removeEventListener(aEvent.type, onpopupshown2, false);
+function onpopupshown2(evt) {
+  menupopups[1].removeEventListener(evt.type, onpopupshown2, false);
 
   // By default bodies are not logged.
   isnot(menuitems[1].getAttribute("checked"), "true",
         "menuitems[1] is not checked");
 
   ok(!huds[1].ui._saveRequestAndResponseBodies, "bodies are not logged");
 
   // Enable body logging.
   huds[1].ui.setSaveRequestAndResponseBodies(true).then(() => {
     menupopups[1].hidePopup();
   });
 
-  menupopups[1].addEventListener("popuphidden", function _onhidden(aEvent) {
-    menupopups[1].removeEventListener(aEvent.type, _onhidden, false);
+  menupopups[1].addEventListener("popuphidden", function _onhidden(evtPopup) {
+    menupopups[1].removeEventListener(evtPopup.type, _onhidden, false);
 
     info("menupopups[1] hidden");
 
     // Reopen the context menu.
-    huds[1].ui.once("save-bodies-ui-toggled", () => testpopup2b(aEvent));
+    huds[1].ui.once("save-bodies-ui-toggled", () => testpopup2b(evtPopup));
     menupopups[1].openPopup();
   }, false);
 }
 
-function testpopup2b(aEvent) {
+function testpopup2b() {
   is(menuitems[1].getAttribute("checked"), "true", "menuitems[1] is checked");
 
-  menupopups[1].addEventListener("popuphidden", function _onhidden(aEvent) {
-    menupopups[1].removeEventListener(aEvent.type, _onhidden, false);
+  menupopups[1].addEventListener("popuphidden", function _onhidden(evtPopup) {
+    menupopups[1].removeEventListener(evtPopup.type, _onhidden, false);
 
     info("menupopups[1] hidden");
 
     // Switch to tab 1 and open the Web Console context menu from there.
-    gBrowser.selectedTab = tabs[runCount*2];
+    gBrowser.selectedTab = tabs[runCount * 2];
     waitForFocus(function() {
       // Find the relevant elements in the Web Console of tab 1.
-      let win1 = tabs[runCount*2].linkedBrowser.contentWindow;
+      let win1 = tabs[runCount * 2].linkedBrowser.contentWindow;
       huds[0] = HUDService.getHudByWindow(win1);
 
       info("iframe1 root height " + huds[0].ui.rootElement.clientHeight);
 
       menuitems[0] = huds[0].ui.rootElement.querySelector("#saveBodies");
       menupopups[0] = huds[0].ui.rootElement.querySelector("menupopup");
 
       menupopups[0].addEventListener("popupshown", onpopupshown1, false);
       executeSoon(() => menupopups[0].openPopup());
-    }, tabs[runCount*2].linkedBrowser.contentWindow);
+    }, tabs[runCount * 2].linkedBrowser.contentWindow);
   }, false);
 
   executeSoon(function() {
     menupopups[1].hidePopup();
   });
 }
 
-function onpopupshown1(aEvent)
-{
-  menupopups[0].removeEventListener(aEvent.type, onpopupshown1, false);
+function onpopupshown1(evt) {
+  menupopups[0].removeEventListener(evt.type, onpopupshown1, false);
 
   // The menuitem checkbox must not be in sync with the other tabs.
   isnot(menuitems[0].getAttribute("checked"), "true",
         "menuitems[0] is not checked");
 
   // Enable body logging for tab 1 as well.
   huds[0].ui.setSaveRequestAndResponseBodies(true).then(() => {
     menupopups[0].hidePopup();
   });
 
   // Close the menu, and switch back to tab 2.
-  menupopups[0].addEventListener("popuphidden", function _onhidden(aEvent) {
-    menupopups[0].removeEventListener(aEvent.type, _onhidden, false);
+  menupopups[0].addEventListener("popuphidden", function _onhidden(evtPopup) {
+    menupopups[0].removeEventListener(evtPopup.type, _onhidden, false);
 
     info("menupopups[0] hidden");
 
-    gBrowser.selectedTab = tabs[runCount*2 + 1];
+    gBrowser.selectedTab = tabs[runCount * 2 + 1];
     waitForFocus(function() {
       // Reopen the context menu from tab 2.
-      huds[1].ui.once("save-bodies-ui-toggled", () => testpopup2c(aEvent));
+      huds[1].ui.once("save-bodies-ui-toggled", () => testpopup2c(evtPopup));
       menupopups[1].openPopup();
-    }, tabs[runCount*2 + 1].linkedBrowser.contentWindow);
+    }, tabs[runCount * 2 + 1].linkedBrowser.contentWindow);
   }, false);
 }
 
-function testpopup2c(aEvent) {
+function testpopup2c() {
   is(menuitems[1].getAttribute("checked"), "true", "menuitems[1] is checked");
 
-  menupopups[1].addEventListener("popuphidden", function _onhidden(aEvent) {
-    menupopups[1].removeEventListener(aEvent.type, _onhidden, false);
+  menupopups[1].addEventListener("popuphidden", function _onhidden(evtPopup) {
+    menupopups[1].removeEventListener(evtPopup.type, _onhidden, false);
 
     info("menupopups[1] hidden");
 
     // Done if on second run
     closeConsole(gBrowser.selectedTab).then(function() {
       if (runCount == 0) {
         runCount++;
         info("start second run");
         executeSoon(test);
-      }
-      else {
+      } else {
         gBrowser.removeCurrentTab();
         gBrowser.selectedTab = tabs[2];
         gBrowser.removeCurrentTab();
         gBrowser.selectedTab = tabs[1];
         gBrowser.removeCurrentTab();
         gBrowser.selectedTab = tabs[0];
         gBrowser.removeCurrentTab();
         huds = menuitems = menupopups = tabs = null;
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_603750_websocket.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_603750_websocket.js
@@ -3,21 +3,25 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-603750-websocket.html";
-const TEST_URI2 = "data:text/html;charset=utf-8,Web Console test for bug 603750: Web Socket errors";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-603750-websocket.html";
+const TEST_URI2 = "data:text/html;charset=utf-8,Web Console test for " +
+                  "bug 603750: Web Socket errors";
 
 let test = asyncTest(function* () {
-  let { browser } = yield loadTab(TEST_URI2);
+  yield loadTab(TEST_URI2);
 
   let hud = yield openConsole();
 
   content.location = TEST_URI;
 
   yield waitForMessages({
     webconsole: hud,
     messages: [
@@ -28,10 +32,11 @@ let test = asyncTest(function* () {
         severity: SEVERITY_ERROR,
       },
       {
         text: "ws://0.0.0.0:82",
         source: { url: "test-bug-603750-websocket.js" },
         category: CATEGORY_JS,
         severity: SEVERITY_ERROR,
       },
-    ]});
+    ]
+  });
 });
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_611795.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_611795.js
@@ -1,18 +1,19 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-const TEST_URI = 'data:text/html;charset=utf-8,<div style="-moz-opacity:0;">test repeated' +
-                 ' css warnings</div><p style="-moz-opacity:0">hi</p>';
+"use strict";
+
+const TEST_URI = 'data:text/html;charset=utf-8,<div style="-moz-opacity:0;">' +
+                 'test repeated css warnings</div><p style="-moz-opacity:0">' +
+                 'hi</p>';
 let hud;
 
-"use strict";
-
 /**
  * Unit test for bug 611795:
  * Repeated CSS messages get collapsed into one.
  */
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
@@ -23,38 +24,39 @@ let test = asyncTest(function* () {
   yield loadBrowser(gBrowser.selectedBrowser);
 
   yield onContentLoaded();
   yield testConsoleLogRepeats();
 
   hud = null;
 });
 
-function onContentLoaded()
-{
+function onContentLoaded() {
   let cssWarning = "Unknown property '-moz-opacity'.  Declaration dropped.";
 
   return waitForMessages({
     webconsole: hud,
     messages: [{
       text: cssWarning,
       category: CATEGORY_CSS,
       severity: SEVERITY_WARNING,
       repeats: 2,
     }],
   });
 }
 
-function testConsoleLogRepeats()
-{
+function testConsoleLogRepeats() {
   let jsterm = hud.jsterm;
 
   jsterm.clearOutput();
 
-  jsterm.setInputValue("for (let i = 0; i < 10; ++i) console.log('this is a line of reasonably long text that I will use to verify that the repeated text node is of an appropriate size.');");
+  jsterm.setInputValue("for (let i = 0; i < 10; ++i) console.log('this is a " +
+                       "line of reasonably long text that I will use to " +
+                       "verify that the repeated text node is of an " +
+                       "appropriate size.');");
   jsterm.execute();
 
   return waitForMessages({
     webconsole: hud,
     messages: [{
       text: "this is a line of reasonably long text",
       category: CATEGORY_WEBDEV,
       severity: SEVERITY_LOG,
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_613013_console_api_iframe.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_613013_console_api_iframe.js
@@ -3,18 +3,20 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-613013-console-api-iframe.html";
+"use strict";
 
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-613013-console-api-iframe.html";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   BrowserReload();
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_613280_jsterm_copy.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_613280_jsterm_copy.js
@@ -1,45 +1,47 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *   Mihai Șucan <mihai.sucan@gmail.com>
  */
 
+"use strict";
+
 const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 613280";
 
 function test() {
   loadTab(TEST_URI).then(() => {
     openConsole().then((HUD) => {
       content.console.log("foobarBazBug613280");
       waitForMessages({
         webconsole: HUD,
         messages: [{
           text: "foobarBazBug613280",
           category: CATEGORY_WEBDEV,
           severity: SEVERITY_LOG,
         }],
       }).then(performTest.bind(null, HUD));
-    })
+    });
   });
 }
 
 function performTest(HUD, [result]) {
   let msg = [...result.matched][0];
   let input = HUD.jsterm.inputNode;
   let selection = getSelection();
   let contentSelection = content.getSelection();
 
-  let clipboard_setup = function() {
+  let clipboardSetup = function() {
     goDoCommand("cmd_copy");
   };
 
-  let clipboard_copy_done = function() {
+  let clipboardCopyDone = function() {
     finishTest();
   };
 
   // Check if we first need to clear any existing selections.
   if (selection.rangeCount > 0 || contentSelection.rangeCount > 0 ||
       input.selectionStart != input.selectionEnd) {
     if (input.selectionStart != input.selectionEnd) {
       input.selectionStart = input.selectionEnd = 0;
@@ -51,30 +53,32 @@ function performTest(HUD, [result]) {
 
     if (contentSelection.rangeCount > 0) {
       contentSelection.removeAllRanges();
     }
 
     goUpdateCommand("cmd_copy");
   }
 
-  let controller = top.document.commandDispatcher.
-                   getControllerForCommand("cmd_copy");
+  let controller = top.document.commandDispatcher
+                               .getControllerForCommand("cmd_copy");
   is(controller.isCommandEnabled("cmd_copy"), false, "cmd_copy is disabled");
 
   HUD.ui.output.selectMessage(msg);
   HUD.outputNode.focus();
 
   goUpdateCommand("cmd_copy");
 
-  controller = top.document.commandDispatcher.
-               getControllerForCommand("cmd_copy");
+  controller = top.document.commandDispatcher
+                           .getControllerForCommand("cmd_copy");
   is(controller.isCommandEnabled("cmd_copy"), true, "cmd_copy is enabled");
 
   // Remove new lines since getSelection() includes one between message and line
   // number, but the clipboard doesn't (see bug 1119503)
-  let selectionText = (HUD.iframeWindow.getSelection() + "").replace(/\r?\n|\r/g, " ");
+  let selectionText = (HUD.iframeWindow.getSelection() + "")
+    .replace(/\r?\n|\r/g, " ");
   isnot(selectionText.indexOf("foobarBazBug613280"), -1,
         "selection text includes 'foobarBazBug613280'");
 
-  waitForClipboard((str) => { return str.trim() == selectionText.trim(); },
-                   clipboard_setup, clipboard_copy_done, clipboard_copy_done);
+  waitForClipboard((str) => {
+    return str.trim() == selectionText.trim();
+  }, clipboardSetup, clipboardCopyDone, clipboardCopyDone);
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_613642_maintain_scroll.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_613642_maintain_scroll.js
@@ -2,17 +2,20 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *   Mihai Șucan <mihai.sucan@gmail.com>
  */
 
-let TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 613642: remember scroll location";
+"use strict";
+
+let TEST_URI = "data:text/html;charset=utf-8,Web Console test for " +
+               "bug 613642: remember scroll location";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   hud.jsterm.clearOutput();
   let outputNode = hud.outputNode;
@@ -47,17 +50,16 @@ let test = asyncTest(function* () {
     scrollBox.onscroll = null;
     is(scrollBox.scrollTop, 0, "scroll location updated (moved to top)");
     scrolled.resolve();
   };
   EventUtils.synthesizeKey("VK_HOME", {}, hud.iframeWindow);
 
   yield scrolled.promise;
 
-
   // add a message and make sure scroll doesn't change
   content.console.log("test message 150");
 
   yield waitForMessages({
     webconsole: hud,
     messages: [{
       text: "test message 150",
       category: CATEGORY_WEBDEV,
@@ -104,13 +106,14 @@ let test = asyncTest(function* () {
 
   scrolled = promise.defer();
   scrollBox.onscroll = () => {
     if (scrollBox.scrollTop == oldScrollTop) {
       // Wait for scroll to change.
       return;
     }
     scrollBox.onscroll = null;
-    isnot(scrollBox.scrollTop, oldScrollTop, "scroll location updated (moved to bottom again)");
+    isnot(scrollBox.scrollTop, oldScrollTop,
+          "scroll location updated (moved to bottom again)");
     scrolled.resolve();
   };
   yield scrolled.promise;
 });
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_613642_prune_scroll.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_613642_prune_scroll.js
@@ -4,24 +4,25 @@
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *   Mihai Șucan <mihai.sucan@gmail.com>
  */
 
 "use strict";
 
-const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 613642: maintain scroll with pruning of old messages";
+const TEST_URI = "data:text/html;charset=utf-8,Web Console test for " +
+                 "bug 613642: maintain scroll with pruning of old messages";
 
 let hud;
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
-  let hud = yield openConsole();
+  hud = yield openConsole();
 
   hud.jsterm.clearOutput();
 
   let outputNode = hud.outputNode;
 
   Services.prefs.setIntPref("devtools.hud.loglimit.console", 140);
   let scrollBoxElement = outputNode.parentNode;
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_614793_jsterm_scroll.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_614793_jsterm_scroll.js
@@ -2,22 +2,25 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *   Mihai Șucan <mihai.sucan@gmail.com>
  */
 
-const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 614793: jsterm result scroll";
+"use strict";
+
+const TEST_URI = "data:text/html;charset=utf-8,Web Console test for " +
+                 "bug 614793: jsterm result scroll";
 
 "use strict";
 
 let test = asyncTest(function* () {
-  let { browser } = yield loadTab(TEST_URI);
+  yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   yield consoleOpened(hud);
 });
 
 function consoleOpened(hud) {
   let deferred = promise.defer();
@@ -41,18 +44,17 @@ function consoleOpened(hud) {
     }],
   }).then(() => {
     oldScrollTop = scrollNode.scrollTop;
     isnot(oldScrollTop, 0, "scroll location is not at the top");
 
     hud.jsterm.execute("'hello world'").then(onExecute);
   });
 
-  function onExecute(msg)
-  {
+  function onExecute(msg) {
     isnot(scrollNode.scrollTop, oldScrollTop, "scroll location updated");
 
     oldScrollTop = scrollNode.scrollTop;
 
     msg.scrollIntoView(false);
 
     is(scrollNode.scrollTop, oldScrollTop, "scroll location is the same");
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_618078_network_exceptions.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_618078_network_exceptions.js
@@ -1,18 +1,21 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Tests that we report JS exceptions in event handlers coming from
 // network requests, like onreadystate for XHR. See bug 618078.
 
+"use strict";
+
 const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 618078";
-const TEST_URI2 = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-618078-network-exceptions.html";
+const TEST_URI2 = "http://example.com/browser/browser/devtools/webconsole/" +
+                  "test/test-bug-618078-network-exceptions.html";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   expectUncaughtException();
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_618311_close_panels.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_618311_close_panels.js
@@ -1,35 +1,37 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-console.html";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   BrowserReload();
 
   let results = yield waitForMessages({
     webconsole: hud,
     messages: [{
       text: "test-console.html",
       category: CATEGORY_NETWORK,
       severity: SEVERITY_LOG,
     }],
-  })
+  });
 
   yield performTest(hud, results);
 });
 
-
 function performTest(HUD, results) {
   let deferred = promise.defer();
 
   let networkMessage = [...results[0].matched][0];
   ok(networkMessage, "network message element");
 
   let networkLink = networkMessage.querySelector(".url");
   ok(networkLink, "found network message link");
@@ -77,14 +79,15 @@ function performTest(HUD, results) {
 
   registerCleanupFunction(function() {
     is(popupsShown, 1, "correct number of popups shown");
     if (popupsShown != 1) {
       document.removeEventListener("popupshown", onpopupshown, false);
     }
   });
 
-  EventUtils.sendMouseEvent({ type: "mousedown" }, networkLink, HUD.iframeWindow);
+  EventUtils.sendMouseEvent({ type: "mousedown" }, networkLink,
+                              HUD.iframeWindow);
   EventUtils.sendMouseEvent({ type: "mouseup" }, networkLink, HUD.iframeWindow);
   EventUtils.sendMouseEvent({ type: "click" }, networkLink, HUD.iframeWindow);
 
   return deferred.promise;
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_621644_jsterm_dollar.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_621644_jsterm_dollar.js
@@ -2,28 +2,30 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *   Mihai Sucan <mihai.sucan@gmail.com>
  */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-621644-jsterm-dollar.html";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-621644-jsterm-dollar.html";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   yield test$(hud);
   yield test$$(hud);
 });
 
-
 function* test$(HUD) {
   let deferred = promise.defer();
 
   HUD.jsterm.clearOutput();
 
   HUD.jsterm.execute("$(document.body)", (msg) => {
     ok(msg.textContent.indexOf("<p>") > -1,
        "jsterm output is correct for $()");
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_622303_persistent_filters.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_622303_persistent_filters.js
@@ -1,11 +1,13 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
+"use strict";
+
 const prefs = {
   "net": [
     "network",
     "netwarn",
     "netxhr",
     "networkinfo"
   ],
   "css": [
@@ -57,32 +59,33 @@ function onConsoleOpen(hud) {
   let deferred = promise.defer();
 
   let hudBox = hud.ui.rootElement;
 
   // Check if the filters menuitems exists and are checked
   for (let category in prefs) {
     let button = hudBox.querySelector(".webconsole-filter-button[category=\""
                                       + category + "\"]");
-    ok(isChecked(button), "main button for " + category + " category is checked");
+    ok(isChecked(button), "main button for " + category +
+       " category is checked");
 
     prefs[category].forEach(function(pref) {
       let menuitem = hudBox.querySelector("menuitem[prefKey=" + pref + "]");
       ok(isChecked(menuitem), "menuitem for " + pref + " is checked");
     });
   }
 
   // Set all prefs to false
   for (let category in prefs) {
     prefs[category].forEach(function(pref) {
       hud.setFilterState(pref, false);
     });
   }
 
-  //Re-init the console
+  // Re-init the console
   closeConsole().then(() => {
     openConsole().then(deferred.resolve);
   });
 
   return deferred.promise;
 }
 
 function onConsoleReopen1(hud) {
@@ -90,17 +93,18 @@ function onConsoleReopen1(hud) {
   let deferred = promise.defer();
 
   let hudBox = hud.ui.rootElement;
 
   // Check if the filter button and menuitems are unchecked
   for (let category in prefs) {
     let button = hudBox.querySelector(".webconsole-filter-button[category=\""
                                            + category + "\"]");
-    ok(isUnchecked(button), "main button for " + category + " category is not checked");
+    ok(isUnchecked(button), "main button for " + category +
+       " category is not checked");
 
     prefs[category].forEach(function(pref) {
       let menuitem = hudBox.querySelector("menuitem[prefKey=" + pref + "]");
       ok(isUnchecked(menuitem), "menuitem for " + pref + " is not checked");
     });
   }
 
   // Set first pref in each category to true
@@ -118,19 +122,20 @@ function onConsoleReopen1(hud) {
 
 function onConsoleReopen2(hud) {
   info("testing after reopening again");
 
   let hudBox = hud.ui.rootElement;
 
   // Check the main category button is checked and first menuitem is checked
   for (let category in prefs) {
-    let button = hudBox.querySelector(".webconsole-filter-button[category=\""
-                                           + category + "\"]");
-    ok(isChecked(button), category  + " button is checked when first pref is true");
+    let button = hudBox.querySelector(".webconsole-filter-button[category=\"" +
+                                      category + "\"]");
+    ok(isChecked(button), category +
+       " button is checked when first pref is true");
 
     let pref = prefs[category][0];
     let menuitem = hudBox.querySelector("menuitem[prefKey=" + pref + "]");
     ok(isChecked(menuitem), "first " + category + " menuitem is checked");
   }
 }
 
 function isChecked(aNode) {
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_623749_ctrl_a_select_all_winnt.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_623749_ctrl_a_select_all_winnt.js
@@ -1,14 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Test for https://bugzilla.mozilla.org/show_bug.cgi?id=623749
 // Map Control + A to Select All, In the web console input, on Windows
 
+"use strict";
+
 const TEST_URI = "data:text/html;charset=utf-8,Test console for bug 623749";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   let jsterm = hud.jsterm;
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_630733_response_redirect_headers.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_630733_response_redirect_headers.js
@@ -2,107 +2,106 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * Contributor(s):
  *   Mihai Sucan <mihai.sucan@gmail.com>
  */
 
-const TEST_URI = "data:text/html;charset=utf-8,<p>Web Console test for bug 630733";
-const TEST_URI2 = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-630733-response-redirect-headers.sjs";
+"use strict";
+
+const TEST_URI = "data:text/html;charset=utf-8,<p>Web Console test for " +
+                 "bug 630733";
+const TEST_URI2 = "http://example.com/browser/browser/devtools/webconsole/" +
+                  "test/test-bug-630733-response-redirect-headers.sjs";
 
 let lastFinishedRequests = {};
 let webConsoleClient;
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   yield consoleOpened(hud);
   yield getHeaders();
   yield getContent();
 
   performTest();
 });
 
-function consoleOpened(hud)
-{
+function consoleOpened(hud) {
   let deferred = promise.defer();
 
   webConsoleClient = hud.ui.webConsoleClient;
   hud.ui.setSaveRequestAndResponseBodies(true).then(() => {
     ok(hud.ui._saveRequestAndResponseBodies,
       "The saveRequestAndResponseBodies property was successfully set.");
 
-    HUDService.lastFinishedRequest.callback = (aHttpRequest)  => {
+    HUDService.lastFinishedRequest.callback = (aHttpRequest) => {
       let status = aHttpRequest.response.status;
       lastFinishedRequests[status] = aHttpRequest;
       if ("301" in lastFinishedRequests &&
           "404" in lastFinishedRequests) {
         deferred.resolve();
       }
-    }
+    };
     content.location = TEST_URI2;
   });
 
   return deferred.promise;
 }
 
-function getHeaders()
-{
+function getHeaders() {
   let deferred = promise.defer();
 
   HUDService.lastFinishedRequest.callback = null;
 
   ok("301" in lastFinishedRequests, "request 1: 301 Moved Permanently");
   ok("404" in lastFinishedRequests, "request 2: 404 Not found");
 
   webConsoleClient.getResponseHeaders(lastFinishedRequests["301"].actor,
-    function (aResponse) {
-      lastFinishedRequests["301"].response.headers = aResponse.headers;
+    function(response) {
+      lastFinishedRequests["301"].response.headers = response.headers;
 
       webConsoleClient.getResponseHeaders(lastFinishedRequests["404"].actor,
-        function (aResponse) {
-          lastFinishedRequests["404"].response.headers = aResponse.headers;
+        function(resp) {
+          lastFinishedRequests["404"].response.headers = resp.headers;
           executeSoon(deferred.resolve);
         });
     });
   return deferred.promise;
 }
 
-function getContent()
-{
+function getContent() {
   let deferred = promise.defer();
 
   webConsoleClient.getResponseContent(lastFinishedRequests["301"].actor,
-    function (aResponse) {
-      lastFinishedRequests["301"].response.content = aResponse.content;
-      lastFinishedRequests["301"].discardResponseBody = aResponse.contentDiscarded;
+    function(response) {
+      lastFinishedRequests["301"].response.content = response.content;
+      lastFinishedRequests["301"].discardResponseBody = response.contentDiscarded;
 
       webConsoleClient.getResponseContent(lastFinishedRequests["404"].actor,
-        function (aResponse) {
-          lastFinishedRequests["404"].response.content = aResponse.content;
+        function(resp) {
+          lastFinishedRequests["404"].response.content = resp.content;
           lastFinishedRequests["404"].discardResponseBody =
-            aResponse.contentDiscarded;
+            resp.contentDiscarded;
 
           webConsoleClient = null;
           executeSoon(deferred.resolve);
         });
     });
   return deferred.promise;
 }
 
-function performTest()
-{
-  function readHeader(aName)
-  {
+function performTest() {
+  function readHeader(name) {
     for (let header of headers) {
-      if (header.name == aName) {
+      if (header.name == name) {
         return header.value;
       }
     }
     return null;
   }
 
   let headers = lastFinishedRequests["301"].response.headers;
   is(readHeader("Content-Type"), "text/html",
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_632275_getters_document_width.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_632275_getters_document_width.js
@@ -1,12 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-632275-getters.html";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-632275-getters.html";
 
 let getterValue = null;
 
 function test() {
   loadTab(TEST_URI).then(() => {
     openConsole().then(consoleOpened);
   });
 }
@@ -15,28 +18,27 @@ function consoleOpened(hud) {
   let doc = content.wrappedJSObject.document;
   getterValue = doc.foobar._val;
   hud.jsterm.execute("console.dir(document)");
 
   let onOpen = onViewOpened.bind(null, hud);
   hud.jsterm.once("variablesview-fetched", onOpen);
 }
 
-function onViewOpened(hud, event, view)
-{
+function onViewOpened(hud, event, view) {
   let doc = content.wrappedJSObject.document;
 
   findVariableViewProperties(view, [
     { name: /^(width|height)$/, dontMatch: 1 },
     { name: "foobar._val", value: getterValue },
     { name: "foobar.val", isGetter: true },
   ], { webconsole: hud }).then(function() {
     is(doc.foobar._val, getterValue, "getter did not execute");
-    is(doc.foobar.val, getterValue+1, "getter executed");
-    is(doc.foobar._val, getterValue+1, "getter executed (recheck)");
+    is(doc.foobar.val, getterValue + 1, "getter executed");
+    is(doc.foobar._val, getterValue + 1, "getter executed (recheck)");
 
     let textContent = hud.outputNode.textContent;
     is(textContent.indexOf("document.body.client"), -1,
        "no document.width/height warning displayed");
 
     getterValue = null;
     finishTest();
   });
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_632347_iterators_generators.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_632347_iterators_generators.js
@@ -1,49 +1,54 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-632347-iterators-generators.html";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-632347-iterators-generators.html";
 
 function test() {
   requestLongerTimeout(6);
 
   loadTab(TEST_URI).then(() => {
     openConsole().then(consoleOpened);
   });
 }
 
 function consoleOpened(HUD) {
-  let tools = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools;
-  let JSPropertyProvider = tools.require("devtools/toolkit/webconsole/utils").JSPropertyProvider;
+  let tools = Cu.import("resource://gre/modules/devtools/Loader.jsm", {})
+                .devtools;
+  let JSPropertyProvider = tools.require("devtools/toolkit/webconsole/utils")
+                                .JSPropertyProvider;
 
   let tmp = Cu.import("resource://gre/modules/jsdebugger.jsm", {});
   tmp.addDebuggerToGlobal(tmp);
-  let dbg = new tmp.Debugger;
+  let dbg = new tmp.Debugger();
 
   let jsterm = HUD.jsterm;
   let win = content.wrappedJSObject;
   let dbgWindow = dbg.makeGlobalObjectReference(win);
   let container = win._container;
 
   // Make sure autocomplete does not walk through iterators and generators.
   let result = container.gen1.next();
   let completion = JSPropertyProvider(dbgWindow, null, "_container.gen1.");
   isnot(completion.matches.length, 0, "Got matches for gen1");
 
-  is(result+1, container.gen1.next(), "gen1.next() did not execute");
+  is(result + 1, container.gen1.next(), "gen1.next() did not execute");
 
   result = container.gen2.next();
 
   completion = JSPropertyProvider(dbgWindow, null, "_container.gen2.");
   isnot(completion.matches.length, 0, "Got matches for gen2");
 
-  is((result/2+1)*2, container.gen2.next(),
+  is((result / 2 + 1) * 2, container.gen2.next(),
      "gen2.next() did not execute");
 
   result = container.iter1.next();
   is(result[0], "foo", "iter1.next() [0] is correct");
   is(result[1], "bar", "iter1.next() [1] is correct");
 
   completion = JSPropertyProvider(dbgWindow, null, "_container.iter1.");
   isnot(completion.matches.length, 0, "Got matches for iter1");
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_632817.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_632817.js
@@ -1,82 +1,84 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests that network log messages bring up the network panel.
 
-const TEST_NETWORK_REQUEST_URI = "https://example.com/browser/browser/devtools/webconsole/test/test-network-request.html";
+"use strict";
 
-const TEST_IMG = "http://example.com/browser/browser/devtools/webconsole/test/test-image.png";
+const TEST_NETWORK_REQUEST_URI = "https://example.com/browser/browser/" +
+                                 "devtools/webconsole/test/test-network-request.html";
+
+const TEST_IMG = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-image.png";
 
 const TEST_DATA_JSON_CONTENT =
   '{ id: "test JSON data", myArray: [ "foo", "bar", "baz", "biff" ] }';
 
-const TEST_URI = "data:text/html;charset=utf-8,Web Console network logging tests";
+const TEST_URI = "data:text/html;charset=utf-8,Web Console network logging " +
+                 "tests";
 
 let lastRequest = null;
 let requestCallback = null;
 let hud, browser;
 
-function test()
-{
+function test() {
   const PREF = "devtools.webconsole.persistlog";
   const NET_PREF = "devtools.webconsole.filter.networkinfo";
-  const NETXHR_PREF = "devtools.webconsole.filter.netxhr"
-  const MIXED_AC_PREF = "security.mixed_content.block_active_content"
+  const NETXHR_PREF = "devtools.webconsole.filter.netxhr";
+  const MIXED_AC_PREF = "security.mixed_content.block_active_content";
   let original = Services.prefs.getBoolPref(NET_PREF);
   let originalXhr = Services.prefs.getBoolPref(NETXHR_PREF);
   let originalMixedActive = Services.prefs.getBoolPref(MIXED_AC_PREF);
   Services.prefs.setBoolPref(NET_PREF, true);
   Services.prefs.setBoolPref(NETXHR_PREF, true);
   Services.prefs.setBoolPref(MIXED_AC_PREF, false);
   Services.prefs.setBoolPref(PREF, true);
   registerCleanupFunction(() => {
     Services.prefs.setBoolPref(NET_PREF, original);
     Services.prefs.setBoolPref(NETXHR_PREF, originalXhr);
     Services.prefs.setBoolPref(MIXED_AC_PREF, originalMixedActive);
     Services.prefs.clearUserPref(PREF);
   });
 
   loadTab(TEST_URI).then((tab) => {
     browser = tab.browser;
-    openConsole().then((aHud) => {
-      hud = aHud;
+    openConsole().then((hudConsole) => {
+      hud = hudConsole;
 
-      HUDService.lastFinishedRequest.callback = function(aRequest) {
-        lastRequest = aRequest;
+      HUDService.lastFinishedRequest.callback = function(request) {
+        lastRequest = request;
         if (requestCallback) {
           requestCallback();
         }
       };
 
       executeSoon(testPageLoad);
-    })
+    });
   });
 }
 
-function testPageLoad()
-{
+function testPageLoad() {
   requestCallback = function() {
     // Check if page load was logged correctly.
     ok(lastRequest, "Page load was logged");
     is(lastRequest.request.url, TEST_NETWORK_REQUEST_URI,
       "Logged network entry is page load");
     is(lastRequest.request.method, "GET", "Method is correct");
     lastRequest = null;
     requestCallback = null;
     executeSoon(testPageLoadBody);
   };
 
   content.location = TEST_NETWORK_REQUEST_URI;
 }
 
-function testPageLoadBody()
-{
+function testPageLoadBody() {
   let loaded = false;
   let requestCallbackInvoked = false;
 
   // Turn off logging of request bodies and check again.
   requestCallback = function() {
     ok(lastRequest, "Page load was logged again");
     lastRequest = null;
     requestCallback = null;
@@ -94,60 +96,56 @@ function testPageLoadBody()
     if (requestCallbackInvoked) {
       executeSoon(testXhrGet);
     }
   }, true);
 
   content.location.reload();
 }
 
-function testXhrGet()
-{
+function testXhrGet() {
   requestCallback = function() {
     ok(lastRequest, "testXhrGet() was logged");
     is(lastRequest.request.method, "GET", "Method is correct");
     lastRequest = null;
     requestCallback = null;
     executeSoon(testXhrWarn);
   };
 
   // Start the XMLHttpRequest() GET test.
   content.wrappedJSObject.testXhrGet();
 }
 
-function testXhrWarn()
-{
+function testXhrWarn() {
   requestCallback = function() {
     ok(lastRequest, "testXhrWarn() was logged");
     is(lastRequest.request.method, "GET", "Method is correct");
     lastRequest = null;
     requestCallback = null;
     executeSoon(testXhrPost);
   };
 
   // Start the XMLHttpRequest() warn test.
   content.wrappedJSObject.testXhrWarn();
 }
 
-function testXhrPost()
-{
+function testXhrPost() {
   requestCallback = function() {
     ok(lastRequest, "testXhrPost() was logged");
     is(lastRequest.request.method, "POST", "Method is correct");
     lastRequest = null;
     requestCallback = null;
     executeSoon(testFormSubmission);
   };
 
   // Start the XMLHttpRequest() POST test.
   content.wrappedJSObject.testXhrPost();
 }
 
-function testFormSubmission()
-{
+function testFormSubmission() {
   // Start the form submission test. As the form is submitted, the page is
   // loaded again. Bind to the load event to catch when this is done.
   requestCallback = function() {
     ok(lastRequest, "testFormSubmission() was logged");
     is(lastRequest.request.method, "POST", "Method is correct");
 
     // There should be 3 network requests pointing to the HTML file.
     waitForMessages({
@@ -222,20 +220,20 @@ function testLiveFilteringOnSearchString
 }
 
 function countMessageNodes() {
   let messageNodes = hud.outputNode.querySelectorAll(".message");
   let displayedMessageNodes = 0;
   let view = hud.iframeWindow;
   for (let i = 0; i < messageNodes.length; i++) {
     let computedStyle = view.getComputedStyle(messageNodes[i], null);
-    if (computedStyle.display !== "none")
+    if (computedStyle.display !== "none") {
       displayedMessageNodes++;
+    }
   }
 
   return displayedMessageNodes;
 }
 
-function setStringFilter(aValue)
-{
-  hud.ui.filterBox.value = aValue;
+function setStringFilter(value) {
+  hud.ui.filterBox.value = value;
   hud.ui.adjustVisibilityOnSearchStringChange();
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_642108_pruneTest.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_642108_pruneTest.js
@@ -3,16 +3,18 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that the Web Console limits the number of lines displayed according to
 // the user's preferences.
 
+"use strict";
+
 const TEST_URI = "data:text/html;charset=utf-8,<p>test for bug 642108.";
 const LOG_LIMIT = 20;
 
 function test() {
   let hud;
 
   Task.spawn(runner).then(finishTest);
 
@@ -50,17 +52,18 @@ function test() {
     let [result] = yield waitForMessages({
       webconsole: hud,
       messages: [{
         text: "css log 5",
         category: CATEGORY_CSS,
         severity: SEVERITY_WARNING,
       },
       {
-        text: "css log 24", // LOG_LIMIT + 5
+        // LOG_LIMIT + 5
+        text: "css log 24",
         category: CATEGORY_CSS,
         severity: SEVERITY_WARNING,
       }],
     });
 
     is(hud.ui.outputNode.querySelectorAll(".message").length, LOG_LIMIT,
        "number of messages");
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_644419_log_limits.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_644419_log_limits.js
@@ -2,17 +2,20 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // Tests that the Web Console limits the number of lines displayed according to
 // the limit set for each category.
 
-const INIT_URI = "data:text/html;charset=utf-8,Web Console test for bug 644419: Console should " +
+"use strict";
+
+const INIT_URI = "data:text/html;charset=utf-8,Web Console test for " +
+                 "bug 644419: Console should " +
                  "have user-settable log limits for each message category";
 
 const TEST_URI = "http://example.com/browser/browser/devtools/" +
                  "webconsole/test/test-bug-644419-log-limits.html";
 
 let hud, outputNode;
 
 let test = asyncTest(function* () {
@@ -49,34 +52,35 @@ function testWebDevLimits() {
   // Find the sentinel entry.
   return waitForMessages({
     webconsole: hud,
     messages: [{
       text: "bar is not defined",
       category: CATEGORY_JS,
       severity: SEVERITY_ERROR,
     }],
-  })
+  });
 }
 
 function testWebDevLimits2() {
   // Fill the log with Web Developer errors.
   for (let i = 0; i < 11; i++) {
     content.console.log("test message " + i);
   }
 
   return waitForMessages({
     webconsole: hud,
     messages: [{
       text: "test message 10",
       category: CATEGORY_WEBDEV,
       severity: SEVERITY_LOG,
     }],
   }).then(() => {
-    testLogEntry(outputNode, "test message 0", "first message is pruned", false, true);
+    testLogEntry(outputNode, "test message 0", "first message is pruned",
+                 false, true);
     findLogEntry("test message 1");
     // Check if the sentinel entry is still there.
     findLogEntry("bar is not defined");
 
     Services.prefs.clearUserPref("devtools.hud.loglimit.console");
   });
 }
 
@@ -96,41 +100,42 @@ function testJsLimits() {
     }],
   });
 }
 
 function testJsLimits2() {
   // Fill the log with JS errors.
   let head = content.document.getElementsByTagName("head")[0];
   for (let i = 0; i < 11; i++) {
-    var script = content.document.createElement("script");
+    let script = content.document.createElement("script");
     script.text = "fubar" + i + ".bogus(6);";
 
     expectUncaughtException();
     head.insertBefore(script, head.firstChild);
   }
 
   return waitForMessages({
     webconsole: hud,
     messages: [{
       text: "fubar10 is not defined",
       category: CATEGORY_JS,
       severity: SEVERITY_ERROR,
     }],
   }).then(() => {
-    testLogEntry(outputNode, "fubar0 is not defined", "first message is pruned", false, true);
+    testLogEntry(outputNode, "fubar0 is not defined", "first message is pruned",
+                 false, true);
     findLogEntry("fubar1 is not defined");
     // Check if the sentinel entry is still there.
     findLogEntry("testing JS limits");
 
     Services.prefs.clearUserPref("devtools.hud.loglimit.exception");
   });
 }
 
-var gCounter, gImage;
+let gCounter, gImage;
 
 function testNetLimits() {
   Services.prefs.setIntPref("devtools.hud.loglimit.network", 10);
 
   hud.jsterm.clearOutput();
   content.console.log("testing Net limits");
 
   // Find the sentinel entry.
@@ -151,17 +156,17 @@ function loadImage() {
   if (gCounter < 11) {
     let body = content.document.getElementsByTagName("body")[0];
     gImage && gImage.removeEventListener("load", loadImage, true);
     gImage = content.document.createElement("img");
     gImage.src = "test-image.png?_fubar=" + gCounter;
     body.insertBefore(gImage, body.firstChild);
     gImage.addEventListener("load", loadImage, true);
     gCounter++;
-    return;
+    return true;
   }
 
   is(gCounter, 11, "loaded 11 files");
 
   return waitForMessages({
     webconsole: hud,
     messages: [{
       text: "test-image.png",
@@ -196,17 +201,17 @@ function testCssLimits() {
     }],
   });
 }
 
 function testCssLimits2() {
   // Fill the log with CSS errors.
   let body = content.document.getElementsByTagName("body")[0];
   for (let i = 0; i < 11; i++) {
-    var div = content.document.createElement("div");
+    let div = content.document.createElement("div");
     div.setAttribute("style", "-moz-foobar" + i + ": 42;");
     body.insertBefore(div, body.firstChild);
   }
 
   return waitForMessages({
     webconsole: hud,
     messages: [{
       text: "-moz-foobar10",
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_646025_console_file_location.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_646025_console_file_location.js
@@ -1,17 +1,20 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Tests that console logging methods display the method location along with
 // the output in the console.
 
-const TEST_URI = "data:text/html;charset=utf-8,Web Console file location display test";
+"use strict";
+
+const TEST_URI = "data:text/html;charset=utf-8,Web Console file location " +
+                 "display test";
 const TEST_URI2 = "http://example.com/browser/browser/devtools/" +
                  "webconsole/test/" +
                  "test-bug-646025-console-file-location.html";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_651501_document_body_autocomplete.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_651501_document_body_autocomplete.js
@@ -1,40 +1,41 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // Tests that document.body autocompletes in the web console.
-const TEST_URI = "data:text/html;charset=utf-8,Web Console autocompletion bug in document.body";
 
 "use strict";
 
+const TEST_URI = "data:text/html;charset=utf-8,Web Console autocompletion " +
+                 "bug in document.body";
+
 let gHUD;
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   gHUD = yield openConsole();
 
   yield consoleOpened();
   yield autocompletePopupHidden();
   let view = yield testPropertyPanel();
   yield onVariablesViewReady(view);
 
   gHUD = null;
 });
 
-function consoleOpened(aHud) {
+function consoleOpened() {
   let deferred = promise.defer();
 
   let jsterm = gHUD.jsterm;
   let popup = jsterm.autocompletePopup;
-  let completeNode = jsterm.completeNode;
 
   ok(!popup.isOpen, "popup is not open");
 
   popup._panel.addEventListener("popupshown", function onShown() {
     popup._panel.removeEventListener("popupshown", onShown, false);
 
     ok(popup.isOpen, "popup is open");
 
@@ -53,57 +54,54 @@ function consoleOpened(aHud) {
   }, false);
 
   jsterm.setInputValue("document.body");
   EventUtils.synthesizeKey(".", {});
 
   return deferred.promise;
 }
 
-function autocompletePopupHidden()
-{
+function autocompletePopupHidden() {
   let deferred = promise.defer();
 
   let jsterm = gHUD.jsterm;
   let popup = jsterm.autocompletePopup;
   let completeNode = jsterm.completeNode;
-  let inputNode = jsterm.inputNode;
 
-  popup._panel.removeEventListener("popuphidden", autocompletePopupHidden, false);
+  popup._panel.removeEventListener("popuphidden", autocompletePopupHidden,
+                                   false);
 
   ok(!popup.isOpen, "popup is not open");
 
   jsterm.once("autocomplete-updated", function() {
     is(completeNode.value, testStr + "dy", "autocomplete shows document.body");
     deferred.resolve();
   });
 
   let inputStr = "document.b";
   jsterm.setInputValue(inputStr);
   EventUtils.synthesizeKey("o", {});
   let testStr = inputStr.replace(/./g, " ") + " ";
 
   return deferred.promise;
 }
 
-function testPropertyPanel()
-{
+function testPropertyPanel() {
   let deferred = promise.defer();
 
   let jsterm = gHUD.jsterm;
   jsterm.clearOutput();
   jsterm.execute("document", (msg) => {
     jsterm.once("variablesview-fetched", (aEvent, aView) => {
       deferred.resolve(aView);
     });
     let anchor = msg.querySelector(".message-body a");
     EventUtils.synthesizeMouse(anchor, 2, 2, {}, gHUD.iframeWindow);
   });
 
   return deferred.promise;
 }
 
-function onVariablesViewReady(aView)
-{
-  return findVariableViewProperties(aView, [
+function onVariablesViewReady(view) {
+  return findVariableViewProperties(view, [
     { name: "body", value: "<body>" },
   ], { webconsole: gHUD });
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_653531_highlighter_console_helper.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_653531_highlighter_console_helper.js
@@ -1,15 +1,17 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Tests that the $0 console helper works as intended.
 
+"use strict";
+
 let inspector, h1, outputNode;
 
 function createDocument() {
   let doc = content.document;
   let div = doc.createElement("div");
   h1 = doc.createElement("h1");
   let p1 = doc.createElement("p");
   let p2 = doc.createElement("p");
@@ -63,17 +65,16 @@ let runSelectionTests = Task.async(funct
 
   info("Picker mode stopped, H1 selected, now switching to the console");
   let hud = yield openConsole(gBrowser.selectedTab);
 
   performWebConsoleTests(hud);
 });
 
 function performWebConsoleTests(hud) {
-  let target = TargetFactory.forTab(gBrowser.selectedTab);
   let jsterm = hud.jsterm;
   outputNode = hud.outputNode;
 
   jsterm.clearOutput();
   jsterm.execute("$0", onNodeOutput);
 
   function onNodeOutput(node) {
     isnot(node.textContent.indexOf("<h1>"), -1, "correct output for $0");
@@ -98,10 +99,11 @@ function test() {
   waitForExplicitFinish();
 
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
     gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
     waitForFocus(createDocument, content);
   }, true);
 
-  content.location = "data:text/html;charset=utf-8,test for highlighter helper in web console";
+  content.location = "data:text/html;charset=utf-8,test for highlighter " +
+                     "helper in web console";
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_658368_time_methods.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_658368_time_methods.js
@@ -1,27 +1,29 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // Tests that the Console API implements the time() and timeEnd() methods.
 
+"use strict";
+
 const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
-         "test/test-bug-658368-time-methods.html";
+                 "test/test-bug-658368-time-methods.html";
 
 const TEST_URI2 = "data:text/html;charset=utf-8,<script>" +
-           "console.timeEnd('bTimer');</script>";
+                  "console.timeEnd('bTimer');</script>";
 
 const TEST_URI3 = "data:text/html;charset=utf-8,<script>" +
-                       "console.time('bTimer');</script>";
+                  "console.time('bTimer');</script>";
 
 const TEST_URI4 = "data:text/html;charset=utf-8," +
-                       "<script>console.timeEnd('bTimer');</script>";
+                  "<script>console.timeEnd('bTimer');</script>";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud1 = yield openConsole();
 
   yield waitForMessages({
     webconsole: hud1,
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_659907_console_dir.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_659907_console_dir.js
@@ -3,26 +3,35 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // Tests that console.dir works as intended.
 
 "use strict";
 
-const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 659907: " +
-  "Expand console object with a dir method";
+const TEST_URI = "data:text/html;charset=utf-8,Web Console test for " +
+                 "bug 659907: Expand console object with a dir method";
 
 let test = asyncTest(function*() {
   yield loadTab(TEST_URI);
   let hud = yield openConsole();
   hud.jsterm.clearOutput();
 
   hud.jsterm.execute("console.dir(document)");
 
   let varView = yield hud.jsterm.once("variablesview-fetched");
 
   yield findVariableViewProperties(varView, [
-    { name: "__proto__.__proto__.querySelectorAll", value: "querySelectorAll()" },
-    { name: "location", value: /Location \u2192 data:Web/ },
-    { name: "__proto__.write", value: "write()" },
+    {
+      name: "__proto__.__proto__.querySelectorAll",
+      value: "querySelectorAll()"
+    },
+    {
+      name: "location",
+      value: /Location \u2192 data:Web/
+    },
+    {
+      name: "__proto__.write",
+      value: "write()"
+    },
   ], { webconsole: hud });
 });
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_660806_history_nav.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_660806_history_nav.js
@@ -1,24 +1,26 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-const TEST_URI = "data:text/html;charset=utf-8,<p>bug 660806 - history navigation must not show the autocomplete popup";
+"use strict";
+
+const TEST_URI = "data:text/html;charset=utf-8,<p>bug 660806 - history " +
+                 "navigation must not show the autocomplete popup";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   yield consoleOpened(hud);
 });
 
-function consoleOpened(HUD)
-{
+function consoleOpened(HUD) {
   let deferred = promise.defer();
 
   let jsterm = HUD.jsterm;
   let popup = jsterm.autocompletePopup;
   let onShown = function() {
     ok(false, "popup shown");
   };
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_664131_console_group.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_664131_console_group.js
@@ -1,37 +1,40 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // Tests that console.group/groupEnd works as intended.
-const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 664131: Expand console object with group methods";
+
+"use strict";
+
+const TEST_URI = "data:text/html;charset=utf-8,Web Console test for " +
+                 "bug 664131: Expand console object with group methods";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
   let jsterm = hud.jsterm;
-  let outputNode = hud.outputNode;
 
   hud.jsterm.clearOutput();
 
-  yield jsterm.execute("console.group('bug664131a')")
+  yield jsterm.execute("console.group('bug664131a')");
 
   yield waitForMessages({
     webconsole: hud,
     messages: [{
       text: "bug664131a",
       consoleGroup: 1,
     }],
   });
 
-  yield jsterm.execute("console.log('bug664131a-inside')")
+  yield jsterm.execute("console.log('bug664131a-inside')");
 
   yield waitForMessages({
     webconsole: hud,
     messages: [{
       text: "bug664131a-inside",
       category: CATEGORY_WEBDEV,
       severity: SEVERITY_LOG,
       groupDepth: 1,
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_686937_autocomplete_JSTerm_helpers.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_686937_autocomplete_JSTerm_helpers.js
@@ -1,16 +1,19 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Tests that the autocompletion results contain the names of JSTerm helpers.
 
-const TEST_URI = "data:text/html;charset=utf8,<p>test JSTerm Helpers autocomplete";
+"use strict";
+
+const TEST_URI = "data:text/html;charset=utf8,<p>test JSTerm Helpers " +
+                 "autocomplete";
 
 let jsterm;
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
@@ -18,43 +21,55 @@ let test = asyncTest(function* () {
   let input = jsterm.inputNode;
   let popup = jsterm.autocompletePopup;
 
   // Test if 'i' gives 'inspect'
   input.value = "i";
   input.setSelectionRange(1, 1);
   yield complete(jsterm.COMPLETE_HINT_ONLY);
 
-  let newItems = popup.getItems().map(function(e) {return e.label;});
-  ok(newItems.indexOf("inspect") > -1, "autocomplete results contain helper 'inspect'");
+  let newItems = popup.getItems().map(function(e) {
+    return e.label;
+  });
+  ok(newItems.indexOf("inspect") > -1,
+     "autocomplete results contain helper 'inspect'");
 
   // Test if 'window.' does not give 'inspect'.
   input.value = "window.";
   input.setSelectionRange(7, 7);
   yield complete(jsterm.COMPLETE_HINT_ONLY);
 
-  newItems = popup.getItems().map(function(e) {return e.label;});
-  is(newItems.indexOf("inspect"), -1, "autocomplete results do not contain helper 'inspect'");
+  newItems = popup.getItems().map(function(e) {
+    return e.label;
+  });
+  is(newItems.indexOf("inspect"), -1,
+     "autocomplete results do not contain helper 'inspect'");
 
   // Test if 'dump(i' gives 'inspect'
   input.value = "dump(i";
   input.setSelectionRange(6, 6);
   yield complete(jsterm.COMPLETE_HINT_ONLY);
 
-  newItems = popup.getItems().map(function(e) {return e.label;});
-  ok(newItems.indexOf("inspect") > -1, "autocomplete results contain helper 'inspect'");
+  newItems = popup.getItems().map(function(e) {
+    return e.label;
+  });
+  ok(newItems.indexOf("inspect") > -1,
+     "autocomplete results contain helper 'inspect'");
 
   // Test if 'window.dump(i' gives 'inspect'
   input.value = "window.dump(i";
   input.setSelectionRange(13, 13);
   yield complete(jsterm.COMPLETE_HINT_ONLY);
 
-  newItems = popup.getItems().map(function(e) {return e.label;});
-  ok(newItems.indexOf("inspect") > -1, "autocomplete results contain helper 'inspect'");
+  newItems = popup.getItems().map(function(e) {
+    return e.label;
+  });
+  ok(newItems.indexOf("inspect") > -1,
+     "autocomplete results contain helper 'inspect'");
 
   jsterm = null;
 });
 
 function complete(type) {
   let updated = jsterm.once("autocomplete-updated");
   jsterm.complete(type);
   return updated;
-}
\ No newline at end of file
+}
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_704295.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_704295.js
@@ -1,28 +1,31 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Tests for bug 704295
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-console.html";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   testCompletion(hud);
 });
 
 function testCompletion(hud) {
-  var jsterm = hud.jsterm;
-  var input = jsterm.inputNode;
+  let jsterm = hud.jsterm;
+  let input = jsterm.inputNode;
 
   // Test typing 'var d = 5;' and press RETURN
   jsterm.setInputValue("var d = ");
   EventUtils.synthesizeKey("5", {});
   EventUtils.synthesizeKey(";", {});
   is(input.value, "var d = 5;", "var d = 5;");
   is(jsterm.completeNode.value, "", "no completion");
   EventUtils.synthesizeKey("VK_RETURN", {});
@@ -31,9 +34,8 @@ function testCompletion(hud) {
   // Test typing 'var a = d' and press RETURN
   jsterm.setInputValue("var a = ");
   EventUtils.synthesizeKey("d", {});
   is(input.value, "var a = d", "var a = d");
   is(jsterm.completeNode.value, "", "no completion");
   EventUtils.synthesizeKey("VK_RETURN", {});
   is(jsterm.completeNode.value, "", "clear completion on execute()");
 }
-
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_734061_No_input_change_and_Tab_key_pressed.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_734061_No_input_change_and_Tab_key_pressed.js
@@ -1,22 +1,25 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/browser/test-console.html";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/browser/test-console.html";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
-  var jsterm = hud.jsterm;
-  var input = jsterm.inputNode;
+  let jsterm = hud.jsterm;
+  let input = jsterm.inputNode;
 
   is(input.getAttribute("focused"), "true", "input has focus");
   EventUtils.synthesizeKey("VK_TAB", {});
   is(input.getAttribute("focused"), "", "focus moved away");
 
   // Test user changed something
   input.focus();
   EventUtils.synthesizeKey("A", {});
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_737873_mixedcontent.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_737873_mixedcontent.js
@@ -5,23 +5,29 @@
  *
  * Contributor(s):
  *  Tanvi Vyas <tanvi@mozilla.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that the Web Console Mixed Content messages are displayed
 
+"use strict";
+
 const TEST_URI = "data:text/html;charset=utf8,Web Console mixed content test";
-const TEST_HTTPS_URI = "https://example.com/browser/browser/devtools/webconsole/test/test-bug-737873-mixedcontent.html";
-const LEARN_MORE_URI = "https://developer.mozilla.org/docs/Security/MixedContent";
+const TEST_HTTPS_URI = "https://example.com/browser/browser/devtools/" +
+                       "webconsole/test/test-bug-737873-mixedcontent.html";
+const LEARN_MORE_URI = "https://developer.mozilla.org/docs/Security/" +
+                       "MixedContent";
 
 let test = asyncTest(function* () {
-  Services.prefs.setBoolPref("security.mixed_content.block_display_content", false);
-  Services.prefs.setBoolPref("security.mixed_content.block_active_content", false);
+  Services.prefs.setBoolPref("security.mixed_content.block_display_content",
+                             false);
+  Services.prefs.setBoolPref("security.mixed_content.block_active_content",
+                             false);
 
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   yield testMixedContent(hud);
 
   Services.prefs.clearUserPref("security.mixed_content.block_display_content");
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_752559_ineffective_iframe_sandbox_warning.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_752559_ineffective_iframe_sandbox_warning.js
@@ -1,31 +1,35 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests that warnings about ineffective iframe sandboxing are logged to the
 // web console when necessary (and not otherwise).
 
-const TEST_URI_WARNING = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-752559-ineffective-iframe-sandbox-warning0.html";
+"use strict";
+
+const TEST_URI_WARNING = "http://example.com/browser/browser/devtools/" +
+                         "webconsole/test/test-bug-752559-ineffective-iframe-sandbox-warning0.html";
 const TEST_URI_NOWARNING = [
   "http://example.com/browser/browser/devtools/webconsole/test/test-bug-752559-ineffective-iframe-sandbox-warning1.html",
   "http://example.com/browser/browser/devtools/webconsole/test/test-bug-752559-ineffective-iframe-sandbox-warning2.html",
   "http://example.com/browser/browser/devtools/webconsole/test/test-bug-752559-ineffective-iframe-sandbox-warning3.html",
   "http://example.com/browser/browser/devtools/webconsole/test/test-bug-752559-ineffective-iframe-sandbox-warning4.html",
   "http://example.com/browser/browser/devtools/webconsole/test/test-bug-752559-ineffective-iframe-sandbox-warning5.html"
 ];
 
-const INEFFECTIVE_IFRAME_SANDBOXING_MSG = "An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can remove its sandboxing.";
+const INEFFECTIVE_IFRAME_SANDBOXING_MSG = "An iframe which has both " +
+  "allow-scripts and allow-same-origin for its sandbox attribute can remove " +
+  "its sandboxing.";
 const SENTINEL_MSG = "testing ineffective sandboxing message";
 
-function test()
-{
+function test() {
   loadTab(TEST_URI_WARNING).then(() => {
     openConsole().then((hud) => {
-      content.console.log(SENTINEL_MSG)
+      content.console.log(SENTINEL_MSG);
       waitForMessages({
         webconsole: hud,
         messages: [
           {
             name: "Ineffective iframe sandboxing warning displayed successfully",
             text: INEFFECTIVE_IFRAME_SANDBOXING_MSG,
             category: CATEGORY_SECURITY,
             severity: SEVERITY_WARNING
@@ -39,21 +43,20 @@ function test()
         let msgs = hud.outputNode.querySelectorAll(".message[category=security]");
         is(msgs.length, 1, "one security message");
         testNoWarning(0);
       });
     })
   });
 }
 
-function testNoWarning(id)
-{
+function testNoWarning(id) {
   loadTab(TEST_URI_NOWARNING[id]).then(() => {
     openConsole().then((hud) => {
-      content.console.log(SENTINEL_MSG)
+      content.console.log(SENTINEL_MSG);
       waitForMessages({
         webconsole: hud,
         messages: [
           {
             text: SENTINEL_MSG,
             severity: SEVERITY_LOG
           }
         ]
@@ -63,11 +66,11 @@ function testNoWarning(id)
 
         id += 1;
         if (id < TEST_URI_NOWARNING.length) {
           testNoWarning(id);
         } else {
           finishTest();
         }
       });
-    })
+    });
   });
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_762593_insecure_passwords_about_blank_web_console_warning.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_762593_insecure_passwords_about_blank_web_console_warning.js
@@ -1,18 +1,22 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 /*
  * Tests that errors about insecure passwords are logged
  * to the web console
  */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-762593-insecure-passwords-about-blank-web-console-warning.html";
-const INSECURE_PASSWORD_MSG = "Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.";
+"use strict";
 
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-762593-insecure-passwords-about-blank-web-console-warning.html";
+const INSECURE_PASSWORD_MSG = "Password fields present on an insecure " +
+  "(http://) page. This is a security risk that allows user login " +
+  "credentials to be stolen.";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   yield waitForMessages({
     webconsole: hud,
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_762593_insecure_passwords_web_console_warning.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_762593_insecure_passwords_web_console_warning.js
@@ -1,20 +1,31 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 /*
  * Tests that errors about insecure passwords are logged
  * to the web console
  */
 
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-762593-insecure-passwords-web-console-warning.html";
-const INSECURE_PASSWORD_MSG = "Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.";
-const INSECURE_FORM_ACTION_MSG = "Password fields present in a form with an insecure (http://) form action. This is a security risk that allows user login credentials to be stolen.";
-const INSECURE_IFRAME_MSG = "Password fields present on an insecure (http://) iframe. This is a security risk that allows user login credentials to be stolen.";
-const INSECURE_PASSWORDS_URI = "https://developer.mozilla.org/docs/Security/InsecurePasswords";
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-762593-insecure-passwords-web-" +
+                 "console-warning.html";
+const INSECURE_PASSWORD_MSG = "Password fields present on an insecure " +
+                 "(http://) page. This is a security risk that allows user " +
+                 "login credentials to be stolen.";
+const INSECURE_FORM_ACTION_MSG = "Password fields present in a form with an " +
+                 "insecure (http://) form action. This is a security risk " +
+                 "that allows user login credentials to be stolen.";
+const INSECURE_IFRAME_MSG = "Password fields present on an insecure " +
+                 "(http://) iframe. This is a security risk that allows " +
+                 "user login credentials to be stolen.";
+const INSECURE_PASSWORDS_URI = "https://developer.mozilla.org/docs/Security/" +
+                 "InsecurePasswords";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   let result = yield waitForMessages({
     webconsole: hud,
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_764572_output_open_url.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_764572_output_open_url.js
@@ -1,15 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This is a test for the Open URL context menu item
 // that is shown for network requests
-const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html"
+
+"use strict";
+
+const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-console.html";
 const COMMAND_NAME = "consoleCmd_openURL";
 const CONTEXT_MENU_ID = "#menu_openURL";
 
 let HUD = null, outputNode = null, contextMenu = null;
 
 let test = asyncTest(function* () {
   Services.prefs.setBoolPref("devtools.webconsole.filter.networkinfo", true);
 
@@ -17,21 +21,23 @@ let test = asyncTest(function* () {
   HUD = yield openConsole();
 
   let results = yield consoleOpened();
   yield onConsoleMessage(results);
 
   let results2 = yield testOnNetActivity();
   let msg = yield onNetworkMessage(results2);
 
-  yield testOnNetActivity_contextmenu(msg);
+  yield testOnNetActivityContextMenu(msg);
 
   Services.prefs.clearUserPref("devtools.webconsole.filter.networkinfo");
 
-  HUD = null, outputNode = null, contextMenu = null;
+  HUD = null;
+  outputNode = null;
+  contextMenu = null;
 });
 
 function consoleOpened() {
   outputNode = HUD.outputNode;
   contextMenu = HUD.iframeWindow.document.getElementById("output-contextmenu");
 
   HUD.jsterm.clearOutput();
 
@@ -42,19 +48,19 @@ function consoleOpened() {
     messages: [{
       text: "bug 764572",
       category: CATEGORY_WEBDEV,
       severity: SEVERITY_LOG,
     }],
   });
 }
 
-function onConsoleMessage(aResults) {
+function onConsoleMessage(results) {
   outputNode.focus();
-  outputNode.selectedItem = [...aResults[0].matched][0];
+  outputNode.selectedItem = [...results[0].matched][0];
 
   // Check if the command is disabled non-network messages.
   goUpdateCommand(COMMAND_NAME);
   let controller = top.document.commandDispatcher
                    .getControllerForCommand(COMMAND_NAME);
 
   let isDisabled = !controller || !controller.isCommandEnabled(COMMAND_NAME);
   ok(isDisabled, COMMAND_NAME + " should be disabled.");
@@ -77,30 +83,30 @@ function testOnNetActivity() {
     messages: [{
       text: "test-console.html",
       category: CATEGORY_NETWORK,
       severity: SEVERITY_LOG,
     }],
   });
 }
 
-function onNetworkMessage(aResults) {
+function onNetworkMessage(results) {
   let deferred = promise.defer();
 
   outputNode.focus();
-  let msg = [...aResults[0].matched][0];
+  let msg = [...results[0].matched][0];
   ok(msg, "network message");
   HUD.ui.output.selectMessage(msg);
 
   let currentTab = gBrowser.selectedTab;
   let newTab = null;
 
-  gBrowser.tabContainer.addEventListener("TabOpen", function onOpen(aEvent) {
+  gBrowser.tabContainer.addEventListener("TabOpen", function onOpen(evt) {
     gBrowser.tabContainer.removeEventListener("TabOpen", onOpen, true);
-    newTab = aEvent.target;
+    newTab = evt.target;
     newTab.linkedBrowser.addEventListener("load", onTabLoaded, true);
   }, true);
 
   function onTabLoaded() {
     newTab.linkedBrowser.removeEventListener("load", onTabLoaded, true);
     gBrowser.removeTab(newTab);
     gBrowser.selectedTab = currentTab;
     executeSoon(deferred.resolve.bind(null, msg));
@@ -114,17 +120,17 @@ function onNetworkMessage(aResults) {
      COMMAND_NAME + " should be enabled.");
 
   // Try to open the URL.
   goDoCommand(COMMAND_NAME);
 
   return deferred.promise;
 }
 
-function testOnNetActivity_contextmenu(msg) {
+function testOnNetActivityContextMenu(msg) {
   let deferred = promise.defer();
 
   outputNode.focus();
   HUD.ui.output.selectMessage(msg);
   msg.scrollIntoView();
 
   info("net activity context menu");
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_770099_violation.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_770099_violation.js
@@ -2,19 +2,25 @@
 /* ***** BEGIN LICENSE BLOCK *****
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that the Web Console CSP messages are displayed
 
+"use strict";
+
 const TEST_URI = "data:text/html;charset=utf8,Web Console CSP violation test";
-const TEST_VIOLATION = "https://example.com/browser/browser/devtools/webconsole/test/test_bug_770099_violation.html";
-const CSP_VIOLATION_MSG = 'Content Security Policy: The page\'s settings blocked the loading of a resource at http://some.example.com/test.png ("default-src https://example.com").'
+const TEST_VIOLATION = "https://example.com/browser/browser/devtools/" +
+                       "webconsole/test/test_bug_770099_violation.html";
+const CSP_VIOLATION_MSG = "Content Security Policy: The page's settings " +
+                          "blocked the loading of a resource at " +
+                          "http://some.example.com/test.png (\"default-src " +
+                            "https://example.com\").";
 
 let test = asyncTest(function* () {
   let { browser } = yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   hud.jsterm.clearOutput();
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js
@@ -1,32 +1,33 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* ***** BEGIN LICENSE BLOCK *****
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  * ***** END LICENSE BLOCK ***** */
 
+"use strict";
+
 const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test" +
                  "/test-bug-782653-css-errors.html";
 
 let nodes, hud, StyleEditorUI;
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   hud = yield openConsole();
 
   let styleEditor = yield testViewSource();
   yield onStyleEditorReady(styleEditor);
 
   nodes = hud = StyleEditorUI = null;
 });
 
-function testViewSource()
-{
+function testViewSource() {
   let deferred = promise.defer();
 
   waitForMessages({
     webconsole: hud,
     messages: [{
       text: "'font-weight'",
       category: CATEGORY_CSS,
       severity: SEVERITY_WARNING,
@@ -52,90 +53,89 @@ function testViewSource()
     });
 
     EventUtils.sendMouseEvent({ type: "click" }, nodes[0]);
   });
 
   return deferred.promise;
 }
 
-function onStyleEditorReady(aPanel)
-{
+function onStyleEditorReady(panel) {
   let deferred = promise.defer();
 
-  let win = aPanel.panelWindow;
+  let win = panel.panelWindow;
   ok(win, "Style Editor Window is defined");
   ok(StyleEditorUI, "Style Editor UI is defined");
 
+  function fireEvent(toolbox, href, line) {
+    toolbox.once("styleeditor-selected", function(evt) {
+      info(evt + " event fired");
+
+      checkStyleEditorForSheetAndLine(href, line - 1).then(deferred.resolve);
+    });
+
+    EventUtils.sendMouseEvent({ type: "click" }, nodes[1]);
+  }
+
   waitForFocus(function() {
     info("style editor window focused");
 
     let href = nodes[0].getAttribute("title");
     let line = nodes[0].sourceLine;
     ok(line, "found source line");
 
     checkStyleEditorForSheetAndLine(href, line - 1).then(function() {
       info("first check done");
 
       let target = TargetFactory.forTab(gBrowser.selectedTab);
       let toolbox = gDevTools.getToolbox(target);
 
-      let href = nodes[1].getAttribute("title");
-      let line = nodes[1].sourceLine;
+      href = nodes[1].getAttribute("title");
+      line = nodes[1].sourceLine;
       ok(line, "found source line");
 
       toolbox.selectTool("webconsole").then(function() {
         info("webconsole selected");
-
-        toolbox.once("styleeditor-selected", function(aEvent) {
-          info(aEvent + " event fired");
-
-          checkStyleEditorForSheetAndLine(href, line - 1).then(deferred.resolve);
-        });
-
-        EventUtils.sendMouseEvent({ type: "click" }, nodes[1]);
+        fireEvent(toolbox, href, line);
       });
     });
   }, win);
 
   return deferred.promise;
 }
 
-function checkStyleEditorForSheetAndLine(aHref, aLine)
-{
+function checkStyleEditorForSheetAndLine(href, line) {
   let foundEditor = null;
   for (let editor of StyleEditorUI.editors) {
-    if (editor.styleSheet.href == aHref) {
+    if (editor.styleSheet.href == href) {
       foundEditor = editor;
       break;
     }
   }
 
-  ok(foundEditor, "found style editor for " + aHref);
-  return performLineCheck(foundEditor, aLine);
+  ok(foundEditor, "found style editor for " + href);
+  return performLineCheck(foundEditor, line);
 }
 
-function performLineCheck(aEditor, aLine)
-{
+function performLineCheck(editor, line) {
   let deferred = promise.defer();
 
-  function checkForCorrectState()
-  {
-    is(aEditor.sourceEditor.getCursor().line, aLine,
+  function checkForCorrectState() {
+    is(editor.sourceEditor.getCursor().line, line,
        "correct line is selected");
-    is(StyleEditorUI.selectedStyleSheetIndex, aEditor.styleSheet.styleSheetIndex,
+    is(StyleEditorUI.selectedStyleSheetIndex, editor.styleSheet.styleSheetIndex,
        "correct stylesheet is selected in the editor");
 
     executeSoon(deferred.resolve);
   }
 
   info("wait for source editor to load");
 
   // Get out of the styleeditor-selected event loop.
   executeSoon(() => {
-    aEditor.getSourceEditor().then(() => {
+    editor.getSourceEditor().then(() => {
       // Get out of the editor's source-editor-load event loop.
       executeSoon(checkForCorrectState);
     });
   });
 
   return deferred.promise;
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_804845_ctrl_key_nav.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_804845_ctrl_key_nav.js
@@ -8,17 +8,18 @@
  *  zmgmoz <zmgmoz@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Test navigation of webconsole contents via ctrl-a, ctrl-e, ctrl-p, ctrl-n
 // see https://bugzilla.mozilla.org/show_bug.cgi?id=804845
 "use strict";
 
-const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 804845 and bug 619598";
+const TEST_URI = "data:text/html;charset=utf-8,Web Console test for " +
+                 "bug 804845 and bug 619598";
 
 let jsterm, inputNode;
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
@@ -41,42 +42,52 @@ function doTests(HUD) {
 
 function testSingleLineInputNavNoHistory() {
   // Single char input
   EventUtils.synthesizeKey("1", {});
   is(inputNode.selectionStart, 1, "caret location after single char input");
 
   // nav to start/end with ctrl-a and ctrl-e;
   EventUtils.synthesizeKey("a", { ctrlKey: true });
-  is(inputNode.selectionStart, 0, "caret location after single char input and ctrl-a");
+  is(inputNode.selectionStart, 0,
+     "caret location after single char input and ctrl-a");
 
   EventUtils.synthesizeKey("e", { ctrlKey: true });
-  is(inputNode.selectionStart, 1, "caret location after single char input and ctrl-e");
+  is(inputNode.selectionStart, 1,
+     "caret location after single char input and ctrl-e");
 
   // Second char input
   EventUtils.synthesizeKey("2", {});
   // nav to start/end with up/down keys; verify behaviour using ctrl-p/ctrl-n
   EventUtils.synthesizeKey("VK_UP", {});
-  is(inputNode.selectionStart, 0, "caret location after two char input and VK_UP");
+  is(inputNode.selectionStart, 0,
+     "caret location after two char input and VK_UP");
   EventUtils.synthesizeKey("VK_DOWN", {});
-  is(inputNode.selectionStart, 2, "caret location after two char input and VK_DOWN");
+  is(inputNode.selectionStart, 2,
+     "caret location after two char input and VK_DOWN");
 
   EventUtils.synthesizeKey("a", { ctrlKey: true });
-  is(inputNode.selectionStart, 0, "move caret to beginning of 2 char input with ctrl-a");
+  is(inputNode.selectionStart, 0,
+     "move caret to beginning of 2 char input with ctrl-a");
   EventUtils.synthesizeKey("a", { ctrlKey: true });
-  is(inputNode.selectionStart, 0, "no change of caret location on repeat ctrl-a");
+  is(inputNode.selectionStart, 0,
+     "no change of caret location on repeat ctrl-a");
   EventUtils.synthesizeKey("p", { ctrlKey: true });
-  is(inputNode.selectionStart, 0, "no change of caret location on ctrl-p from beginning of line");
+  is(inputNode.selectionStart, 0,
+     "no change of caret location on ctrl-p from beginning of line");
 
   EventUtils.synthesizeKey("e", { ctrlKey: true });
-  is(inputNode.selectionStart, 2, "move caret to end of 2 char input with ctrl-e");
+  is(inputNode.selectionStart, 2,
+     "move caret to end of 2 char input with ctrl-e");
   EventUtils.synthesizeKey("e", { ctrlKey: true });
-  is(inputNode.selectionStart, 2, "no change of caret location on repeat ctrl-e");
+  is(inputNode.selectionStart, 2,
+     "no change of caret location on repeat ctrl-e");
   EventUtils.synthesizeKey("n", { ctrlKey: true });
-  is(inputNode.selectionStart, 2, "no change of caret location on ctrl-n from end of line");
+  is(inputNode.selectionStart, 2,
+     "no change of caret location on ctrl-n from end of line");
 
   EventUtils.synthesizeKey("p", { ctrlKey: true });
   is(inputNode.selectionStart, 0, "ctrl-p moves to start of line");
 
   EventUtils.synthesizeKey("n", { ctrlKey: true });
   is(inputNode.selectionStart, 2, "ctrl-n moves to end of line");
 }
 
@@ -85,41 +96,45 @@ function testMultiLineInputNavNoHistory(
   jsterm.setInputValue("");
   // simulate shift-return
   for (let i = 0; i < lineValues.length; i++) {
     jsterm.setInputValue(inputNode.value + lineValues[i]);
     EventUtils.synthesizeKey("VK_RETURN", { shiftKey: true });
   }
   let inputValue = inputNode.value;
   is(inputNode.selectionStart, inputNode.selectionEnd);
-  is(inputNode.selectionStart, inputValue.length, "caret at end of multiline input");
+  is(inputNode.selectionStart, inputValue.length,
+     "caret at end of multiline input");
 
-  // possibility newline is represented by one ('\r', '\n') or two ('\r\n') chars
+  // possibility newline is represented by one ('\r', '\n') or two
+  // ('\r\n') chars
   let newlineString = inputValue.match(/(\r\n?|\n\r?)$/)[0];
 
   // Ok, test navigating within the multi-line string!
   EventUtils.synthesizeKey("VK_UP", {});
-  let expectedStringAfterCarat = lineValues[5]+newlineString;
+  let expectedStringAfterCarat = lineValues[5] + newlineString;
   is(inputNode.value.slice(inputNode.selectionStart), expectedStringAfterCarat,
      "up arrow from end of multiline");
 
   EventUtils.synthesizeKey("VK_DOWN", {});
   is(inputNode.value.slice(inputNode.selectionStart), "",
      "down arrow from within multiline");
 
   // navigate up through input lines
   EventUtils.synthesizeKey("p", { ctrlKey: true });
   is(inputNode.value.slice(inputNode.selectionStart), expectedStringAfterCarat,
      "ctrl-p from end of multiline");
 
   for (let i = 4; i >= 0; i--) {
     EventUtils.synthesizeKey("p", { ctrlKey: true });
-    expectedStringAfterCarat = lineValues[i] + newlineString + expectedStringAfterCarat;
-    is(inputNode.value.slice(inputNode.selectionStart), expectedStringAfterCarat,
-       "ctrl-p from within line " + i + " of multiline input");
+    expectedStringAfterCarat = lineValues[i] + newlineString +
+      expectedStringAfterCarat;
+    is(inputNode.value.slice(inputNode.selectionStart),
+      expectedStringAfterCarat, "ctrl-p from within line " + i +
+      " of multiline input");
   }
   EventUtils.synthesizeKey("p", { ctrlKey: true });
   is(inputNode.selectionStart, 0, "reached start of input");
   is(inputNode.value, inputValue,
      "no change to multiline input on ctrl-p from beginning of multiline");
 
   // navigate to end of first line
   EventUtils.synthesizeKey("e", { ctrlKey: true });
@@ -133,23 +148,23 @@ function testMultiLineInputNavNoHistory(
 
   // navigate down one line; ctrl-a to the beginning; ctrl-e to end
   for (let i = 1; i < lineValues.length; i++) {
     EventUtils.synthesizeKey("n", { ctrlKey: true });
     EventUtils.synthesizeKey("a", { ctrlKey: true });
     caretPos = inputNode.selectionStart;
     expectedStringBeforeCarat += newlineString;
     is(inputNode.value.slice(0, caretPos), expectedStringBeforeCarat,
-       "ctrl-a to beginning of line " + (i+1) + " in multiline input");
+       "ctrl-a to beginning of line " + (i + 1) + " in multiline input");
 
     EventUtils.synthesizeKey("e", { ctrlKey: true });
     caretPos = inputNode.selectionStart;
     expectedStringBeforeCarat += lineValues[i];
     is(inputNode.value.slice(0, caretPos), expectedStringBeforeCarat,
-       "ctrl-e to end of line " + (i+1) + "in multiline input");
+       "ctrl-e to end of line " + (i + 1) + "in multiline input");
   }
 }
 
 function testNavWithHistory() {
   // NOTE: Tests does NOT currently define behaviour for ctrl-p/ctrl-n with
   // caret placed _within_ single line input
   let values = ['"single line input"',
                 '"a longer single-line input to check caret repositioning"',
@@ -158,45 +173,46 @@ function testNavWithHistory() {
   // submit to history
   for (let i = 0; i < values.length; i++) {
     jsterm.setInputValue(values[i]);
     jsterm.execute();
   }
   is(inputNode.selectionStart, 0, "caret location at start of empty line");
 
   EventUtils.synthesizeKey("p", { ctrlKey: true });
-  is(inputNode.selectionStart, values[values.length-1].length,
+  is(inputNode.selectionStart, values[values.length - 1].length,
      "caret location correct at end of last history input");
 
   // Navigate backwards history with ctrl-p
-  for (let i = values.length-1; i > 0; i--) {
+  for (let i = values.length - 1; i > 0; i--) {
     let match = values[i].match(/(\n)/g);
     if (match) {
       // multi-line inputs won't update from history unless caret at beginning
       EventUtils.synthesizeKey("a", { ctrlKey: true });
-      for (let i = 0; i < match.length; i++) {
+      for (let j = 0; j < match.length; j++) {
         EventUtils.synthesizeKey("p", { ctrlKey: true });
       }
       EventUtils.synthesizeKey("p", { ctrlKey: true });
     } else {
       // single-line inputs will update from history from end of line
       EventUtils.synthesizeKey("p", { ctrlKey: true });
     }
-    is(inputNode.value, values[i-1],
-       "ctrl-p updates inputNode from backwards history values[" + i-1 + "]");
+    is(inputNode.value, values[i - 1],
+       "ctrl-p updates inputNode from backwards history values[" + i - 1 + "]");
   }
   let inputValue = inputNode.value;
   EventUtils.synthesizeKey("p", { ctrlKey: true });
   is(inputNode.selectionStart, 0,
-     "ctrl-p at beginning of history moves caret location to beginning of line");
+     "ctrl-p at beginning of history moves caret location to beginning " +
+     "of line");
   is(inputNode.value, inputValue,
      "no change to input value on ctrl-p from beginning of line");
 
   // Navigate forwards history with ctrl-n
-  for (let i = 1; i<values.length; i++) {
+  for (let i = 1; i < values.length; i++) {
     EventUtils.synthesizeKey("n", { ctrlKey: true });
     is(inputNode.value, values[i],
        "ctrl-n updates inputNode from forwards history values[" + i + "]");
     is(inputNode.selectionStart, values[i].length,
        "caret location correct at end of history input for values[" + i + "]");
   }
   EventUtils.synthesizeKey("n", { ctrlKey: true });
   ok(!inputNode.value, "ctrl-n at end of history updates to empty input");
@@ -207,11 +223,11 @@ function testNavWithHistory() {
 
   // Attempt nav within input
   EventUtils.synthesizeKey("p", { ctrlKey: true });
   is(inputNode.value, inputValue,
      "ctrl-p from end of multi-line does not trigger history");
 
   EventUtils.synthesizeKey("a", { ctrlKey: true });
   EventUtils.synthesizeKey("p", { ctrlKey: true });
-  is(inputNode.value, values[values.length-1],
+  is(inputNode.value, values[values.length - 1],
      "ctrl-p from start of multi-line triggers history");
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_837351_securityerrors.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_837351_securityerrors.js
@@ -1,12 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-const TEST_URI = "https://example.com/browser/browser/devtools/webconsole/test/test-bug-837351-security-errors.html";
+"use strict";
+
+const TEST_URI = "https://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-837351-security-errors.html";
 
 let test = asyncTest(function* () {
   yield pushPrefEnv();
 
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
@@ -21,16 +24,17 @@ let test = asyncTest(function* () {
         text: "Blocked loading mixed active content \"http://example.com/\"",
         category: CATEGORY_SECURITY,
         severity: SEVERITY_ERROR
       },
     ],
   });
 });
 
-function pushPrefEnv()
-{
+function pushPrefEnv() {
   let deferred = promise.defer();
-  let options = {'set': [["security.mixed_content.block_active_content", true]]};
+  let options = {
+    set: [["security.mixed_content.block_active_content", true]]
+  };
   SpecialPowers.pushPrefEnv(options, deferred.resolve);
   return deferred.promise;
 }
 
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_846918_hsts_invalid-headers.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_846918_hsts_invalid-headers.js
@@ -1,14 +1,19 @@
  /* Any copyright is dedicated to the Public Domain.
   * http://creativecommons.org/publicdomain/zero/1.0/ */
 /* Tests that errors about invalid HSTS security headers are logged
  *  to the web console */
-const TEST_URI = "https://example.com/browser/browser/devtools/webconsole/test/test-bug-846918-hsts-invalid-headers.html";
-const HSTS_INVALID_HEADER_MSG = "The site specified an invalid Strict-Transport-Security header.";
+
+"use strict";
+
+const TEST_URI = "https://example.com/browser/browser/devtools/webconsole/" +
+                 "test/test-bug-846918-hsts-invalid-headers.html";
+const HSTS_INVALID_HEADER_MSG = "The site specified an invalid " +
+                                "Strict-Transport-Security header.";
 const LEARN_MORE_URI = "https://developer.mozilla.org/docs/Security/HTTP_Strict_Transport_Security";
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   let results = yield waitForMessages({
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_915141_toggle_response_logging_with_keyboard.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_915141_toggle_response_logging_with_keyboard.js
@@ -1,113 +1,124 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
-// Tests that the 'Log Request and Response Bodies' buttons can be toggled with keyboard.
-const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 915141: Toggle log response bodies with keyboard";
+// Tests that the 'Log Request and Response Bodies' buttons can be toggled
+// with keyboard.
+
+"use strict";
+
+const TEST_URI = "data:text/html;charset=utf-8,Web Console test for " +
+                 "bug 915141: Toggle log response bodies with keyboard";
 let hud;
 
 function test() {
   let saveBodiesMenuItem;
   let saveBodiesContextMenuItem;
 
   loadTab(TEST_URI).then(({tab: tab}) => {
     return openConsole(tab);
   })
   .then((aHud) => {
     hud = aHud;
     saveBodiesMenuItem = hud.ui.rootElement.querySelector("#saveBodies");
     saveBodiesContextMenuItem = hud.ui.rootElement.querySelector("#saveBodiesContextMenu");
 
     // Test the context menu action.
-    info("Testing 'Log Request and Response Bodies' menuitem of right click context menu.");
+    info("Testing 'Log Request and Response Bodies' menuitem of right click " +
+         "context menu.");
 
     return openPopup(saveBodiesContextMenuItem);
   })
   .then(() => {
     is(saveBodiesContextMenuItem.getAttribute("checked"), "false",
        "Context menu: 'log responses' is not checked before action.");
     is(hud.ui._saveRequestAndResponseBodies, false,
        "Context menu: Responses are not logged before action.");
 
     EventUtils.synthesizeKey("VK_DOWN", {});
     EventUtils.synthesizeKey("VK_RETURN", {});
 
-   return waitForUpdate(saveBodiesContextMenuItem);
+    return waitForUpdate(saveBodiesContextMenuItem);
   })
   .then(() => {
     is(saveBodiesContextMenuItem.getAttribute("checked"), "true",
-       "Context menu: 'log responses' is checked after menuitem was selected with keyboard.");
+       "Context menu: 'log responses' is checked after menuitem was selected " +
+       "with keyboard.");
     is(hud.ui._saveRequestAndResponseBodies, true,
-       "Context menu: Responses are saved after menuitem was selected with keyboard.");
+       "Context menu: Responses are saved after menuitem was selected with " +
+       "keyboard.");
 
     return openPopup(saveBodiesMenuItem);
   })
   .then(() => {
     // Test the 'Net' menu item.
-    info("Testing 'Log Request and Response Bodies' menuitem of 'Net' menu in the console.");
-    // 'Log Request and Response Bodies' should be selected due to previous test.
+    info("Testing 'Log Request and Response Bodies' menuitem of 'Net' menu " +
+         "in the console.");
+    // 'Log Request and Response Bodies' should be selected due to previous
+    // test.
 
     is(saveBodiesMenuItem.getAttribute("checked"), "true",
        "Console net menu: 'log responses' is checked before action.");
     is(hud.ui._saveRequestAndResponseBodies, true,
        "Console net menu: Responses are logged before action.");
 
     // The correct item is the last one in the menu.
     EventUtils.synthesizeKey("VK_UP", {});
     EventUtils.synthesizeKey("VK_RETURN", {});
 
-   return waitForUpdate(saveBodiesMenuItem);
+    return waitForUpdate(saveBodiesMenuItem);
   })
   .then(() => {
     is(saveBodiesMenuItem.getAttribute("checked"), "false",
-       "Console net menu: 'log responses' is NOT checked after menuitem was selected with keyboard.");
+       "Console net menu: 'log responses' is NOT checked after menuitem was " +
+       "selected with keyboard.");
     is(hud.ui._saveRequestAndResponseBodies, false,
        "Responses are NOT saved after menuitem was selected with keyboard.");
     hud = null;
   })
   .then(finishTest);
 }
 
 /**
- * Opens and waits for the menu containing aMenuItem to open.
- * @param aMenuItem MenuItem
+ * Opens and waits for the menu containing menuItem to open.
+ * @param menuItem MenuItem
  *        A MenuItem in a menu that should be opened.
  * @return A promise that's resolved once menu is open.
  */
-function openPopup(aMenuItem) {
-  let menu = aMenuItem.parentNode;
+function openPopup(menuItem) {
+  let menu = menuItem.parentNode;
 
   let menuOpened = promise.defer();
   let uiUpdated = promise.defer();
   // The checkbox menuitem is updated asynchronously on 'popupshowing' event so
   // it's better to wait for both the update to happen and the menu to open
   // before continuing or the test might fail due to a race between menu being
   // shown and the item updated to have the correct state.
   hud.ui.once("save-bodies-ui-toggled", uiUpdated.resolve);
-  menu.addEventListener("popupshown", function onPopup () {
+  menu.addEventListener("popupshown", function onPopup() {
     menu.removeEventListener("popupshown", onPopup);
     menuOpened.resolve();
   });
 
   menu.openPopup();
   return Promise.all([menuOpened.promise, uiUpdated.promise]);
 }
 
 /**
- * Waits for the settings and menu containing aMenuItem to update.
- * @param aMenuItem MenuItem
+ * Waits for the settings and menu containing menuItem to update.
+ * @param menuItem MenuItem
  *        The menuitem that should be updated.
  * @return A promise that's resolved once the settings and menus are updated.
  */
-function waitForUpdate(aMenuItem) {
+function waitForUpdate(menuItem) {
   info("Waiting for settings update to complete.");
   let deferred = promise.defer();
-  hud.ui.once("save-bodies-pref-reversed", function () {
+  hud.ui.once("save-bodies-pref-reversed", function() {
     hud.ui.once("save-bodies-ui-toggled", deferred.resolve);
     // The checked state is only updated once the popup is shown.
-    aMenuItem.parentNode.openPopup();
+    menuItem.parentNode.openPopup();
   });
   return deferred.promise;
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_cached_autocomplete.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_cached_autocomplete.js
@@ -1,17 +1,20 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Tests that the cached autocomplete results are used when the new
 // user input is a subset of the existing completion results.
 
-const TEST_URI = "data:text/html;charset=utf8,<p>test cached autocompletion results";
+"use strict";
+
+const TEST_URI = "data:text/html;charset=utf8,<p>test cached autocompletion " +
+                 "results";
 
 let jsterm;
 
 let test = asyncTest(function* () {
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
@@ -27,44 +30,46 @@ let test = asyncTest(function* () {
   is(input.value, "doc", "'docu' completion (input.value)");
   is(jsterm.completeNode.value, "   ument", "'docu' completion (completeNode)");
 
   // Test typing 'window.'.
   input.value = "window.";
   input.setSelectionRange(7, 7);
   yield complete(jsterm.COMPLETE_HINT_ONLY);
 
-  ok(popup.getItems().length > 0, "'window.' gave a list of suggestions")
+  ok(popup.getItems().length > 0, "'window.' gave a list of suggestions");
 
   yield jsterm.execute("window.docfoobar = true");
 
   // Test typing 'window.doc'.
   input.value = "window.doc";
   input.setSelectionRange(10, 10);
   yield complete(jsterm.COMPLETE_HINT_ONLY);
 
   let newItems = popup.getItems();
   ok(newItems.every(function(item) {
-       return item.label != "docfoobar";
-     }), "autocomplete cached results do not contain docfoobar. list has not been updated");
+    return item.label != "docfoobar";
+  }), "autocomplete cached results do not contain docfoobar. list has not " +
+      "been updated");
 
   // Test that backspace does not cause a request to the server
   input.value = "window.do";
   input.setSelectionRange(9, 9);
   yield complete(jsterm.COMPLETE_HINT_ONLY);
 
   newItems = popup.getItems();
   ok(newItems.every(function(item) {
-       return item.label != "docfoobar";
-     }), "autocomplete cached results do not contain docfoobar. list has not been updated");
+    return item.label != "docfoobar";
+  }), "autocomplete cached results do not contain docfoobar. list has not " +
+      "been updated");
 
   yield jsterm.execute("delete window.docfoobar");
 
   // Test if 'window.getC' gives 'getComputedStyle'
-  input.value = "window."
+  input.value = "window.";
   input.setSelectionRange(7, 7);
   yield complete(jsterm.COMPLETE_HINT_ONLY);
 
   input.value = "window.getC";
   input.setSelectionRange(11, 11);
   yield complete(jsterm.COMPLETE_HINT_ONLY);
 
   newItems = popup.getItems();
@@ -88,18 +93,19 @@ let test = asyncTest(function* () {
 
   // Make sure 'dump(window.doc)' does not contain 'docfoobar'.
   input.value = "dump(window.doc)";
   input.setSelectionRange(15, 15);
   yield complete(jsterm.COMPLETE_HINT_ONLY);
 
   newItems = popup.getItems();
   ok(newItems.every(function(item) {
-       return item.label != "docfoobar";
-     }), "autocomplete cached results do not contain docfoobar. list has not been updated");
+    return item.label != "docfoobar";
+  }), "autocomplete cached results do not contain docfoobar. list has not " +
+      "been updated");
 
   yield jsterm.execute("delete window.docfoobar");
 
   jsterm = null;
 });
 
 function complete(type) {
   let updated = jsterm.once("autocomplete-updated");
--- a/browser/devtools/webconsole/test/browser_webconsole_cd_iframe.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_cd_iframe.js
@@ -1,17 +1,20 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Test that the cd() jsterm helper function works as expected. See bug 609872.
 
+"use strict";
+
 function test() {
   let hud;
 
-  const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-609872-cd-iframe-parent.html";
+  const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/" +
+                   "test/test-bug-609872-cd-iframe-parent.html";
 
   const parentMessages = [{
     name: "document.title in parent iframe",
     text: "bug 609872 - iframe parent",
     category: CATEGORY_OUTPUT,
   }, {
     name: "paragraph content",
     text: "p: test for bug 609872 - iframe parent",