Bug 1001090 - Part 5: Fix errors in tests throughout the tree. (r=robcee,gavin)
authorShu-yu Guo <shu@rfrn.org>
Mon, 15 Sep 2014 16:30:47 -0700
changeset 205414 fada58fb0996a728440726b41ec8b7918a799e58
parent 205413 687318d464a5ed99d8328a049a5ad0a4d86131cf
child 205415 dac91d4a335cfced5cca8df9e9f66e85a293d227
child 205420 b948fa9ddf61c9b684f65b44ce639ae807d0a440
push id27492
push usernigelbabu@gmail.com
push dateTue, 16 Sep 2014 03:01:01 +0000
treeherdermozilla-central@4e8c6c5c0961 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrobcee, gavin
bugs1001090
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1001090 - Part 5: Fix errors in tests throughout the tree. (r=robcee,gavin)
browser/base/content/test/general/browser_bug1003461-switchtab-override.js
browser/base/content/test/general/browser_urlbarSearchSingleWordNotification.js
browser/base/content/test/newtab/browser_newtab_enhanced.js
browser/base/content/test/plugins/browser_pageInfo_plugins.js
browser/components/customizableui/test/browser_884402_customize_from_overflow.js
browser/components/customizableui/test/browser_886323_buildArea_removable_nodes.js
browser/components/customizableui/test/browser_888817_currentset_updating.js
browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js
browser/components/customizableui/test/browser_962884_opt_in_disable_hyphens.js
browser/components/customizableui/test/browser_987492_window_api.js
browser/components/customizableui/test/browser_987640_charEncoding.js
browser/components/customizableui/test/browser_bootstrapped_custom_toolbar.js
browser/components/loop/test/mochitest/browser_CardDavImporter.js
browser/components/loop/test/mochitest/browser_LoopContacts.js
browser/components/places/tests/unit/test_421483.js
browser/components/preferences/tests/browser_chunk_permissions.js
browser/components/privatebrowsing/test/browser/browser_privatebrowsing_DownloadLastDirWithCPS.js
browser/components/search/test/browser_426329.js
browser/components/sessionstore/test/browser_463205.js
browser/components/sessionstore/test/browser_662743.js
browser/components/sessionstore/test/browser_attributes.js
browser/components/sessionstore/test/browser_broadcast.js
browser/components/sessionstore/test/browser_dynamic_frames.js
browser/components/sessionstore/test/browser_formdata.js
browser/components/sessionstore/test/browser_label_and_icon.js
browser/components/sessionstore/test/browser_privatetabs.js
browser/components/sessionstore/test/browser_sessionHistory.js
browser/components/sessionstore/test/browser_sessionStorage.js
browser/components/tabview/test/browser_tabview_bug631752.js
browser/components/translation/test/unit/test_healthreport.js
browser/devtools/canvasdebugger/test/browser_canvas-actor-test-10.js
browser/devtools/canvasdebugger/test/browser_canvas-frontend-call-search.js
browser/devtools/canvasdebugger/test/browser_canvas-frontend-slider-02.js
browser/devtools/canvasdebugger/test/browser_canvas-frontend-snapshot-select.js
browser/devtools/commandline/test/browser_cmd_csscoverage_util.js
browser/devtools/debugger/test/browser_dbg_break-on-dom-04.js
browser/devtools/debugger/test/browser_dbg_break-on-dom-05.js
browser/devtools/debugger/test/browser_dbg_break-on-dom-06.js
browser/devtools/debugger/test/browser_dbg_cmd-blackbox.js
browser/devtools/debugger/test/browser_dbg_controller-evaluate-01.js
browser/devtools/debugger/test/browser_dbg_file-reload.js
browser/devtools/debugger/test/browser_dbg_optimized-out-vars.js
browser/devtools/debugger/test/browser_dbg_paused-keybindings.js
browser/devtools/debugger/test/browser_dbg_pretty-print-05.js
browser/devtools/debugger/test/browser_dbg_pretty-print-06.js
browser/devtools/debugger/test/browser_dbg_variables-view-data.js
browser/devtools/debugger/test/browser_dbg_variables-view-override-01.js
browser/devtools/debugger/test/browser_dbg_variables-view-popup-10.js
browser/devtools/debugger/test/browser_dbg_variables-view-popup-11.js
browser/devtools/debugger/test/browser_dbg_variables-view-popup-12.js
browser/devtools/framework/test/browser_toolbox_theme_registration.js
browser/devtools/inspector/test/browser_inspector_breadcrumbs_highlight_hover.js
browser/devtools/inspector/test/browser_inspector_highlighter-02.js
browser/devtools/markupview/test/browser_markupview_highlight_hover_03.js
browser/devtools/markupview/test/browser_markupview_tag_edit_03.js
browser/devtools/netmonitor/test/browser_net_post-data-03.js
browser/devtools/profiler/test/browser_profiler_data-massaging-01.js
browser/devtools/profiler/test/browser_profiler_jump-to-debugger-02.js
browser/devtools/profiler/test/browser_profiler_shared-connection-03.js
browser/devtools/profiler/test/browser_profiler_tree-abstract-01.js
browser/devtools/profiler/test/browser_profiler_tree-view-06.js
browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_01.js
browser/devtools/projecteditor/test/browser_projecteditor_editors_image.js
browser/devtools/projecteditor/test/browser_projecteditor_external_change.js
browser/devtools/projecteditor/test/browser_projecteditor_menubar_01.js
browser/devtools/responsivedesign/test/browser_responsiveui.js
browser/devtools/shadereditor/test/browser_se_shaders-edit-02.js
browser/devtools/shadereditor/test/browser_webgl-actor-test-07.js
browser/devtools/shadereditor/test/browser_webgl-actor-test-14.js
browser/devtools/shadereditor/test/browser_webgl-actor-test-16.js
browser/devtools/shadereditor/test/browser_webgl-actor-test-18.js
browser/devtools/shared/test/browser_cubic-bezier-02.js
browser/devtools/shared/test/browser_cubic-bezier-03.js
browser/devtools/shared/test/browser_layoutHelpers-getBoxQuads.js
browser/devtools/shared/test/browser_outputparser.js
browser/devtools/shared/test/browser_tableWidget_basic.js
browser/devtools/shared/test/browser_tableWidget_keyboard_interaction.js
browser/devtools/shared/test/browser_tableWidget_mouse_interaction.js
browser/devtools/shared/test/browser_treeWidget_keyboard_interaction.js
browser/devtools/shared/test/browser_treeWidget_mouse_interaction.js
browser/devtools/shared/test/unit/test_bezierCanvas.js
browser/devtools/shared/test/unit/test_cubicBezier.js
browser/devtools/styleeditor/test/browser_styleeditor_cmd_edit.js
browser/devtools/styleeditor/test/browser_styleeditor_new.js
browser/devtools/styleinspector/test/browser_computedview_keybindings_02.js
browser/devtools/styleinspector/test/browser_ruleview_add-property-cancel_02.js
browser/devtools/styleinspector/test/browser_ruleview_add-property_01.js
browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_01.js
browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_02.js
browser/devtools/styleinspector/test/browser_ruleview_edit-property_01.js
browser/devtools/styleinspector/test/browser_ruleview_edit-property_02.js
browser/devtools/styleinspector/test/browser_ruleview_keybindings.js
browser/devtools/styleinspector/test/browser_ruleview_pseudo-element.js
browser/devtools/styleinspector/test/browser_ruleview_refresh-on-attribute-change_01.js
browser/devtools/styleinspector/test/browser_ruleview_refresh-on-style-change.js
browser/devtools/styleinspector/test/browser_ruleview_selector-highlighter_02.js
browser/devtools/styleinspector/test/browser_ruleview_urls-clickable.js
browser/devtools/styleinspector/test/browser_ruleview_user-agent-styles.js
browser/devtools/styleinspector/test/browser_styleinspector_csslogic-content-stylesheets.js
browser/devtools/styleinspector/test/browser_styleinspector_tooltip-background-image.js
browser/devtools/styleinspector/test/browser_styleinspector_tooltip-closes-on-new-selection.js
browser/devtools/styleinspector/test/browser_styleinspector_tooltip-longhand-fontfamily.js
browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-01.js
browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-02.js
browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-03.js
browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-04.js
browser/devtools/webaudioeditor/test/browser_audionode-actor-get-set-param.js
browser/devtools/webaudioeditor/test/browser_wa_reset-01.js
browser/devtools/webaudioeditor/test/browser_wa_reset-02.js
browser/devtools/webaudioeditor/test/browser_wa_reset-03.js
browser/devtools/webaudioeditor/test/browser_wa_reset-04.js
browser/devtools/webaudioeditor/test/browser_webaudio-actor-connect-param.js
browser/devtools/webaudioeditor/test/browser_webaudio-actor-destroy-node.js
browser/devtools/webaudioeditor/test/browser_webaudio-actor-simple.js
browser/devtools/webconsole/test/browser_webconsole_bug_586388_select_all.js
browser/devtools/webconsole/test/browser_webconsole_network_panel.js
browser/devtools/webconsole/test/browser_webconsole_split.js
browser/devtools/webconsole/test/browser_webconsole_split_focus.js
browser/devtools/webconsole/test/browser_webconsole_split_persist.js
browser/devtools/webconsole/test/head.js
browser/devtools/webide/test/test_newapp.html
browser/experiments/test/xpcshell/test_activate.js
browser/experiments/test/xpcshell/test_api.js
browser/modules/test/browser_ContentSearch.js
browser/modules/test/browser_UITour2.js
caps/tests/mochitest/test_disableScript.xul
dom/cellbroadcast/tests/marionette/test_cellbroadcast_gsm.js
dom/cellbroadcast/tests/marionette/test_cellbroadcast_umts.js
dom/indexedDB/test/error_events_abort_transactions_iframe.html
dom/indexedDB/test/exceptions_in_events_iframe.html
dom/indexedDB/test/test_blob_simple.html
dom/indexedDB/test/test_file_transaction_abort.html
dom/indexedDB/test/test_filehandle_store_snapshot.html
dom/indexedDB/test/test_persistenceType.html
dom/indexedDB/test/unit/test_autoIncrement_indexes.js
dom/indexedDB/test/unit/test_complex_keyPaths.js
dom/indexedDB/test/unit/test_create_index_with_integer_keys.js
dom/indexedDB/test/unit/test_create_objectStore.js
dom/indexedDB/test/unit/test_deleteDatabase.js
dom/indexedDB/test/unit/test_deleteDatabase_interactions.js
dom/indexedDB/test/unit/test_index_empty_keyPath.js
dom/indexedDB/test/unit/test_indexes.js
dom/indexedDB/test/unit/test_multientry.js
dom/indexedDB/test/unit/test_names_sorted.js
dom/indexedDB/test/unit/test_objectStore_openKeyCursor.js
dom/indexedDB/test/unit/test_open_for_principal.js
dom/indexedDB/test/unit/test_overlapping_transactions.js
dom/indexedDB/test/unit/test_persistenceType.js
dom/indexedDB/test/unit/test_remove_objectStore.js
dom/indexedDB/test/unit/test_temporary_storage.js
dom/indexedDB/test/unit/test_transaction_error.js
dom/indexedDB/test/unit/test_transaction_ordering.js
dom/system/gonk/tests/test_ril_worker_sms_cdma.js
dom/system/gonk/tests/test_ril_worker_stk.js
dom/system/tests/marionette/test_proximity_init.js
dom/tests/mochitest/chrome/queryCaretRectUnix.html
dom/tests/mochitest/chrome/queryCaretRectWin.html
dom/tests/mochitest/chrome/selectAtPoint.html
dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.js
dom/wappush/tests/test_si_pdu_helper.js
dom/wappush/tests/test_sl_pdu_helper.js
dom/workers/test/test_multi_sharedWorker_lifetimes.html
dom/xbl/test/test_bug591198.html
extensions/cookie/test/unit/test_cookies_async_failure.js
extensions/cookie/test/unit/test_domain_eviction.js
extensions/cookie/test/unit/test_schema_2_migration.js
extensions/cookie/test/unit/test_schema_3_migration.js
image/test/unit/test_moz_icon_uri.js
js/xpconnect/tests/unit/test_sandbox_metadata.js
mobile/android/base/tests/testHomeProvider.js
mobile/android/base/tests/testMozPay.js
modules/libpref/test/unit/test_libPrefs.js
services/common/tests/unit/test_storage_server.js
services/common/tests/unit/test_storageservice_bso.js
services/crypto/tests/unit/test_crypto_crypt.js
services/crypto/tests/unit/test_utils_httpmac.js
services/fxaccounts/tests/xpcshell/test_accounts.js
services/fxaccounts/tests/xpcshell/test_client.js
services/fxaccounts/tests/xpcshell/test_loginmgr_storage.js
services/sync/tests/unit/test_addons_reconciler.js
services/sync/tests/unit/test_bookmark_engine.js
services/sync/tests/unit/test_httpd_sync_server.js
services/sync/tests/unit/test_resource.js
services/sync/tests/unit/test_syncengine_sync.js
services/sync/tests/unit/test_tab_store.js
storage/test/unit/test_cache_size.js
storage/test/unit/test_storage_connection.js
toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js
toolkit/components/crashes/tests/xpcshell/test_crash_store.js
toolkit/components/ctypes/tests/chrome/test_ctypes.xul
toolkit/components/ctypes/tests/unit/test_jsctypes.js
toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
toolkit/components/osfile/tests/xpcshell/test_unique.js
toolkit/components/passwordmgr/test/unit/test_storage.js
toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js
toolkit/components/places/tests/bookmarks/test_477583_json-backup-in-future.js
toolkit/components/places/tests/bookmarks/test_bookmarks.js
toolkit/components/places/tests/bookmarks/test_keywords.js
toolkit/components/places/tests/browser/browser_bug248970.js
toolkit/components/places/tests/expiration/test_annos_expire_history.js
toolkit/components/places/tests/expiration/test_annos_expire_never.js
toolkit/components/places/tests/expiration/test_removeAllPages.js
toolkit/components/places/tests/unit/test_385397.js
toolkit/components/places/tests/unit/test_399266.js
toolkit/components/places/tests/unit/test_PlacesSearchAutocompleteProvider.js
toolkit/components/places/tests/unit/test_async_transactions.js
toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js
toolkit/components/places/tests/unit/test_preventive_maintenance.js
toolkit/components/prompts/test/test_modal_prompts.html
toolkit/components/satchel/test/unit/test_autocomplete.js
toolkit/components/social/test/browser/browser_SocialProvider.js
toolkit/content/tests/chrome/findbar_window.xul
toolkit/content/tests/chrome/test_bug557987.xul
toolkit/devtools/server/tests/mochitest/inspector-helpers.js
toolkit/devtools/server/tests/mochitest/test_highlighter-boxmodel_02.html
toolkit/devtools/server/tests/mochitest/test_inspector-mutations-childlist.html
toolkit/devtools/server/tests/mochitest/test_styles-applied.html
toolkit/devtools/server/tests/mochitest/test_styles-svg.html
toolkit/devtools/server/tests/unit/test_breakpoint-15.js
toolkit/devtools/tests/unit/test_consoleID.js
toolkit/modules/tests/browser/browser_Geometry.js
toolkit/modules/tests/xpcshell/test_Log.js
toolkit/modules/tests/xpcshell/test_sqlite.js
toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js
toolkit/mozapps/extensions/test/browser/browser_experiments.js
toolkit/mozapps/extensions/test/browser/browser_openH264.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklistchange.js
toolkit/mozapps/extensions/test/xpcshell/test_migrate1.js
toolkit/mozapps/extensions/test/xpcshell/test_overrideblocklist.js
toolkit/mozapps/update/tests/unit_aus_update/uiOnlyAllowOneWindow.js
toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js
toolkit/profile/test/test_create_profile.xul
--- a/browser/base/content/test/general/browser_bug1003461-switchtab-override.js
+++ b/browser/base/content/test/general/browser_bug1003461-switchtab-override.js
@@ -37,17 +37,17 @@ add_task(function* test_switchtab_overri
   EventUtils.synthesizeKey("e" , {});
   yield deferred.promise;
 
   info("Select first autocomplete popup entry");
   EventUtils.synthesizeKey("VK_DOWN" , {});
   ok(/moz-action:switchtab/.test(gURLBar.value), "switch to tab entry found");
 
   info("Override switch-to-tab");
-  let deferred = Promise.defer();
+  deferred = Promise.defer();
   // In case of failure this would switch tab.
   let onTabSelect = event => {
     deferred.reject(new Error("Should have overridden switch to tab"));
   };
   gBrowser.tabContainer.addEventListener("TabSelect", onTabSelect, false);
   registerCleanupFunction(() => {
     gBrowser.tabContainer.removeEventListener("TabSelect", onTabSelect, false);
   });
--- a/browser/base/content/test/general/browser_urlbarSearchSingleWordNotification.js
+++ b/browser/base/content/test/general/browser_urlbarSearchSingleWordNotification.js
@@ -97,17 +97,17 @@ function get_test_function_for_localhost
     // check pref value
     let prefValue = Services.prefs.getBoolPref(pref);
     is(prefValue, !isPrivate, "Pref should have the correct state.");
 
     yield docLoadPromise;
     browser.removeTab(tab);
 
     // Now try again with the pref set.
-    let tab = browser.selectedTab = browser.addTab();
+    tab = browser.selectedTab = browser.addTab();
     // In a private window, the notification should appear again.
     yield* runURLBarSearchTest(hostName, isPrivate, isPrivate, win);
     browser.removeTab(tab);
     if (isPrivate) {
       info("Waiting for private window to close");
       yield promiseWindowClosed(win);
       let deferredFocus = Promise.defer();
       info("Waiting for focus");
--- a/browser/base/content/test/newtab/browser_newtab_enhanced.js
+++ b/browser/base/content/test/newtab/browser_newtab_enhanced.js
@@ -44,35 +44,35 @@ function runTests() {
   isnot(enhanced, "", "directory link has enhanced image");
   is(title, "title");
 
   is(getData(1), null, "history link pushed out by directory link");
 
   // Test with enhanced = true
   NewTabUtils.allPages.enhanced = true;
   yield addNewTabPageTab();
-  let {type, enhanced, title} = getData(0);
+  ({type, enhanced, title} = getData(0));
   is(type, "organic", "directory link is still organic");
   isnot(enhanced, "", "directory link still has enhanced image");
   is(title, "title");
 
   is(getData(1), null, "history link still pushed out by directory link");
 
   // Test with a pinned link
   setPinnedLinks("-1");
   yield addNewTabPageTab();
-  let {type, enhanced, title} = getData(0);
+  ({type, enhanced, title} = getData(0));
   is(type, "enhanced", "pinned history link is enhanced");
   isnot(enhanced, "", "pinned history link has enhanced image");
   is(title, "title");
 
   is(getData(1), null, "directory link pushed out by pinned history link");
 
   // Test pinned link with enhanced = false
   NewTabUtils.allPages.enhanced = false;
   yield addNewTabPageTab();
-  let {type, enhanced, title} = getData(0);
+  ({type, enhanced, title} = getData(0));
   isnot(type, "enhanced", "history link is not enhanced");
   is(enhanced, "", "history link has no enhanced image");
   is(title, "site#-1");
 
   is(getData(1), null, "directory link still pushed out by pinned history link");
 }
--- a/browser/base/content/test/plugins/browser_pageInfo_plugins.js
+++ b/browser/base/content/test/plugins/browser_pageInfo_plugins.js
@@ -65,17 +65,17 @@ function test() {
 }
 
 // The first test plugin is CtP and the second test plugin is enabled.
 function testPart1a() {
   let test = gTestBrowser.contentDocument.getElementById("test");
   let objLoadingContent = test.QueryInterface(Ci.nsIObjectLoadingContent);
   ok(!objLoadingContent.activated, "part 1a: Test plugin should not be activated");
   let secondtest = gTestBrowser.contentDocument.getElementById("secondtestA");
-  let objLoadingContent = secondtest.QueryInterface(Ci.nsIObjectLoadingContent);
+  objLoadingContent = secondtest.QueryInterface(Ci.nsIObjectLoadingContent);
   ok(objLoadingContent.activated, "part 1a: Second Test plugin should be activated");
 
   doOnOpenPageInfo(testPart1b);
 }
 
 function testPart1b() {
   let testRadioGroup = gPageInfo.document.getElementById(gTestPermissionString + "RadioGroup");
   let testRadioDefault = gPageInfo.document.getElementById(gTestPermissionString + "#0");
--- a/browser/components/customizableui/test/browser_884402_customize_from_overflow.js
+++ b/browser/components/customizableui/test/browser_884402_customize_from_overflow.js
@@ -69,14 +69,14 @@ add_task(function() {
   ok(homeButtonPlacement, "Home button should still have a placement");
   is(homeButtonPlacement && homeButtonPlacement.area, "PanelUI-contents", "Home button should be in the panel now");
   CustomizableUI.reset();
 
   // In some cases, it can take a tick for the navbar to overflow again. Wait for it:
   yield waitForCondition(() => navbar.hasAttribute("overflowing"));
   ok(navbar.hasAttribute("overflowing"), "Should have an overflowing toolbar.");
 
-  let homeButtonPlacement = CustomizableUI.getPlacementOfWidget("home-button");
+  homeButtonPlacement = CustomizableUI.getPlacementOfWidget("home-button");
   ok(homeButtonPlacement, "Home button should still have a placement");
   is(homeButtonPlacement && homeButtonPlacement.area, "nav-bar", "Home button should be back in the navbar now");
 
   is(homeButton.getAttribute("overflowedItem"), "true", "Home button should still be overflowed");
 });
--- a/browser/components/customizableui/test/browser_886323_buildArea_removable_nodes.js
+++ b/browser/components/customizableui/test/browser_886323_buildArea_removable_nodes.js
@@ -29,17 +29,17 @@ add_task(function() {
                        "Placements should have changed because widget is removable.");
   let btn = document.getElementById(kButtonId);
   btn.setAttribute("removable", "false");
   gLazyArea.customizationTarget = gLazyArea;
   CustomizableUI.registerToolbarNode(gLazyArea, []);
   assertAreaPlacements(kLazyAreaId, [], "Placements should no longer include widget.");
   is(btn.parentNode.id, gNavBar.customizationTarget.id,
      "Button shouldn't actually have moved as it's not removable");
-  let btn = document.getElementById(kButtonId);
+  btn = document.getElementById(kButtonId);
   if (btn) btn.remove();
   CustomizableUI.removeWidgetFromArea(kButtonId);
   CustomizableUI.unregisterArea(kLazyAreaId);
   gLazyArea.remove();
 });
 
 add_task(function asyncCleanup() {
   yield resetCustomization();
--- a/browser/components/customizableui/test/browser_888817_currentset_updating.js
+++ b/browser/components/customizableui/test/browser_888817_currentset_updating.js
@@ -7,17 +7,17 @@
 // Adding, moving and removing items should update the relevant currentset attributes
 add_task(function() {
   ok(CustomizableUI.inDefaultState, "Should be in the default state when we start");
   let personalbar = document.getElementById(CustomizableUI.AREA_BOOKMARKS);
   setToolbarVisibility(personalbar, true);
   ok(!CustomizableUI.inDefaultState, "Making the bookmarks toolbar visible takes it out of the default state");
 
   let navbar = document.getElementById(CustomizableUI.AREA_NAVBAR);
-  let personalbar = document.getElementById(CustomizableUI.AREA_BOOKMARKS);
+  personalbar = document.getElementById(CustomizableUI.AREA_BOOKMARKS);
   let navbarCurrentset = navbar.getAttribute("currentset") || navbar.currentSet;
   let personalbarCurrentset = personalbar.getAttribute("currentset") || personalbar.currentSet;
 
   let otherWin = yield openAndLoadWindow();
   let otherNavbar = otherWin.document.getElementById(CustomizableUI.AREA_NAVBAR);
   let otherPersonalbar = otherWin.document.getElementById(CustomizableUI.AREA_BOOKMARKS);
 
   CustomizableUI.moveWidgetWithinArea("home-button", 0);
--- a/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
+++ b/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
@@ -84,17 +84,17 @@ add_task(function() {
   let chevron = document.getElementById("nav-bar-overflow-button");
   yield waitForCondition(function() chevron.open);
 
   yield waitForSearchBarFocus();
 
   let hiddenPanelPromise = promiseOverflowHidden(window);
   EventUtils.synthesizeKey("VK_ESCAPE", {});
   yield hiddenPanelPromise;
-  let navbar = document.getElementById(CustomizableUI.AREA_NAVBAR);
+  navbar = document.getElementById(CustomizableUI.AREA_NAVBAR);
   window.resizeTo(this.originalWindowWidth, window.outerHeight);
   yield waitForCondition(() => !navbar.hasAttribute("overflowing"));
   ok(!navbar.hasAttribute("overflowing"), "Should not have an overflowing toolbar.");
 });
 
 // Ctrl+K should focus the search bar if it is in the navbar and not overflowing.
 add_task(function() {
   let placement = CustomizableUI.getPlacementOfWidget("search-container");
--- a/browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js
+++ b/browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js
@@ -30,17 +30,17 @@ add_task(function() {
   checkAreaType(w);
 
   w = CustomizableUI.getWidget(kTestWidget);
   checkAreaType(w);
 
   let spec = {id: kUnregisterAreaTestWidget, type: 'button', removable: true,
               label: "areaType test", tooltiptext: "areaType test"};
   CustomizableUI.createWidget(spec);
-  let toolbarNode = createToolbarWithPlacements(kToolbarName, [kUnregisterAreaTestWidget]);
+  toolbarNode = createToolbarWithPlacements(kToolbarName, [kUnregisterAreaTestWidget]);
   CustomizableUI.unregisterArea(kToolbarName);
   toolbarNode.remove();
   w = CustomizableUI.getWidget(spec.id);
   checkAreaType(w);
   CustomizableUI.removeWidgetFromArea(kUnregisterAreaTestWidget);
   checkAreaType(w);
   //XXXgijs: ensure cleanup function doesn't barf:
   gAddedToolbars.delete(kToolbarName);
--- a/browser/components/customizableui/test/browser_962884_opt_in_disable_hyphens.js
+++ b/browser/components/customizableui/test/browser_962884_opt_in_disable_hyphens.js
@@ -26,35 +26,35 @@ add_task(function() {
 
   characterEncoding.setAttribute("label", kNormalLabel);
 
   yield PanelUI.show();
 
   isnot(characterEncoding.getAttribute("auto-hyphens"), "off",
         "Hyphens should not be disabled if the &shy; character is not present in the label");
   multilineText = document.getAnonymousElementByAttribute(characterEncoding, "class", "toolbarbutton-multiline-text");
-  let multilineTextCS = getComputedStyle(multilineText);
+  multilineTextCS = getComputedStyle(multilineText);
   is(multilineTextCS.MozHyphens, "auto", "-moz-hyphens should be set to auto by default.")
 
   hiddenPanelPromise = promisePanelHidden(window);
   PanelUI.toggle();
   yield hiddenPanelPromise;
 
   characterEncoding.setAttribute("label", "\u00ad" + kNormalLabel);
   CustomizableUI.removeWidgetFromArea("characterencoding-button");
   yield startCustomizing();
 
   isnot(characterEncoding.getAttribute("auto-hyphens"), "off",
         "Hyphens should not be disabled when the widget is in the palette");
 
   gCustomizeMode.addToPanel(characterEncoding);
   is(characterEncoding.getAttribute("auto-hyphens"), "off",
      "Hyphens should be disabled if the &shy; character is present in the label in customization mode");
-  let multilineText = document.getAnonymousElementByAttribute(characterEncoding, "class", "toolbarbutton-multiline-text");
-  let multilineTextCS = getComputedStyle(multilineText);
+  multilineText = document.getAnonymousElementByAttribute(characterEncoding, "class", "toolbarbutton-multiline-text");
+  multilineTextCS = getComputedStyle(multilineText);
   is(multilineTextCS.MozHyphens, "manual", "-moz-hyphens should be set to manual when the &shy; character is present in customization mode.")
 
   yield endCustomizing();
 
   CustomizableUI.addWidgetToArea("characterencoding-button", CustomizableUI.AREA_NAVBAR);
   ok(!characterEncoding.hasAttribute("auto-hyphens"),
      "Removing the widget from the panel should remove the auto-hyphens attribute");
 
--- a/browser/components/customizableui/test/browser_987492_window_api.js
+++ b/browser/components/customizableui/test/browser_987492_window_api.js
@@ -40,15 +40,15 @@ add_task(function* testOpenCloseWindow()
     }
   }
   CustomizableUI.addListener(closeListener);
   yield promiseWindowClosed(newWindow);
   isnot(closedWindow, null, "Should have gotten onWindowClosed event")
   is(newWindow, closedWindow, "Closed window should match previously opened window");
   CustomizableUI.removeListener(closeListener);
 
-  let windows = [];
+  windows = [];
   for (let win of CustomizableUI.windows)
     windows.push(win);
   is(windows.length, 1, "Should have one customizable window");
   isnot(windows.indexOf(window), -1, "Current window should be in window collection.");
   is(windows.indexOf(closedWindow), -1, "Closed window should not be in window collection.");
 });
--- a/browser/components/customizableui/test/browser_987640_charEncoding.js
+++ b/browser/components/customizableui/test/browser_987640_charEncoding.js
@@ -43,17 +43,17 @@ add_task(function() {
   // reset the initial encoding
   yield PanelUI.show();
   charEncodingButton.click();
   tabLoadPromise = promiseTabLoadEvent(gBrowser.selectedTab, TEST_PAGE);
   initialEncoding.click();
   yield tabLoadPromise;
   yield PanelUI.show();
   charEncodingButton.click();
-  let checkedButtons = characterEncodingView.querySelectorAll("toolbarbutton[checked='true']");
+  checkedButtons = characterEncodingView.querySelectorAll("toolbarbutton[checked='true']");
   is(checkedButtons[0].getAttribute("label"), "Unicode", "The encoding was reset to Unicode");
 });
 
 add_task(function asyncCleanup() {
   // reset the panel to the default state
   yield resetCustomization();
   ok(CustomizableUI.inDefaultState, "The UI is in default state again.");
 
--- a/browser/components/customizableui/test/browser_bootstrapped_custom_toolbar.js
+++ b/browser/components/customizableui/test/browser_bootstrapped_custom_toolbar.js
@@ -45,23 +45,23 @@ function checkRestoredPresence(aWidgetID
     CustomizableUI.addWidgetToArea(aWidgetID, kTestBarID);
     let placement = CustomizableUI.getPlacementOfWidget(aWidgetID);
     is(placement.area, kTestBarID,
        "Expected " + aWidgetID + " to be in the test toolbar");
 
     CustomizableUI.unregisterArea(testBar.id);
     testBar.remove();
 
-    let placement = CustomizableUI.getPlacementOfWidget(aWidgetID);
+    placement = CustomizableUI.getPlacementOfWidget(aWidgetID);
     is(placement, null, "Expected " + aWidgetID + " to be in the palette");
 
     testBar = createTestBar(aLegacy);
 
     yield startCustomizing();
-    let placement = CustomizableUI.getPlacementOfWidget(aWidgetID);
+    placement = CustomizableUI.getPlacementOfWidget(aWidgetID);
     is(placement.area, kTestBarID,
        "Expected " + aWidgetID + " to be in the test toolbar");
     yield endCustomizing();
 
     CustomizableUI.unregisterArea(testBar.id);
     testBar.remove();
 
     yield resetCustomization();
--- a/browser/components/loop/test/mochitest/browser_CardDavImporter.js
+++ b/browser/components/loop/test/mochitest/browser_CardDavImporter.js
@@ -322,43 +322,43 @@ add_task(function* test_CardDavImport() 
         "host": "example.com",
         "auth": kAuth.method,
         "user": kAuth.user,
         "password": "invalidpassword"
       }, (err, result) => { err ? resolve(err) : reject(new Error("Should have failed")); }, mockDb);
   });
   Assert.equal(error.message, "401 Auth Failure", "Auth error should propagate");
 
-  let error = yield new Promise ((resolve, reject) => {
+  error = yield new Promise ((resolve, reject) => {
     info("Initiating import");
     importer.startImport({
         "host": "example.invalid",
         "auth": kAuth.method,
         "user": kAuth.user,
         "password": kAuth.password
       }, (err, result) => { err ? resolve(err) : reject(new Error("Should have failed")); }, mockDb);
   });
   Assert.equal(error.message, "404 Not Found", "Not found error should propagate");
 
   let tmp = mockDb.getByServiceId;
   mockDb.getByServiceId = function(serviceId, callback) {
     callback(new Error("getByServiceId failed"));
   };
-  let error = yield new Promise ((resolve, reject) => {
+  error = yield new Promise ((resolve, reject) => {
     info("Initiating import");
     importer.startImport({
         "host": "example.com",
         "auth": kAuth.method,
         "user": kAuth.user,
         "password": kAuth.password
       }, (err, result) => { err ? resolve(err) : reject(new Error("Should have failed")); }, mockDb);
   });
   Assert.equal(error.message, "getByServiceId failed", "Database error should propagate");
   mockDb.getByServiceId = tmp;
 
-  let error = yield new Promise ((resolve, reject) => {
+  error = yield new Promise ((resolve, reject) => {
     info("Initiating import");
     importer.startImport({
         "host": "example.com",
       }, (err, result) => { err ? resolve(err) : reject(new Error("Should have failed")); }, mockDb);
   });
   Assert.equal(error.message, "No authentication specified", "Missing parameters should generate error");
 })
--- a/browser/components/loop/test/mochitest/browser_LoopContacts.js
+++ b/browser/components/loop/test/mochitest/browser_LoopContacts.js
@@ -188,26 +188,26 @@ add_task(function* () {
   LoopContacts.get(contacts[1]._guid, (err, contact) => {
     Assert.ok(!err, "There shouldn't be an error");
     compareContacts(contact, kContacts[1]);
     deferred.resolve();
   });
   yield deferred.promise;
 
   info("Get a single contact by id.");
-  let deferred = Promise.defer();
+  deferred = Promise.defer();
   LoopContacts.getByServiceId(2, (err, contact) => {
     Assert.ok(!err, "There shouldn't be an error");
     compareContacts(contact, kContacts[1]);
     deferred.resolve();
   });
   yield deferred.promise;
 
   info("Get a couple of contacts.");
-  let deferred = Promise.defer();
+  deferred = Promise.defer();
   let toRetrieve = [contacts[0], contacts[2], contacts[3]];
   LoopContacts.getMany(toRetrieve.map(contact => contact._guid), (err, result) => {
     Assert.ok(!err, "There shouldn't be an error");
     Assert.equal(result.length, toRetrieve.length, "Result list should be the same " +
                  "size as the list of items to retrieve");
     for (let contact of toRetrieve) {
       let found = result.filter(c => c._guid == contact._guid);
       Assert.ok(found.length, "Contact " + contact._guid + " should be in the list");
--- a/browser/components/places/tests/unit/test_421483.js
+++ b/browser/components/places/tests/unit/test_421483.js
@@ -41,17 +41,17 @@ add_task(function create_smart_bookmarks
 add_task(function remove_smart_bookmark_and_restore() {
   let smartBookmarkItemIds =
     PlacesUtils.annotations.getItemsWithAnnotation(SMART_BOOKMARKS_ANNO);
   let smartBookmarksCount = smartBookmarkItemIds.length;
   do_log_info("remove one smart bookmark and restore");
   PlacesUtils.bookmarks.removeItem(smartBookmarkItemIds[0]);
   Services.prefs.setIntPref("browser.places.smartBookmarksVersion", 0);
   gluesvc.ensurePlacesDefaultQueriesInitialized();
-  let smartBookmarkItemIds =
+  smartBookmarkItemIds =
     PlacesUtils.annotations.getItemsWithAnnotation(SMART_BOOKMARKS_ANNO);
   do_check_eq(smartBookmarkItemIds.length, smartBookmarksCount);
   do_log_info("check that pref has been bumped up");
   do_check_true(Services.prefs.getIntPref("browser.places.smartBookmarksVersion") > 0);
 });
 
 add_task(function move_smart_bookmark_rename_and_restore() {
   let smartBookmarkItemIds =
--- a/browser/components/preferences/tests/browser_chunk_permissions.js
+++ b/browser/components/preferences/tests/browser_chunk_permissions.js
@@ -116,21 +116,21 @@ var tests = [
   },
   {
     desc: "test removing from sites-list before it is fully constructed.",
     preInit: function() {
       ForgetAboutSite.removeDataFromDomain(TEST_URI_2.host);
     },
     run: function() {
       let testSite1 = getSiteItem(TEST_URI_1.host);
-      ok(!testSite2, "test site 1 was not removed from sites list");
+      ok(testSite1, "test site 1 was not removed from sites list");
       let testSite2 = getSiteItem(TEST_URI_2.host);
       ok(!testSite2, "test site 2 was pre-removed from sites list");
       let testSite3 = getSiteItem(TEST_URI_3.host);
-      ok(!testSite2, "test site 3 was not removed from sites list");
+      ok(testSite3, "test site 3 was not removed from sites list");
 
       runNextTest();
     }
   }
 ];
 
 function getSiteItem(aHost) {
   return gBrowser.contentDocument.
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_DownloadLastDirWithCPS.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_DownloadLastDirWithCPS.js
@@ -233,18 +233,18 @@ function runTest() {
    * ====================
    */
 
   // check that the last dir store got cleared in a new PB window
   pbWin.close();
   // And give it time to close
   executeSoon(moveAlong);
   yield;
-  let pbWin = yield createWindow({private: true});
-  let pbDownloadLastDir = new DownloadLastDir(pbWin);
+  pbWin = yield createWindow({private: true});
+  pbDownloadLastDir = new DownloadLastDir(pbWin);
 
   is((yield checkDownloadLastDir(pbDownloadLastDir, dir1)).path, dir1.path, "uri1 should return the expected last directory");
 
   yield clearHistoryAndWait();
 
   // check clearHistory inside PB mode clears data outside PB mode
   yield setFile(pbDownloadLastDir, uri1, dir2);
 
--- a/browser/components/search/test/browser_426329.js
+++ b/browser/components/search/test/browser_426329.js
@@ -246,17 +246,17 @@ add_task(function testDropInternalText()
   let event = yield promiseOnLoad();
   is(event.originalTarget.URL, expectedURL(searchBar.value), "testDropInternalText opened correct search page");
   is(searchBar.value, "More Text", "drop text/x-moz-text-internal on searchbar");
 
   // testDropLink implicitly depended on testDropInternalText, so these two tests
   // were merged so that if testDropInternalText failed it wouldn't cause testDropLink
   // to fail unexplainably.
   yield prepareTest();
-  let promisePreventPopup = promiseEvent(searchBar, "popupshowing", true);
+  promisePreventPopup = promiseEvent(searchBar, "popupshowing", true);
   ChromeUtils.synthesizeDrop(searchBar.searchButton, searchBar.searchButton, [[ {type: "text/uri-list", data: "http://www.mozilla.org" } ]], "copy", window);
   yield promisePreventPopup;
   is(searchBar.value, "More Text", "drop text/uri-list on searchbar shouldn't change anything");
 });
 
 add_task(function testRightClick() {
   preTabNo = gBrowser.tabs.length;
   content.location.href = "about:blank";
--- a/browser/components/sessionstore/test/browser_463205.js
+++ b/browser/components/sessionstore/test/browser_463205.js
@@ -22,17 +22,17 @@ add_task(function test_check_urls_before
 
   let value = yield getInputValue(browser, {id: "text"});
   is(value, "foobar", "value was restored");
 
   // Restore form data with an invalid URL.
   ss.setTabState(tab, getState("http://example.com/"));
   yield promiseTabRestored(tab);
 
-  let value = yield getInputValue(browser, {id: "text"});
+  value = yield getInputValue(browser, {id: "text"});
   is(value, "", "value was not restored");
 
   // Cleanup.
   gBrowser.removeTab(tab);
 });
 
 function getState(url) {
   return JSON.stringify({
--- a/browser/components/sessionstore/test/browser_662743.js
+++ b/browser/components/sessionstore/test/browser_662743.js
@@ -84,17 +84,17 @@ function testTabRestoreData(aFormData, a
       }
 
       // test select options values
       is(value, aExpectedValue,
         "Select Option by selectedIndex &/or value has been restored correctly");
 
       let restoredFormData = restoredTabState.formdata;
       let selectIdFormData = restoredFormData.id.select_id;
-      let value = restoredFormData.id.select_id.value;
+      value = restoredFormData.id.select_id.value;
 
       // test format
       ok("id" in restoredFormData || "xpath" in restoredFormData,
         "FormData format is valid");
       // test format
       ok("selectedIndex" in selectIdFormData && "value" in selectIdFormData,
         "select format is valid");
        // test set collection values
--- a/browser/components/sessionstore/test/browser_attributes.js
+++ b/browser/components/sessionstore/test/browser_attributes.js
@@ -29,17 +29,17 @@ function runTests() {
   let {attributes} = JSON.parse(ss.getTabState(tab));
   ok(!("image" in attributes), "'image' attribute not saved");
   ok(!("custom" in attributes), "'custom' attribute not saved");
 
   // Test persisting a custom attribute.
   tab.setAttribute("custom", "foobar");
   ss.persistTabAttribute("custom");
 
-  let {attributes} = JSON.parse(ss.getTabState(tab));
+  ({attributes} = JSON.parse(ss.getTabState(tab)));
   is(attributes.custom, "foobar", "'custom' attribute is correct");
 
   // Make sure we're backwards compatible and restore old 'image' attributes.
   let state = {
     entries: [{url: "about:mozilla"}],
     attributes: {custom: "foobaz", image: gBrowser.getIcon(tab)}
   };
 
@@ -50,17 +50,17 @@ function runTests() {
   ok(tab.hasAttribute("pending"), "tab is pending");
   is(gBrowser.getIcon(tab), state.attributes.image, "tab has correct icon");
 
   // Let the pending tab load.
   gBrowser.selectedTab = tab;
   yield whenTabRestored(tab);
 
   // Ensure no 'image' or 'pending' attributes are stored.
-  let {attributes} = JSON.parse(ss.getTabState(tab));
+  ({attributes} = JSON.parse(ss.getTabState(tab)));
   ok(!("image" in attributes), "'image' attribute not saved");
   ok(!("pending" in attributes), "'pending' attribute not saved");
   is(attributes.custom, "foobaz", "'custom' attribute is correct");
 
   // Clean up.
   gBrowser.removeTab(tab);
 }
 
--- a/browser/components/sessionstore/test/browser_broadcast.js
+++ b/browser/components/sessionstore/test/browser_broadcast.js
@@ -54,18 +54,18 @@ add_task(function flush_on_duplicate() {
 
   yield modifySessionStorage(browser, {test: "on-duplicate"});
   let tab2 = ss.duplicateTab(window, tab);
   let {storage} = JSON.parse(ss.getTabState(tab2));
   is(storage["http://example.com"].test, "on-duplicate",
     "sessionStorage data has been flushed when duplicating tabs");
 
   yield promiseTabRestored(tab2);
-  gBrowser.removeTab(tab2)
-  let [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window));
+  gBrowser.removeTab(tab2);
+  [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window));
   is(storage["http://example.com"].test, "on-duplicate",
     "sessionStorage data has been flushed when duplicating tabs");
 
   gBrowser.removeTab(tab);
 });
 
 /**
  * This test ensures we won't lose tab data queued in the content script when
--- a/browser/components/sessionstore/test/browser_dynamic_frames.js
+++ b/browser/components/sessionstore/test/browser_dynamic_frames.js
@@ -72,17 +72,17 @@ add_task(function () {
   is(entries.length, 1, "there is one root entry ...");
   is(entries[0].children.length, 1, "... with a single child entry");
 
   // Navigate the subframe.
   browser.messageManager.sendAsyncMessage("ss-test:click", {id: "lnk"});
   yield promiseBrowserLoaded(browser, false /* don't ignore subframes */);
 
   SyncHandlers.get(browser).flush();
-  let {entries} = JSON.parse(ss.getTabState(tab));
+  ({entries} = JSON.parse(ss.getTabState(tab)));
 
   // Check URLs.
   ok(entries[0].url.startsWith("data:text/html"), "correct 1st root url");
   ok(entries[1].url.startsWith("data:text/html"), "correct 2nd root url");
   is(entries[0].children[0].url, "about:mozilla", "correct url for 1st static frame");
   is(entries[1].children[0].url, "about:robots", "correct url for 2ns static frame");
 
   // Check the number of children.
--- a/browser/components/sessionstore/test/browser_formdata.js
+++ b/browser/components/sessionstore/test/browser_formdata.js
@@ -38,25 +38,25 @@ add_task(function test_formdata() {
   let [{state: {formdata}}] = JSON.parse(ss.getClosedTabData(window));
   is(formdata.id.txt, OUTER_VALUE, "outer value is correct");
   is(formdata.children[0].id.txt, INNER_VALUE, "inner value is correct");
 
   // Disable saving data for encrypted sites.
   Services.prefs.setIntPref("browser.sessionstore.privacy_level", 1);
 
   yield createAndRemoveTab();
-  let [{state: {formdata}}] = JSON.parse(ss.getClosedTabData(window));
+  [{state: {formdata}}] = JSON.parse(ss.getClosedTabData(window));
   is(formdata.id.txt, OUTER_VALUE, "outer value is correct");
   ok(!formdata.children, "inner value was *not* stored");
 
   // Disable saving data for any site.
   Services.prefs.setIntPref("browser.sessionstore.privacy_level", 2);
 
   yield createAndRemoveTab();
-  let [{state: {formdata}}] = JSON.parse(ss.getClosedTabData(window));
+  [{state: {formdata}}] = JSON.parse(ss.getClosedTabData(window));
   ok(!formdata, "form data has *not* been stored");
 
   // Restore the default privacy level.
   Services.prefs.clearUserPref("browser.sessionstore.privacy_level");
 });
 
 /**
  * This test ensures that we maintain backwards compatibility with the form
@@ -171,23 +171,23 @@ add_task(function test_nested() {
 
   // Remove the tab and check that we stored form data correctly.
   gBrowser.removeTab(tab);
   let [{state: {formdata}}] = JSON.parse(ss.getClosedTabData(window));
   is(JSON.stringify(formdata), JSON.stringify(FORM_DATA),
     "formdata for iframe stored correctly");
 
   // Restore the closed tab.
-  let tab = ss.undoCloseTab(window, 0);
-  let browser = tab.linkedBrowser;
+  tab = ss.undoCloseTab(window, 0);
+  browser = tab.linkedBrowser;
   yield promiseTabRestored(tab);
 
   // Check that the input field has the right value.
   SyncHandlers.get(browser).flush();
-  let {formdata} = JSON.parse(ss.getTabState(tab));
+  ({formdata} = JSON.parse(ss.getTabState(tab)));
   is(JSON.stringify(formdata), JSON.stringify(FORM_DATA),
     "formdata for iframe restored correctly");
 
   // Cleanup.
   gBrowser.removeTab(tab);
 });
 
 /**
@@ -219,18 +219,18 @@ add_task(function test_design_mode() {
 
   // Close and restore the tab.
   gBrowser.removeTab(tab);
   tab = ss.undoCloseTab(window, 0);
   browser = tab.linkedBrowser;
   yield promiseTabRestored(tab);
 
   // Check that the innerHTML value was restored.
-  let html = yield getInnerHTML(browser);
-  let expected = "<h1>Mmozilla</h1><script>document.designMode='on'</script>";
+  html = yield getInnerHTML(browser);
+  expected = "<h1>Mmozilla</h1><script>document.designMode='on'</script>";
   is(html, expected, "editable document has been restored correctly");
 
   // Cleanup.
   gBrowser.removeTab(tab);
 });
 
 /**
  * This test ensures that credit card numbers in form data will not be
--- a/browser/components/sessionstore/test/browser_label_and_icon.js
+++ b/browser/components/sessionstore/test/browser_label_and_icon.js
@@ -26,17 +26,17 @@ add_task(function test_label_and_icon() 
 
   // Retrieve the tab state.
   SyncHandlers.get(browser).flush();
   let state = ss.getTabState(tab);
   gBrowser.removeTab(tab);
   browser = null;
 
   // Open a new tab to restore into.
-  let tab = gBrowser.addTab("about:blank");
+  tab = gBrowser.addTab("about:blank");
   ss.setTabState(tab, state);
   yield promiseTabRestoring(tab);
 
   // Check that label and icon are set for the restoring tab.
   ok(gBrowser.getIcon(tab).startsWith("data:image/png;"), "icon is set");
   is(tab.label, "Gort! Klaatu barada nikto!", "label is set");
 
   // Cleanup.
--- a/browser/components/sessionstore/test/browser_privatetabs.js
+++ b/browser/components/sessionstore/test/browser_privatetabs.js
@@ -87,23 +87,23 @@ add_task(function () {
   let state = JSON.parse(ss.getTabState(tab));
   ok(state.isPrivate, "tab considered private");
 
   // Ensure we don't allow restoring closed private tabs in non-private windows.
   win.gBrowser.removeTab(tab);
   is(ss.getClosedTabCount(win), 0, "no tabs to restore");
 
   // Create a new tab in the new window that will load the frame script.
-  let tab = win.gBrowser.addTab("about:mozilla");
-  let browser = tab.linkedBrowser;
+  tab = win.gBrowser.addTab("about:mozilla");
+  browser = tab.linkedBrowser;
   yield promiseBrowserLoaded(browser);
   SyncHandlers.get(browser).flush();
 
   // Check that we consider the tab as private.
-  let state = JSON.parse(ss.getTabState(tab));
+  state = JSON.parse(ss.getTabState(tab));
   ok(state.isPrivate, "tab considered private");
 
   // Check that all private tabs are removed when the non-private
   // window is closed and we don't save windows without any tabs.
   yield promiseWindowClosed(win);
   is(ss.getClosedWindowCount(), 0, "no windows to restore");
 });
 
--- a/browser/components/sessionstore/test/browser_sessionHistory.js
+++ b/browser/components/sessionstore/test/browser_sessionHistory.js
@@ -47,17 +47,17 @@ add_task(function test_purge() {
   let {entries} = JSON.parse(ss.getTabState(tab));
   is(entries.length, 2, "there are two shistory entries");
 
   // Purge session history.
   yield sendMessage(browser, "ss-test:purgeSessionHistory");
 
   // Check that we are left with a single shistory entry.
   SyncHandlers.get(browser).flush();
-  let {entries} = JSON.parse(ss.getTabState(tab));
+  ({entries} = JSON.parse(ss.getTabState(tab)));
   is(entries.length, 1, "there is one shistory entry");
 
   // Cleanup.
   gBrowser.removeTab(tab);
 });
 
 /**
  * Ensure that anchor navigation invalidates shistory.
@@ -76,17 +76,17 @@ add_task(function test_hashchange() {
   is(entries.length, 1, "there is one shistory entry");
 
   // Click the link and wait for a hashchange event.
   browser.messageManager.sendAsyncMessage("ss-test:click", {id: "a"});
   yield promiseContentMessage(browser, "ss-test:hashchange");
 
   // Check that we now have two shistory entries.
   SyncHandlers.get(browser).flush();
-  let {entries} = JSON.parse(ss.getTabState(tab));
+  ({entries} = JSON.parse(ss.getTabState(tab)));
   is(entries.length, 2, "there are two shistory entries");
 
   // Cleanup.
   gBrowser.removeTab(tab);
 });
 
 /**
  * Ensure that loading pages from the bfcache invalidates shistory.
@@ -139,31 +139,31 @@ add_task(function test_subframes() {
   is(entries[0].children.length, 1, "the entry has one child");
 
   // Navigate the subframe.
   browser.messageManager.sendAsyncMessage("ss-test:click", {id: "a1"});
   yield promiseBrowserLoaded(browser, false /* don't ignore subframes */);
 
   // Check shistory.
   SyncHandlers.get(browser).flush();
-  let {entries} = JSON.parse(ss.getTabState(tab));
+  ({entries} = JSON.parse(ss.getTabState(tab)));
   is(entries.length, 2, "there now are two shistory entries");
   is(entries[1].children.length, 1, "the second entry has one child");
 
   // Go back in history.
   browser.goBack();
   yield promiseBrowserLoaded(browser, false /* don't ignore subframes */);
 
   // Navigate the subframe again.
   browser.messageManager.sendAsyncMessage("ss-test:click", {id: "a2"});
   yield promiseContentMessage(browser, "ss-test:hashchange");
 
   // Check shistory.
   SyncHandlers.get(browser).flush();
-  let {entries} = JSON.parse(ss.getTabState(tab));
+  ({entries} = JSON.parse(ss.getTabState(tab)));
   is(entries.length, 2, "there now are two shistory entries");
   is(entries[1].children.length, 1, "the second entry has one child");
 
   // Cleanup.
   gBrowser.removeTab(tab);
 });
 
 /**
@@ -181,17 +181,17 @@ add_task(function test_about_page_naviga
   is(entries.length, 1, "there is one shistory entry");
   is(entries[0].url, "about:blank", "url is correct");
 
   browser.loadURI("about:robots");
   yield promiseBrowserLoaded(browser);
 
   // Check that we have changed the history entry.
   SyncHandlers.get(browser).flush();
-  let {entries} = JSON.parse(ss.getTabState(tab));
+  ({entries} = JSON.parse(ss.getTabState(tab)));
   is(entries.length, 1, "there is one shistory entry");
   is(entries[0].url, "about:robots", "url is correct");
 
   // Cleanup.
   gBrowser.removeTab(tab);
 });
 
 /**
@@ -210,27 +210,27 @@ add_task(function test_pushstate_replace
   is(entries[0].url, "http://example.com/1", "url is correct");
 
   browser.messageManager.
     sendAsyncMessage("ss-test:historyPushState", {url: 'test-entry/'});
   yield promiseContentMessage(browser, "ss-test:historyPushState");
 
   // Check that we have added the history entry.
   SyncHandlers.get(browser).flush();
-  let {entries} = JSON.parse(ss.getTabState(tab));
+  ({entries} = JSON.parse(ss.getTabState(tab)));
   is(entries.length, 2, "there is another shistory entry");
   is(entries[1].url, "http://example.com/test-entry/", "url is correct");
 
   browser.messageManager.
     sendAsyncMessage("ss-test:historyReplaceState", {url: 'test-entry2/'});
   yield promiseContentMessage(browser, "ss-test:historyReplaceState");
 
   // Check that we have modified the history entry.
   SyncHandlers.get(browser).flush();
-  let {entries} = JSON.parse(ss.getTabState(tab));
+  ({entries} = JSON.parse(ss.getTabState(tab)));
   is(entries.length, 2, "there is still two shistory entries");
   is(entries[1].url, "http://example.com/test-entry/test-entry2/", "url is correct");
 
   // Cleanup.
   gBrowser.removeTab(tab);
 });
 
 /**
--- a/browser/components/sessionstore/test/browser_sessionStorage.js
+++ b/browser/components/sessionstore/test/browser_sessionStorage.js
@@ -29,53 +29,53 @@ add_task(function session_storage() {
   is(storage["http://mochi.test:8888"].test, OUTER_VALUE,
     "sessionStorage data for mochi.test has been serialized correctly");
 
   // Ensure that modifying sessionStore values works.
   yield modifySessionStorage(browser, {test: "modified"});
   yield modifySessionStorage2(browser, {test: "modified2"});
   SyncHandlers.get(browser).flush();
 
-  let {storage} = JSON.parse(ss.getTabState(tab));
+  ({storage} = JSON.parse(ss.getTabState(tab)));
   is(storage["http://example.com"].test, "modified2",
     "sessionStorage data for example.com has been serialized correctly");
   is(storage["http://mochi.test:8888"].test, "modified",
     "sessionStorage data for mochi.test has been serialized correctly");
 
   // Test that duplicating a tab works.
   let tab2 = gBrowser.duplicateTab(tab);
   let browser2 = tab2.linkedBrowser;
   yield promiseTabRestored(tab2);
 
   // Flush to make sure chrome received all data.
   SyncHandlers.get(browser2).flush();
 
-  let {storage} = JSON.parse(ss.getTabState(tab2));
+  ({storage} = JSON.parse(ss.getTabState(tab2)));
   is(storage["http://example.com"].test, "modified2",
     "sessionStorage data for example.com has been duplicated correctly");
   is(storage["http://mochi.test:8888"].test, "modified",
     "sessionStorage data for mochi.test has been duplicated correctly");
 
   // Ensure that the content script retains restored data
   // (by e.g. duplicateTab) and sends it along with new data.
   yield modifySessionStorage(browser2, {test: "modified3"});
   SyncHandlers.get(browser2).flush();
 
-  let {storage} = JSON.parse(ss.getTabState(tab2));
+  ({storage} = JSON.parse(ss.getTabState(tab2)));
   is(storage["http://example.com"].test, "modified2",
     "sessionStorage data for example.com has been duplicated correctly");
   is(storage["http://mochi.test:8888"].test, "modified3",
     "sessionStorage data for mochi.test has been duplicated correctly");
 
   // Check that loading a new URL discards data.
   browser2.loadURI("http://mochi.test:8888/");
   yield promiseBrowserLoaded(browser2);
   SyncHandlers.get(browser2).flush();
 
-  let {storage} = JSON.parse(ss.getTabState(tab2));
+  ({storage} = JSON.parse(ss.getTabState(tab2)));
   is(storage["http://mochi.test:8888"].test, "modified3",
     "navigating retains correct storage data");
   ok(!storage["http://example.com"], "storage data was discarded");
 
   // Check that loading a new URL discards data.
   browser2.loadURI("about:mozilla");
   yield promiseBrowserLoaded(browser2);
   SyncHandlers.get(browser2).flush();
@@ -125,46 +125,46 @@ add_task(function respect_privacy_level(
   is(storage["http://mochi.test:8888"].test, OUTER_VALUE,
     "http sessionStorage data has been saved");
   is(storage["https://example.com"].test, INNER_VALUE,
     "https sessionStorage data has been saved");
 
   // Disable saving data for encrypted sites.
   Services.prefs.setIntPref("browser.sessionstore.privacy_level", 1);
 
-  let tab = gBrowser.addTab(URL + "&secure");
+  tab = gBrowser.addTab(URL + "&secure");
   yield promiseBrowserLoaded(tab.linkedBrowser);
   gBrowser.removeTab(tab);
 
-  let [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window));
+  [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window));
   is(storage["http://mochi.test:8888"].test, OUTER_VALUE,
     "http sessionStorage data has been saved");
   ok(!storage["https://example.com"],
     "https sessionStorage data has *not* been saved");
 
   // Disable saving data for any site.
   Services.prefs.setIntPref("browser.sessionstore.privacy_level", 2);
 
   // Check that duplicating a tab copies all private data.
-  let tab = gBrowser.addTab(URL + "&secure");
+  tab = gBrowser.addTab(URL + "&secure");
   yield promiseBrowserLoaded(tab.linkedBrowser);
   let tab2 = gBrowser.duplicateTab(tab);
   yield promiseTabRestored(tab2);
   gBrowser.removeTab(tab);
 
   // With privacy_level=2 the |tab| shouldn't have any sessionStorage data.
-  let [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window));
+  [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window));
   ok(!storage, "sessionStorage data has *not* been saved");
 
   // Restore the default privacy level and close the duplicated tab.
   Services.prefs.clearUserPref("browser.sessionstore.privacy_level");
   gBrowser.removeTab(tab2);
 
   // With privacy_level=0 the duplicated |tab2| should persist all data.
-  let [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window));
+  [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window));
   is(storage["http://mochi.test:8888"].test, OUTER_VALUE,
     "http sessionStorage data has been saved");
   is(storage["https://example.com"].test, INNER_VALUE,
     "https sessionStorage data has been saved");
 });
 
 function waitForStorageEvent(browser) {
   return promiseContentMessage(browser, "ss-test:MozStorageChanged");
--- a/browser/components/tabview/test/browser_tabview_bug631752.js
+++ b/browser/components/tabview/test/browser_tabview_bug631752.js
@@ -14,17 +14,17 @@ function test() {
   let getAspectRange = function () {
     let aspect = cw.TabItems.tabAspect;
     let variance = aspect / 100 * 1.5;
     return new cw.Range(aspect - variance, aspect + variance);
   }
 
   let dragTabItem = function (tabItem) {
     let doc = cw.document.documentElement;
-    let tabItem = groupItem.getChild(0);
+    tabItem = groupItem.getChild(0);
     let container = tabItem.container;
     let aspectRange = getAspectRange();
 
     EventUtils.synthesizeMouseAtCenter(container, {type: "mousedown"}, cw);
     for (let x = 200; x <= 400; x += 100)
       EventUtils.synthesizeMouse(doc, x, 100, {type: "mousemove"}, cw);
     ok(aspectRange.contains(getTabItemAspect(tabItem)), "tabItem's aspect is correct");
 
--- a/browser/components/translation/test/unit/test_healthreport.js
+++ b/browser/components/translation/test/unit/test_healthreport.js
@@ -141,24 +141,24 @@ add_task(function* test_record_translati
   Assert.equal(countsByLanguage["fr"]["es"], 1);
 
   // Record more translations.
   yield provider.recordTranslation("fr", "es", 1, now);
   yield provider.recordTranslation("fr", "en", 2, now);
   yield provider.recordTranslation("es", "en", 4, now);
 
   values = yield m.getValues();
-  let day = values.days.getDay(now);
+  day = values.days.getDay(now);
   Assert.ok(day.has("pageTranslatedCount"));
   Assert.equal(day.get("pageTranslatedCount"), 4);
   Assert.ok(day.has("charactersTranslatedCount"));
   Assert.equal(day.get("charactersTranslatedCount"), 1007);
 
   Assert.ok(day.has("pageTranslatedCountsByLanguage"));
-  let countsByLanguage = JSON.parse(day.get("pageTranslatedCountsByLanguage"));
+  countsByLanguage = JSON.parse(day.get("pageTranslatedCountsByLanguage"));
   Assert.ok("fr" in countsByLanguage);
   Assert.equal(countsByLanguage["fr"]["total"], 3);
   Assert.equal(countsByLanguage["fr"]["es"], 2);
   Assert.equal(countsByLanguage["fr"]["en"], 1);
   Assert.ok("es" in countsByLanguage);
   Assert.equal(countsByLanguage["es"]["total"], 1);
   Assert.equal(countsByLanguage["es"]["en"], 1);
 
--- a/browser/devtools/canvasdebugger/test/browser_canvas-actor-test-10.js
+++ b/browser/devtools/canvasdebugger/test/browser_canvas-actor-test-10.js
@@ -68,17 +68,17 @@ function ifTestingSupported() {
     "The second screenshot has the correct red component.");
   is(new Uint8Array(secondScreenshot.pixels.buffer)[1], 0,
     "The second screenshot has the correct green component.");
   is(new Uint8Array(secondScreenshot.pixels.buffer)[2], 255,
     "The second screenshot has the correct blue component.");
   is(new Uint8Array(secondScreenshot.pixels.buffer)[3], 255,
     "The second screenshot has the correct alpha component.");
 
-  let gl = debuggee.gl;
+  gl = debuggee.gl;
   is(gl.getParameter(gl.FRAMEBUFFER_BINDING), debuggee.customFramebuffer,
     "The debuggee's gl context framebuffer still wasn't changed.");
   is(gl.getParameter(gl.RENDERBUFFER_BINDING), debuggee.customRenderbuffer,
     "The debuggee's gl context renderbuffer still wasn't changed.");
   is(gl.getParameter(gl.TEXTURE_BINDING_2D), debuggee.customTexture,
     "The debuggee's gl context texture binding still wasn't changed.");
   is(gl.getParameter(gl.VIEWPORT)[0], 128,
     "The debuggee's gl context viewport's left coord. still wasn't changed.");
--- a/browser/devtools/canvasdebugger/test/browser_canvas-frontend-call-search.js
+++ b/browser/devtools/canvasdebugger/test/browser_canvas-frontend-call-search.js
@@ -39,17 +39,17 @@ function ifTestingSupported() {
   is(CallsListView.visibleItems[0].attachment.actor.line, 25,
     "The visible item's line has the expected value.");
   is(CallsListView.visibleItems[0].attachment.actor.argsPreview, "0, 0, 128, 128",
     "The visible item's args have the expected value.");
   is(CallsListView.visibleItems[0].attachment.actor.callerPreview, "ctx",
     "The visible item's caller has the expected value.");
 
   let secondRecordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
-  let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
+  callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED);
 
   SnapshotsListView._onRecordButtonClick();
   yield secondRecordingFinished;
 
   SnapshotsListView.selectedIndex = 1;
   yield callListPopulated;
 
   is(searchbox.value, "clear",
--- a/browser/devtools/canvasdebugger/test/browser_canvas-frontend-slider-02.js
+++ b/browser/devtools/canvasdebugger/test/browser_canvas-frontend-slider-02.js
@@ -29,49 +29,49 @@ function ifTestingSupported() {
   let thumbnailPixels = yield thumbnailImageElementSet;
 
   ok(sameArray(thumbnailPixels, thumbnails[0].pixels),
     "The screenshot element should have a thumbnail as an immediate background.");
 
   yield once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED);
   ok(true, "The full-sized screenshot was displayed for the item at index 1.");
 
-  let thumbnailImageElementSet = waitForMozSetImageElement(window);
+  thumbnailImageElementSet = waitForMozSetImageElement(window);
   $("#calls-slider").value = 2;
-  let thumbnailPixels = yield thumbnailImageElementSet;
+  thumbnailPixels = yield thumbnailImageElementSet;
 
   ok(sameArray(thumbnailPixels, thumbnails[1].pixels),
     "The screenshot element should have a thumbnail as an immediate background.");
 
   yield once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED);
   ok(true, "The full-sized screenshot was displayed for the item at index 2.");
 
-  let thumbnailImageElementSet = waitForMozSetImageElement(window);
+  thumbnailImageElementSet = waitForMozSetImageElement(window);
   $("#calls-slider").value = 7;
-  let thumbnailPixels = yield thumbnailImageElementSet;
+  thumbnailPixels = yield thumbnailImageElementSet;
 
   ok(sameArray(thumbnailPixels, thumbnails[3].pixels),
     "The screenshot element should have a thumbnail as an immediate background.");
 
   yield once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED);
   ok(true, "The full-sized screenshot was displayed for the item at index 7.");
 
-  let thumbnailImageElementSet = waitForMozSetImageElement(window);
+  thumbnailImageElementSet = waitForMozSetImageElement(window);
   $("#calls-slider").value = 4;
-  let thumbnailPixels = yield thumbnailImageElementSet;
+  thumbnailPixels = yield thumbnailImageElementSet;
 
   ok(sameArray(thumbnailPixels, thumbnails[2].pixels),
     "The screenshot element should have a thumbnail as an immediate background.");
 
   yield once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED);
   ok(true, "The full-sized screenshot was displayed for the item at index 4.");
 
-  let thumbnailImageElementSet = waitForMozSetImageElement(window);
+  thumbnailImageElementSet = waitForMozSetImageElement(window);
   $("#calls-slider").value = 0;
-  let thumbnailPixels = yield thumbnailImageElementSet;
+  thumbnailPixels = yield thumbnailImageElementSet;
 
   ok(sameArray(thumbnailPixels, thumbnails[0].pixels),
     "The screenshot element should have a thumbnail as an immediate background.");
 
   yield once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED);
   ok(true, "The full-sized screenshot was displayed for the item at index 0.");
 
   yield teardown(panel);
--- a/browser/devtools/canvasdebugger/test/browser_canvas-frontend-snapshot-select.js
+++ b/browser/devtools/canvasdebugger/test/browser_canvas-frontend-snapshot-select.js
@@ -48,17 +48,17 @@ function ifTestingSupported() {
   info("First draw call in the second snapshot selected.");
 
   is(SnapshotsListView.selectedIndex, 1,
     "The second snapshot should still be selected.");
   is(CallsListView.selectedIndex, 2,
     "The first draw call should now be selected in the snapshot.");
 
   let firstSnapshotTarget = SnapshotsListView.getItemAtIndex(0).target;
-  let snapshotSelected = waitForSnapshotSelection();
+  snapshotSelected = waitForSnapshotSelection();
   EventUtils.sendMouseEvent({ type: "mousedown" }, firstSnapshotTarget, window);
 
   yield snapshotSelected;
   info("First snapshot re-selected.");
 
   is(SnapshotsListView.selectedIndex, 0,
     "The first snapshot should now be re-selected.");
   is(CallsListView.selectedIndex, -1,
--- a/browser/devtools/commandline/test/browser_cmd_csscoverage_util.js
+++ b/browser/devtools/commandline/test/browser_cmd_csscoverage_util.js
@@ -12,13 +12,13 @@ let test = asyncTest(function*() {
 function testDeconstructRuleId() {
   // This is the easy case
   let rule = csscoverage.deconstructRuleId("http://thing/blah|10|20");
   is(rule.url, "http://thing/blah", "1 url");
   is(rule.line, 10, "1 line");
   is(rule.column, 20, "1 column");
 
   // This is the harder case with a URL containing a '|'
-  let rule = csscoverage.deconstructRuleId("http://thing/blah?q=a|b|11|22");
+  rule = csscoverage.deconstructRuleId("http://thing/blah?q=a|b|11|22");
   is(rule.url, "http://thing/blah?q=a|b", "2 url");
   is(rule.line, 11, "2 line");
   is(rule.column, 22, "2 column");
 }
--- a/browser/devtools/debugger/test/browser_dbg_break-on-dom-04.js
+++ b/browser/devtools/debugger/test/browser_dbg_break-on-dom-04.js
@@ -40,17 +40,17 @@ function test() {
       testEventItem(1, false);
       testEventItem(2, false);
       testEventItem(3, false);
       testEventGroup("interactionEvents", false);
       testEventGroup("keyboardEvents", false);
       testEventGroup("mouseEvents", false);
       testEventArrays("change,click,keydown,keyup", "change");
 
-      let updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED);
+      updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED);
       EventUtils.sendMouseEvent({ type: "click" }, getItemCheckboxNode(0), gDebugger);
       yield updated;
 
       testEventItem(0, false);
       testEventItem(1, false);
       testEventItem(2, false);
       testEventItem(3, false);
       testEventGroup("interactionEvents", false);
--- a/browser/devtools/debugger/test/browser_dbg_break-on-dom-05.js
+++ b/browser/devtools/debugger/test/browser_dbg_break-on-dom-05.js
@@ -41,43 +41,43 @@ function test() {
       testEventItem(1, false);
       testEventItem(2, false);
       testEventItem(3, false);
       testEventGroup("interactionEvents", true);
       testEventGroup("keyboardEvents", false);
       testEventGroup("mouseEvents", false);
       testEventArrays("change,click,keydown,keyup", "change");
 
-      let updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED);
+      updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED);
       EventUtils.sendMouseEvent({ type: "click" }, getGroupCheckboxNode("interactionEvents"), gDebugger);
       yield updated;
 
       testEventItem(0, false);
       testEventItem(1, false);
       testEventItem(2, false);
       testEventItem(3, false);
       testEventGroup("interactionEvents", false);
       testEventGroup("keyboardEvents", false);
       testEventGroup("mouseEvents", false);
       testEventArrays("change,click,keydown,keyup", "");
 
-      let updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED);
+      updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED);
       EventUtils.sendMouseEvent({ type: "click" }, getGroupCheckboxNode("keyboardEvents"), gDebugger);
       yield updated;
 
       testEventItem(0, false);
       testEventItem(1, false);
       testEventItem(2, true);
       testEventItem(3, true);
       testEventGroup("interactionEvents", false);
       testEventGroup("keyboardEvents", true);
       testEventGroup("mouseEvents", false);
       testEventArrays("change,click,keydown,keyup", "keydown,keyup");
 
-      let updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED);
+      updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED);
       EventUtils.sendMouseEvent({ type: "click" }, getGroupCheckboxNode("keyboardEvents"), gDebugger);
       yield updated;
 
       testEventItem(0, false);
       testEventItem(1, false);
       testEventItem(2, false);
       testEventItem(3, false);
       testEventGroup("interactionEvents", false);
--- a/browser/devtools/debugger/test/browser_dbg_break-on-dom-06.js
+++ b/browser/devtools/debugger/test/browser_dbg_break-on-dom-06.js
@@ -53,17 +53,17 @@ function test() {
       testEventItem(1, true);
       testEventItem(2, true);
       testEventItem(3, false);
       testEventGroup("interactionEvents", false);
       testEventGroup("keyboardEvents", false);
       testEventGroup("mouseEvents", false);
       testEventArrays("change,click,keydown,keyup", "change,click,keydown");
 
-      let updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED);
+      updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED);
       EventUtils.sendMouseEvent({ type: "click" }, getItemCheckboxNode(0), gDebugger);
       EventUtils.sendMouseEvent({ type: "click" }, getItemCheckboxNode(1), gDebugger);
       EventUtils.sendMouseEvent({ type: "click" }, getItemCheckboxNode(2), gDebugger);
       yield updated;
 
       testEventItem(0, false);
       testEventItem(1, false);
       testEventItem(2, false);
--- a/browser/devtools/debugger/test/browser_dbg_cmd-blackbox.js
+++ b/browser/devtools/debugger/test/browser_dbg_cmd-blackbox.js
@@ -37,53 +37,53 @@ function spawnTest() {
 
   let bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL);
   ok(bbButton.checked,
      "Should be able to black box a specific source.");
 
   // test Un-Black-Box Source
   yield cmd("dbg unblackbox " + BLACKBOXME_URL);
 
-  let bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL);
+  bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL);
   ok(!bbButton.checked,
      "Should be able to stop black boxing a specific source.");
 
   // test Black-Box Glob
   yield cmd("dbg blackbox --glob *blackboxing_t*.js", 2,
             [/blackboxing_three\.js/g, /blackboxing_two\.js/g]);
 
-  let bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL);
+  bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL);
   ok(!bbButton.checked,
      "blackboxme should not be black boxed because it doesn't match the glob.");
   bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXONE_URL);
   ok(!bbButton.checked,
      "blackbox_one should not be black boxed because it doesn't match the glob.");
 
   bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXTWO_URL);
   ok(bbButton.checked,
      "blackbox_two should be black boxed because it matches the glob.");
   bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXTHREE_URL);
   ok(bbButton.checked,
     "blackbox_three should be black boxed because it matches the glob.");
 
   // test Un-Black-Box Glob
   yield cmd("dbg unblackbox --glob *blackboxing_t*.js", 2);
 
-  let bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXTWO_URL);
+  bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXTWO_URL);
   ok(!bbButton.checked,
      "blackbox_two should be un-black boxed because it matches the glob.");
   bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXTHREE_URL);
   ok(!bbButton.checked,
     "blackbox_three should be un-black boxed because it matches the glob.");
 
   // test Black-Box Invert
   yield cmd("dbg blackbox --invert --glob *blackboxing_t*.js", 3,
             [/blackboxing_three\.js/g, /blackboxing_two\.js/g]);
 
-  let bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL);
+  bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL);
   ok(bbButton.checked,
     "blackboxme should be black boxed because it doesn't match the glob.");
   bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXONE_URL);
   ok(bbButton.checked,
     "blackbox_one should be black boxed because it doesn't match the glob.");
   bbButton = yield selectSourceAndGetBlackBoxButton(panel, TEST_URL);
   ok(bbButton.checked,
     "TEST_URL should be black boxed because it doesn't match the glob.");
@@ -93,17 +93,17 @@ function spawnTest() {
     "blackbox_two should not be black boxed because it matches the glob.");
   bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXTHREE_URL);
   ok(!bbButton.checked,
     "blackbox_three should not be black boxed because it matches the glob.");
 
   // test Un-Black-Box Invert
   yield cmd("dbg unblackbox --invert --glob *blackboxing_t*.js", 3);
 
-  let bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL);
+  bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL);
   ok(!bbButton.checked,
     "blackboxme should be un-black boxed because it does not match the glob.");
   bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXONE_URL);
   ok(!bbButton.checked,
     "blackbox_one should be un-black boxed because it does not match the glob.");
   bbButton = yield selectSourceAndGetBlackBoxButton(panel, TEST_URL);
   ok(!bbButton.checked,
     "TEST_URL should be un-black boxed because it doesn't match the glob.");
--- a/browser/devtools/debugger/test/browser_dbg_controller-evaluate-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_controller-evaluate-01.js
@@ -57,17 +57,17 @@ function test() {
     is(result.return.type, "object", "The evaluation return type is correct.");
     is(result.return.class, "Function", "The evaluation return class is correct.");
 
     yield updatedView;
     checkView(0, 1, 1, [/secondCall/, 118]);
     ok(true, "Evaluating in the topmost frame works properly.");
 
     // Eval in a different frame, while paused.
-    let updatedView = waitForDebuggerEvents(panel, events.FETCHED_SCOPES);
+    updatedView = waitForDebuggerEvents(panel, events.FETCHED_SCOPES);
     try {
       yield frames.evaluate("foo", { depth: 3 }); // oldest frame
     } catch (result) {
       is(result.return.type, "object", "The evaluation thrown type is correct.");
       is(result.return.class, "Error", "The evaluation thrown class is correct.");
       ok(!result.return, "The evaluation hasn't returned.");
     }
 
--- a/browser/devtools/debugger/test/browser_dbg_file-reload.js
+++ b/browser/devtools/debugger/test/browser_dbg_file-reload.js
@@ -38,17 +38,17 @@ function test() {
 
       is(gSources.itemCount, 1,
         "There should be one source displayed in the view after reloading.")
       is(gSources.selectedValue, JS_URL,
         "The correct source is currently selected in the view after reloading.");
       ok(gEditor.getText().contains("bacon"),
         "The newly shown source contains bacon. Mmm, delicious!");
 
-      let { source } = gSources.selectedItem.attachment;
+      ({ source } = gSources.selectedItem.attachment);
       let [, secondText] = yield gControllerSources.getText(source);
       let secondNumber = parseFloat(secondText.match(/\d\.\d+/)[0]);
 
       is(secondText, gEditor.getText(),
         "gControllerSources.getText() returned the expected contents.");
       ok(secondNumber <= 1 && secondNumber >= 0,
         "The generated number seems to be created correctly.");
 
--- a/browser/devtools/debugger/test/browser_dbg_optimized-out-vars.js
+++ b/browser/devtools/debugger/test/browser_dbg_optimized-out-vars.js
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Test that optimized out variables aren't present in the variables view.
 
 function test() {
   Task.spawn(function* () {
     const TAB_URL = EXAMPLE_URL + "doc_closure-optimized-out.html";
-    let panel, debuggee, gDebugger, sources;
+    let gDebugger, sources;
 
     let [, debuggee, panel] = yield initDebugger(TAB_URL);
     gDebugger = panel.panelWin;
     sources = gDebugger.DebuggerView.Sources;
 
     yield waitForSourceShown(panel, ".html");
     yield panel.addBreakpoint({ url: sources.values[0], line: 18 });
     yield ensureThreadClientState(panel, "resumed");
--- a/browser/devtools/debugger/test/browser_dbg_paused-keybindings.js
+++ b/browser/devtools/debugger/test/browser_dbg_paused-keybindings.js
@@ -2,17 +2,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Test that keybindings still work when the content window is paused and
 // the tab is selected again.
 
 function test() {
   Task.spawn(function* () {
     const TAB_URL = EXAMPLE_URL + "doc_inline-script.html";
-    let panel, debuggee, gDebugger, searchBox;
+    let gDebugger, searchBox;
 
     let [, debuggee, panel] = yield initDebugger(TAB_URL);
     gDebugger = panel.panelWin;
     searchBox = gDebugger.DebuggerView.Filtering._searchbox;
 
     // Spin the event loop before causing the debuggee to pause, to allow
     // this function to return first.
     executeSoon(() => {
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-05.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-05.js
@@ -39,17 +39,18 @@ function test() {
       try {
         yield gControllerSources.togglePrettyPrint(source);
         ok(false, "The promise for a prettified source should be rejected!");
       } catch ([source, error]) {
         is(error, "Can't prettify non-javascript files.",
           "The promise was correctly rejected with a meaningful message.");
       }
 
-      let [source, text] = yield gControllerSources.getText(source);
+      let text;
+      [source, text] = yield gControllerSources.getText(source);
       is(gSources.selectedValue, TAB_URL,
         "The correct source is still selected.");
       ok(gEditor.getText().contains("myFunction"),
         "The displayed source hasn't changed.");
       ok(text.contains("myFunction"),
         "The cached source text wasn't altered in any way.");
 
       yield closeDebuggerAndFinish(gPanel);
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-06.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-06.js
@@ -55,17 +55,18 @@ function test() {
       try {
         yield gControllerSources.togglePrettyPrint(source);
         ok(false, "The promise for a prettified source should be rejected!");
       } catch ([source, error]) {
         ok(error.contains("prettyPrintError"),
           "The promise was correctly rejected with a meaningful message.");
       }
 
-      let [source, text] = yield gControllerSources.getText(source);
+      let text;
+      [source, text] = yield gControllerSources.getText(source);
       is(gSources.selectedValue, JS_URL,
         "The correct source is still selected.");
       ok(gEditor.getText().contains("myFunction"),
         "The displayed source hasn't changed.");
       ok(text.contains("myFunction"),
         "The cached source text wasn't altered in any way.");
 
       is(gPrettyPrinted, true,
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-data.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-data.js
@@ -298,17 +298,17 @@ function testSecondLevelContents() {
   let objectItem1 = someProp6.get("p1");
   let objectItem2 = someProp6.get("p2");
   let objectItem3 = someProp6.get("p3");
   let objectItem4 = someProp6.get("p4");
   let objectItem5 = someProp6.get("p5");
   let objectItem6 = someProp6.get("p6");
   let objectItem7 = someProp6.get("p7");
   let objectItem8 = someProp6.get("p8");
-  let __proto__ = someProp6.get("__proto__");
+  __proto__ = someProp6.get("__proto__");
 
   is(objectItem0.visible, true, "The first object item visible state is correct.");
   is(objectItem1.visible, true, "The second object item visible state is correct.");
   is(objectItem2.visible, true, "The third object item visible state is correct.");
   is(objectItem3.visible, true, "The fourth object item visible state is correct.");
   is(objectItem4.visible, true, "The fifth object item visible state is correct.");
   is(objectItem5.visible, true, "The sixth object item visible state is correct.");
   is(objectItem6.visible, true, "The seventh object item visible state is correct.");
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-override-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-override-01.js
@@ -78,32 +78,32 @@ function test() {
     let calleeProp1 = argsVar1.get("callee");
     let calleeOwner1 = variables.getOwnerScopeForVariableOrProperty(calleeProp1);
     is(calleeOwner1, firstScope,
       "The getOwnerScopeForVariableOrProperty method works properly (3).");
 
     // Test getOwnerScopeForVariableOrProperty with second-degree properties.
 
     let protoVar1 = argsVar1.get("__proto__");
-    let fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES);
+    fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES);
     protoVar1.expand();
     yield fetched;
 
     let constrProp1 = protoVar1.get("constructor");
     let constrOwner1 = variables.getOwnerScopeForVariableOrProperty(constrProp1);
     is(constrOwner1, firstScope,
       "The getOwnerScopeForVariableOrProperty method works properly (4).");
 
     // Test getOwnerScopeForVariableOrProperty with a simple variable
     // from non-topmost scopes.
 
     // Only need to wait for a single FETCHED_VARIABLES event, just for the
     // global scope, because the other local scopes already have the
     // arguments and variables available as evironment bindings.
-    let fetched = waitForDebuggerEvents(panel, events.FETCHED_VARIABLES);
+    fetched = waitForDebuggerEvents(panel, events.FETCHED_VARIABLES);
     secondScope.expand();
     thirdScope.expand();
     globalScope.expand();
     yield fetched;
 
     let someVar2 = secondScope.get("a");
     let someOwner2 = variables.getOwnerScopeForVariableOrProperty(someVar2);
     is(someOwner2, secondScope,
@@ -113,50 +113,50 @@ function test() {
     let someOwner3 = variables.getOwnerScopeForVariableOrProperty(someVar3);
     is(someOwner3, thirdScope,
       "The getOwnerScopeForVariableOrProperty method works properly (6).");
 
     // Test getOwnerScopeForVariableOrProperty with first-degree properies
     // from non-topmost scopes.
 
     let argsVar2 = secondScope.get("arguments");
-    let fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES);
+    fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES);
     argsVar2.expand();
     yield fetched;
 
     let calleeProp2 = argsVar2.get("callee");
     let calleeOwner2 = variables.getOwnerScopeForVariableOrProperty(calleeProp2);
     is(calleeOwner2, secondScope,
       "The getOwnerScopeForVariableOrProperty method works properly (7).");
 
     let argsVar3 = thirdScope.get("arguments");
-    let fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES);
+    fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES);
     argsVar3.expand();
     yield fetched;
 
     let calleeProp3 = argsVar3.get("callee");
     let calleeOwner3 = variables.getOwnerScopeForVariableOrProperty(calleeProp3);
     is(calleeOwner3, thirdScope,
       "The getOwnerScopeForVariableOrProperty method works properly (8).");
 
     // Test getOwnerScopeForVariableOrProperty with second-degree properties
     // from non-topmost scopes.
 
     let protoVar2 = argsVar2.get("__proto__");
-    let fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES);
+    fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES);
     protoVar2.expand();
     yield fetched;
 
     let constrProp2 = protoVar2.get("constructor");
     let constrOwner2 = variables.getOwnerScopeForVariableOrProperty(constrProp2);
     is(constrOwner2, secondScope,
       "The getOwnerScopeForVariableOrProperty method works properly (9).");
 
     let protoVar3 = argsVar3.get("__proto__");
-    let fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES);
+    fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES);
     protoVar3.expand();
     yield fetched;
 
     let constrProp3 = protoVar3.get("constructor");
     let constrOwner3 = variables.getOwnerScopeForVariableOrProperty(constrProp3);
     is(constrOwner3, thirdScope,
       "The getOwnerScopeForVariableOrProperty method works properly (10).");
 
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-10.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-10.js
@@ -44,17 +44,17 @@ function test() {
     tooltip.addEventListener("popuphiding", failPopup);
     editorContainer.addEventListener("scroll", failScroll);
     editor.on("scroll", () => {
       if (editor.getScrollInfo().top > topmostScrollPosition) {
         ok(false, "The editor scrolled back to the breakpoint location.");
       }
     });
 
-    let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
+    expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
     yield openVarPopup(panel, { line: 14, ch: 15 });
     yield expressionsEvaluated;
 
     tooltip.removeEventListener("popuphiding", failPopup);
     editorContainer.removeEventListener("scroll", failScroll);
 
     yield resumeDebuggerThenCloseAndFinish(panel);
   });
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-11.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-11.js
@@ -45,34 +45,34 @@ function test() {
     yield openVarPopup(panel, { line: 15, ch: 12 });
     let popupHiding = once(tooltip, "popuphiding");
     let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
     testExpressionButton(label, className, "a");
     yield promise.all([popupHiding, expressionsEvaluated]);
     ok(true, "The new watch expressions were re-evaluated and the panel got hidden (1).");
 
     // Inspect non primitive value variable.
-    let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
+    expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
     yield openVarPopup(panel, { line: 16, ch: 12 }, true);
     yield expressionsEvaluated;
     ok(true, "The watch expressions were re-evaluated when a new panel opened (1).");
 
-    let popupHiding = once(tooltip, "popuphiding");
-    let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
+    popupHiding = once(tooltip, "popuphiding");
+    expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
     testExpressionButton(label, className, "b");
     yield promise.all([popupHiding, expressionsEvaluated]);
     ok(true, "The new watch expressions were re-evaluated and the panel got hidden (2).");
 
     // Inspect property of an object.
-    let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
+    expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
     yield openVarPopup(panel, { line: 17, ch: 10 });
     yield expressionsEvaluated;
     ok(true, "The watch expressions were re-evaluated when a new panel opened (2).");
 
-    let popupHiding = once(tooltip, "popuphiding");
-    let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
+    popupHiding = once(tooltip, "popuphiding");
+    expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
     testExpressionButton(label, className, "b.a");
     yield promise.all([popupHiding, expressionsEvaluated]);
     ok(true, "The new watch expressions were re-evaluated and the panel got hidden (3).");
 
     yield resumeDebuggerThenCloseAndFinish(panel);
   });
 }
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-12.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-12.js
@@ -36,36 +36,36 @@ function test() {
     let popupHiding = once(tooltip, "popuphiding");
     let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
     tooltip.querySelector("button").click();
     verifyContent("a", 1);
     yield promise.all([popupHiding, expressionsEvaluated]);
     ok(true, "The new watch expressions were re-evaluated and the panel got hidden (1).");
 
     // Inspect property of an object.
-    let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
+    expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
     yield openVarPopup(panel, { line: 17, ch: 10 });
     yield expressionsEvaluated;
     ok(true, "The watch expressions were re-evaluated when a new panel opened (1).");
 
-    let popupHiding = once(tooltip, "popuphiding");
-    let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
+    popupHiding = once(tooltip, "popuphiding");
+    expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
     tooltip.querySelector("button").click();
     verifyContent("b.a", 2);
     yield promise.all([popupHiding, expressionsEvaluated]);
     ok(true, "The new watch expressions were re-evaluated and the panel got hidden (2).");
 
     // Re-inspect primitive value variable.
-    let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
+    expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
     yield openVarPopup(panel, { line: 15, ch: 12 });
     yield expressionsEvaluated;
     ok(true, "The watch expressions were re-evaluated when a new panel opened (2).");
 
-    let popupHiding = once(tooltip, "popuphiding");
-    let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
+    popupHiding = once(tooltip, "popuphiding");
+    expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS);
     tooltip.querySelector("button").click();
     verifyContent("b.a", 2);
     yield promise.all([popupHiding, expressionsEvaluated]);
     ok(true, "The new watch expressions were re-evaluated and the panel got hidden (3).");
 
     yield resumeDebuggerThenCloseAndFinish(panel);
   });
 }
--- a/browser/devtools/framework/test/browser_toolbox_theme_registration.js
+++ b/browser/devtools/framework/test/browser_toolbox_theme_registration.js
@@ -60,23 +60,23 @@ function applyTheme()
   let lightThemeOption = doc.querySelector("#devtools-theme-box > radio[value=light]");
 
   let color = panelWin.getComputedStyle(testThemeOption).color;
   isnot(color, "rgb(255, 0, 0)", "style unapplied");
 
   // Select test theme.
   testThemeOption.click();
 
-  let color = panelWin.getComputedStyle(testThemeOption).color;
+  color = panelWin.getComputedStyle(testThemeOption).color;
   is(color, "rgb(255, 0, 0)", "style applied");
 
   // Select light theme
   lightThemeOption.click();
 
-  let color = panelWin.getComputedStyle(testThemeOption).color;
+  color = panelWin.getComputedStyle(testThemeOption).color;
   isnot(color, "rgb(255, 0, 0)", "style unapplied");
 
   // Select test theme again.
   testThemeOption.click();
 
   // Then unregister the test theme.
   testUnregister();
 }
--- a/browser/devtools/inspector/test/browser_inspector_breadcrumbs_highlight_hover.js
+++ b/browser/devtools/inspector/test/browser_inspector_breadcrumbs_highlight_hover.js
@@ -16,17 +16,17 @@ let test = asyncTest(function*() {
 
   let onNodeHighlighted = toolbox.once("node-highlight");
   let button = bcButtons.childNodes[1];
   EventUtils.synthesizeMouseAtCenter(button, {type: "mousemove"}, button.ownerDocument.defaultView);
   yield onNodeHighlighted;
   ok(isHighlighting(), "The highlighter is shown on a markup container hover");
   is(getHighlitNode(), getNode("body"), "The highlighter highlights the right node");
 
-  let onNodeHighlighted = toolbox.once("node-highlight");
-  let button = bcButtons.childNodes[2];
+  onNodeHighlighted = toolbox.once("node-highlight");
+  button = bcButtons.childNodes[2];
   EventUtils.synthesizeMouseAtCenter(button, {type: "mousemove"}, button.ownerDocument.defaultView);
   yield onNodeHighlighted;
   ok(isHighlighting(), "The highlighter is shown on a markup container hover");
   is(getHighlitNode(), getNode("span"), "The highlighter highlights the right node");
 
   gBrowser.removeCurrentTab();
-});
\ No newline at end of file
+});
--- a/browser/devtools/inspector/test/browser_inspector_highlighter-02.js
+++ b/browser/devtools/inspector/test/browser_inspector_highlighter-02.js
@@ -27,17 +27,17 @@ let test = asyncTest(function*() {
   let onBoxModelUpdate = waitForBoxModelUpdate();
   yield selectAndHighlightNode(rotated, inspector);
   yield onBoxModelUpdate;
 
   testMouseOverRotatedHighlights(rotated);
 
   info("Selecting the zero width height DIV");
   let zeroWidthHeight = getNode("#widthHeightZero-div");
-  let onBoxModelUpdate = waitForBoxModelUpdate();
+  onBoxModelUpdate = waitForBoxModelUpdate();
   yield selectAndHighlightNode(zeroWidthHeight, inspector);
   yield onBoxModelUpdate;
 
   testMouseOverWidthHeightZeroDiv(zeroWidthHeight);
 
 });
 
 function testSimpleDivHighlighted(div) {
--- a/browser/devtools/markupview/test/browser_markupview_highlight_hover_03.js
+++ b/browser/devtools/markupview/test/browser_markupview_highlight_hover_03.js
@@ -37,19 +37,19 @@ let test = asyncTest(function*() {
   info("Hover over <p#one> line in the markup-view");
   yield hoverContainer("#one", inspector);
   yield isHighlighting("#one", "<p#one> is highlighted");
 
   info("Navigate to <p#two> with the keyboard");
   let onUpdated = inspector.once("inspector-updated");
   EventUtils.synthesizeKey("VK_DOWN", {});
   yield onUpdated;
-  let onUpdated = inspector.once("inspector-updated");
+  onUpdated = inspector.once("inspector-updated");
   EventUtils.synthesizeKey("VK_DOWN", {});
   yield onUpdated;
   yield isHighlighting("#two", "<p#two> is highlighted");
 
   info("Navigate back to <p#one> with the keyboard");
-  let onUpdated = inspector.once("inspector-updated");
+  onUpdated = inspector.once("inspector-updated");
   EventUtils.synthesizeKey("VK_UP", {});
   yield onUpdated;
   yield isHighlighting("#one", "<p#one> is highlighted again");
 });
--- a/browser/devtools/markupview/test/browser_markupview_tag_edit_03.js
+++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_03.js
@@ -25,15 +25,15 @@ let test = asyncTest(function*() {
 
   info("Changing the tagname");
   let mutated = inspector.once("markupmutation");
   let tagEditor = container.editor.tag;
   setEditableFieldValue(tagEditor, "p", inspector);
   yield mutated;
 
   info("Checking that the tagname change was done");
-  let node = content.document.querySelector("#retag-me");
-  let container = yield getContainerForSelector("#retag-me", inspector);
+  node = content.document.querySelector("#retag-me");
+  container = yield getContainerForSelector("#retag-me", inspector);
   is(node.tagName, "P", "We've got #retag-me, it should now be a P");
   ok(container.expanded, "It is still expanded");
   ok(container.selected, "It is still selected");
   is(child.parentNode, node, "Child #retag-me-2 is still inside #retag-me");
 });
--- a/browser/devtools/netmonitor/test/browser_net_post-data-03.js
+++ b/browser/devtools/netmonitor/test/browser_net_post-data-03.js
@@ -49,18 +49,18 @@ function test() {
       is(requestFromUploadScope.querySelectorAll(".variables-view-variable .value")[1].getAttribute("value"),
         "\"hello world!\"", "The second request header value was incorrect.");
 
       EventUtils.sendMouseEvent({ type: "mousedown" },
         document.querySelectorAll("#details-pane tab")[2]);
 
       yield waitFor(aMonitor.panelWin, TAB_UPDATED);
 
-      let tab = document.querySelectorAll("#details-pane tab")[2];
-      let tabpanel = document.querySelectorAll("#details-pane tabpanel")[2];
+      tab = document.querySelectorAll("#details-pane tab")[2];
+      tabpanel = document.querySelectorAll("#details-pane tabpanel")[2];
       let formDataScope = tabpanel.querySelectorAll(".variables-view-scope")[0];
 
       is(tab.getAttribute("selected"), "true",
         "The response tab in the network details pane should be selected.");
       is(tabpanel.querySelectorAll(".variables-view-scope").length, 1,
         "There should be 1 header scope displayed in this tabpanel.");
 
       is(formDataScope.querySelector(".name").getAttribute("value"),
--- a/browser/devtools/profiler/test/browser_profiler_data-massaging-01.js
+++ b/browser/devtools/profiler/test/browser_profiler_data-massaging-01.js
@@ -28,17 +28,17 @@ let test = Task.async(function*() {
   ok(firstRecordingData.recordingDuration >= WAIT_TIME,
     "The first recording duration is correct.");
   ok(firstRecordingFinishTime >= WAIT_TIME,
     "The first recording finish time is correct.");
 
   // Perform the second recording...
 
   yield front.startRecording();
-  let profilingStartTime = front._profilingStartTime;
+  profilingStartTime = front._profilingStartTime;
   info("Started profiling at: " + profilingStartTime);
 
   busyWait(WAIT_TIME); // allow the profiler module to sample more cpu activity
 
   let secondRecordingData = yield front.stopRecording();
   let secondRecordingFinishTime = secondRecordingData.profilerData.currentTime;
   let secondRecordingProfile = secondRecordingData.profilerData.profile;
   let secondRecordingSamples = secondRecordingProfile.threads[0].samples;
--- a/browser/devtools/profiler/test/browser_profiler_jump-to-debugger-02.js
+++ b/browser/devtools/profiler/test/browser_profiler_jump-to-debugger-02.js
@@ -25,17 +25,17 @@ let test = Task.async(function*() {
   let profilerPanel = toolbox.getCurrentPanel();
   let profilerWin = profilerPanel.panelWin;
   let profilerEvents = profilerWin.EVENTS;
 
   let whenSourceShown = profilerWin.once(profilerEvents.SOURCE_SHOWN_IN_JS_DEBUGGER);
   profilerWin.viewSourceInDebugger(SIMPLE_URL, 14);
   yield whenSourceShown;
 
-  let debuggerPanel = toolbox.getPanel("jsdebugger");
+  debuggerPanel = toolbox.getPanel("jsdebugger");
   ok(debuggerPanel, "The debugger panel was reselected.");
 
   is(DebuggerView.Sources.selectedValue, SIMPLE_URL,
     "The correct source is still shown in the debugger.");
   is(DebuggerView.editor.getCursor().line + 1, 14,
     "The correct line is now highlighted in the debugger's source editor.");
 
   yield teardown(profilerPanel);
--- a/browser/devtools/profiler/test/browser_profiler_shared-connection-03.js
+++ b/browser/devtools/profiler/test/browser_profiler_shared-connection-03.js
@@ -13,17 +13,17 @@ let test = Task.async(function*() {
     "The built-in profiler module should not have been automatically started.");
 
   let result = yield front._request("profiler", "startProfiler");
   is(result.started, true,
     "The request finished successfully and the profiler should've been started.");
   ok(nsIProfilerModule.IsActive(),
     "The built-in profiler module should now be active.");
 
-  let result = yield front._request("profiler", "stopProfiler");
+  result = yield front._request("profiler", "stopProfiler");
   is(result.started, false,
     "The request finished successfully and the profiler should've been stopped.");
   ok(!nsIProfilerModule.IsActive(),
     "The built-in profiler module should now be inactive.");
 
   yield teardown(panel);
   finish();
 });
--- a/browser/devtools/profiler/test/browser_profiler_tree-abstract-01.js
+++ b/browser/devtools/profiler/test/browser_profiler_tree-abstract-01.js
@@ -85,26 +85,26 @@ let test = Task.async(function*() {
   is(barItem.container, container,
     "The 'bar' node's container is correct.");
 
   // Test other events on the child nodes...
 
   let receivedFocusEvent = treeRoot.once("focus");
   EventUtils.sendMouseEvent({ type: "mousedown" }, fooItem.target);
 
-  let eventItem = yield receivedFocusEvent;
+  eventItem = yield receivedFocusEvent;
   is(eventItem, fooItem,
     "The 'focus' event target is correct.");
   is(document.commandDispatcher.focusedElement, fooItem.target,
     "The 'foo' node is now focused.");
 
   let receivedDblClickEvent = treeRoot.once("focus");
   EventUtils.sendMouseEvent({ type: "dblclick" }, barItem.target);
 
-  let eventItem = yield receivedDblClickEvent;
+  eventItem = yield receivedDblClickEvent;
   is(eventItem, barItem,
     "The 'dblclick' event target is correct.");
   is(document.commandDispatcher.focusedElement, barItem.target,
     "The 'bar' node is now focused.");
 
   // A child item got expanded, test the descendants...
 
   let bazItem = barItem.getChild(0);
--- a/browser/devtools/profiler/test/browser_profiler_tree-view-06.js
+++ b/browser/devtools/profiler/test/browser_profiler_tree-view-06.js
@@ -24,17 +24,17 @@ let test = Task.async(function*() {
   EventUtils.sendMouseEvent({ type: "mousedown" }, C.target.querySelector(".call-tree-url"));
 
   let eventItem = yield receivedLinkEvent;
   is(eventItem, C, "The 'link' event target is correct.");
 
   let receivedZoomEvent = treeRoot.once("zoom");
   EventUtils.sendMouseEvent({ type: "mousedown" }, C.target.querySelector(".call-tree-zoom"));
 
-  let eventItem = yield receivedZoomEvent;
+  eventItem = yield receivedZoomEvent;
   is(eventItem, C, "The 'zoom' event target is correct.");
 
   finish();
 });
 
 let gSamples = [{
   time: 5,
   frames: [
--- a/browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_01.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_01.js
@@ -13,15 +13,15 @@ let test = asyncTest(function*() {
   ok(projecteditor, "ProjectEditor has loaded");
 
   let contextMenuPopup = projecteditor.document.querySelector("#context-menu-popup");
   let textEditorContextMenuPopup = projecteditor.document.querySelector("#texteditor-context-popup");
   ok (contextMenuPopup, "The menu has loaded in the projecteditor document");
   ok (textEditorContextMenuPopup, "The menu has loaded in the projecteditor document");
 
   let projecteditor2 = yield addProjectEditorTabForTempDirectory();
-  let contextMenuPopup = projecteditor2.document.getElementById("context-menu-popup");
-  let textEditorContextMenuPopup = projecteditor2.document.getElementById("texteditor-context-popup");
+  contextMenuPopup = projecteditor2.document.getElementById("context-menu-popup");
+  textEditorContextMenuPopup = projecteditor2.document.getElementById("texteditor-context-popup");
   ok (!contextMenuPopup, "The menu has NOT loaded in the projecteditor document");
   ok (!textEditorContextMenuPopup, "The menu has NOT loaded in the projecteditor document");
   ok (content.document.querySelector("#context-menu-popup"), "The menu has loaded in the specified element");
   ok (content.document.querySelector("#texteditor-context-popup"), "The menu has loaded in the specified element");
-});
\ No newline at end of file
+});
--- a/browser/devtools/projecteditor/test/browser_projecteditor_editors_image.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_editors_image.js
@@ -53,16 +53,16 @@ function testEditor(projecteditor, fileP
   is (editor.image.getAttribute("src"), resource.uri, "The image has the resource URL");
 
   info ("Selecting another resource, then reselecting this one");
   projecteditor.projectTree.selectResource(resource.store.root);
   yield onceEditorActivated(projecteditor);
   projecteditor.projectTree.selectResource(resource);
   yield onceEditorActivated(projecteditor);
 
-  let editor = projecteditor.currentEditor;
-  let images = editor.elt.querySelectorAll("image");
+  editor = projecteditor.currentEditor;
+  images = editor.elt.querySelectorAll("image");
   ok (images.length, 1, "There is one image inside the editor");
   is (images[0], editor.image, "The image property is set correctly with the DOM");
   is (editor.image.getAttribute("src"), resource.uri, "The image has the resource URL");
 
   info ("Finished checking saving for " + filePath);
 }
--- a/browser/devtools/projecteditor/test/browser_projecteditor_external_change.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_external_change.js
@@ -45,17 +45,17 @@ function testChangeUnsavedFileExternally
   yield writeToFile(resource.path, newData);
 
   info ("Selecting another resource, then reselecting this one");
   projecteditor.projectTree.selectResource(resource.store.root);
   yield onceEditorActivated(projecteditor);
   projecteditor.projectTree.selectResource(resource);
   yield onceEditorActivated(projecteditor);
 
-  let editor = projecteditor.currentEditor;
+  editor = projecteditor.currentEditor;
   info ("Checking to make sure the editor is now populated correctly");
   is (editor.editor.getText(), "foobar", "Editor has not been updated with new file contents");
 
   info ("Finished checking saving for " + filePath);
 }
 
 function testChangeFileExternally(projecteditor, filePath, newData) {
   info ("Testing file external changes for: " + filePath);
@@ -71,14 +71,14 @@ function testChangeFileExternally(projec
   yield writeToFile(resource.path, newData);
 
   info ("Selecting another resource, then reselecting this one");
   projecteditor.projectTree.selectResource(resource.store.root);
   yield onceEditorActivated(projecteditor);
   projecteditor.projectTree.selectResource(resource);
   yield onceEditorActivated(projecteditor);
 
-  let editor = projecteditor.currentEditor;
+  editor = projecteditor.currentEditor;
   info ("Checking to make sure the editor is now populated correctly");
   is (editor.editor.getText(), newData, "Editor has been updated with correct file contents");
 
   info ("Finished checking saving for " + filePath);
 }
--- a/browser/devtools/projecteditor/test/browser_projecteditor_menubar_01.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_menubar_01.js
@@ -14,15 +14,15 @@ let test = asyncTest(function*() {
 
   let fileMenu = projecteditor.document.getElementById("file-menu");
   let editMenu = projecteditor.document.getElementById("edit-menu");
   ok (fileMenu, "The menu has loaded in the projecteditor document");
   ok (editMenu, "The menu has loaded in the projecteditor document");
 
   let projecteditor2 = yield addProjectEditorTabForTempDirectory();
   let menubar = projecteditor2.menubar;
-  let fileMenu = projecteditor2.document.getElementById("file-menu");
-  let editMenu = projecteditor2.document.getElementById("edit-menu");
+  fileMenu = projecteditor2.document.getElementById("file-menu");
+  editMenu = projecteditor2.document.getElementById("edit-menu");
   ok (!fileMenu, "The menu has NOT loaded in the projecteditor document");
   ok (!editMenu, "The menu has NOT loaded in the projecteditor document");
   ok (content.document.querySelector("#file-menu"), "The menu has loaded in the specified element");
   ok (content.document.querySelector("#edit-menu"), "The menu has loaded in the specified element");
-});
\ No newline at end of file
+});
--- a/browser/devtools/responsivedesign/test/browser_responsiveui.js
+++ b/browser/devtools/responsivedesign/test/browser_responsiveui.js
@@ -185,20 +185,20 @@ function test() {
     is(content.innerHeight, initialHeight, "Size hasn't changed (height).");
 
     // Only the `change` event must change the size
     EventUtils.synthesizeKey("VK_RETURN", {});
 
     is(content.innerWidth, expectedWidth, "Size correctly updated (width).");
     is(content.innerHeight, expectedHeight, "Size correctly updated (height).");
     is(instance.menulist.selectedIndex, -1, "Custom menuitem cannot be selected");
-    let label = instance.menulist.firstChild.firstChild.getAttribute("label");
-    let value = instance.menulist.value;
-    isnot(label, value, "Label from the menulist item is different than the value of the menulist")
-    let [width, height] = extractSizeFromString(label);
+    label = instance.menulist.firstChild.firstChild.getAttribute("label");
+    value = instance.menulist.value;
+    isnot(label, value, "Label from the menulist item is different than the value of the menulist");
+    [width, height] = extractSizeFromString(label);
     is(width, expectedWidth, "Label updated (width).");
     is(height, expectedHeight, "Label updated (height).");
     [width, height] = extractSizeFromString(value);
     is(width, expectedWidth, "Value updated (width).");
     is(height, expectedHeight, "Value updated (height).");
 
     testCustomInput2();
   }
--- a/browser/devtools/shadereditor/test/browser_se_shaders-edit-02.js
+++ b/browser/devtools/shadereditor/test/browser_se_shaders-edit-02.js
@@ -31,38 +31,38 @@ function ifWebGLSupported() {
   is(error.link.split("ERROR").length - 1, 2,
     "The linkage status contains two errors.");
   ok(error.link.contains("ERROR: 0:8: 'constructor'"),
     "A constructor error is contained in the linkage status.");
   ok(error.link.contains("ERROR: 0:8: 'assign'"),
     "An assignment error is contained in the linkage status.");
 
   fsEditor.replaceText("vec4", { line: 2, ch: 14 }, { line: 2, ch: 18 });
-  let [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED);
+  [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED);
 
   ok(error,
     "The new fragment shader source was compiled with errors.");
   is(error.compile, "",
     "The compilation status should be empty.");
   isnot(error.link, "",
     "The linkage status should not be empty.");
   is(error.link.split("ERROR").length - 1, 1,
     "The linkage status contains one error.");
   ok(error.link.contains("ERROR: 0:6: 'constructor'"),
     "A constructor error is contained in the linkage status.");
 
   yield ensurePixelIs(gFront, { x: 0, y: 0 }, { r: 255, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(gFront, { x: 511, y: 511 }, { r: 0, g: 255, b: 0, a: 255 }, true);
 
   vsEditor.replaceText("vec4", { line: 7, ch: 22 }, { line: 7, ch: 26 });
-  let [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED);
+  [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED);
   ok(!error, "The new vertex shader source was compiled successfully.");
 
   fsEditor.replaceText("vec3", { line: 2, ch: 14 }, { line: 2, ch: 18 });
-  let [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED);
+  [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED);
   ok(!error, "The new fragment shader source was compiled successfully.");
 
   yield ensurePixelIs(gFront, { x: 0, y: 0 }, { r: 255, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(gFront, { x: 511, y: 511 }, { r: 0, g: 255, b: 0, a: 255 }, true);
 
   yield teardown(panel);
   finish();
 }
--- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-07.js
+++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-07.js
@@ -28,34 +28,34 @@ function ifWebGLSupported() {
   let status = yield vertexShader.compile(newVertSource);
   ok(!status,
     "The new vertex shader source was compiled without errors.");
 
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 0, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(front, { x: 128, y: 128 }, { r: 255, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(front, { x: 511, y: 511 }, { r: 0, g: 0, b: 0, a: 255 }, true);
 
-  let vertSource = yield vertexShader.getText();
-  let fragSource = yield fragmentShader.getText();
+  vertSource = yield vertexShader.getText();
+  fragSource = yield fragmentShader.getText();
   ok(vertSource.contains("2.0"),
     "The vertex shader source is correct after changing it.");
   ok(!fragSource.contains("0.5"),
     "The fragment shader source is correct after changing the vertex shader.");
 
   let newFragSource = fragSource.replace("1.0", "0.5");
-  let status = yield fragmentShader.compile(newFragSource);
+  status = yield fragmentShader.compile(newFragSource);
   ok(!status,
     "The new fragment shader source was compiled without errors.");
 
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 0, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(front, { x: 128, y: 128 }, { r: 255, g: 0, b: 0, a: 127 }, true);
   yield ensurePixelIs(front, { x: 511, y: 511 }, { r: 0, g: 0, b: 0, a: 255 }, true);
 
-  let vertSource = yield vertexShader.getText();
-  let fragSource = yield fragmentShader.getText();
+  vertSource = yield vertexShader.getText();
+  fragSource = yield fragmentShader.getText();
   ok(vertSource.contains("2.0"),
     "The vertex shader source is correct after changing the fragment shader.");
   ok(fragSource.contains("0.5"),
     "The fragment shader source is correct after changing it.");
 
   yield removeTab(target.tab);
   finish();
 }
--- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-14.js
+++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-14.js
@@ -23,19 +23,19 @@ function ifWebGLSupported() {
 
   yield front.waitForFrame();
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 64, g: 64, b: 64, a: 255 }, true, "#canvas1");
   yield ensurePixelIs(front, { x: 127, y: 127 }, { r: 64, g: 64, b: 64, a: 255 }, true, "#canvas1");
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 0, g: 255, b: 255, a: 255 }, true, "#canvas2");
   yield ensurePixelIs(front, { x: 127, y: 127 }, { r: 0, g: 255, b: 255, a: 255 }, true, "#canvas2");
   ok(true, "The first fragment shader was changed.");
 
-  let oldFragSource = yield secondFragmentShader.getText();
-  let newFragSource = oldFragSource.replace("vec4(uColor", "vec4(0.75, 0.75, 0.75");
-  let status = yield secondFragmentShader.compile(newFragSource);
+  oldFragSource = yield secondFragmentShader.getText();
+  newFragSource = oldFragSource.replace("vec4(uColor", "vec4(0.75, 0.75, 0.75");
+  status = yield secondFragmentShader.compile(newFragSource);
   ok(!status,
     "The second new fragment shader source was compiled without errors.");
 
   yield front.waitForFrame();
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 64, g: 64, b: 64, a: 255 }, true, "#canvas1");
   yield ensurePixelIs(front, { x: 127, y: 127 }, { r: 64, g: 64, b: 64, a: 255 }, true, "#canvas1");
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 191, g: 191, b: 191, a: 255 }, true, "#canvas2");
   yield ensurePixelIs(front, { x: 127, y: 127 }, { r: 191, g: 191, b: 191, a: 255 }, true, "#canvas2");
--- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-16.js
+++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-16.js
@@ -27,64 +27,64 @@ function ifWebGLSupported() {
   let allPrograms = yield front._getAllPrograms();
   is(allPrograms.length, 1,
     "Should be only one program in cache.");
 
   // 1. Perform a simple navigation.
 
   navigate(target, MULTIPLE_CONTEXTS_URL);
   let [secondProgram, thirdProgram] = yield getPrograms(front, 2);
-  let programs = yield front.getPrograms();
+  programs = yield front.getPrograms();
   is(programs.length, 2,
     "The second and third programs should be returned by a call to getPrograms().");
   is(programs[0], secondProgram,
     "The second programs was correctly retrieved from the cache.");
   is(programs[1], thirdProgram,
     "The third programs was correctly retrieved from the cache.");
 
-  let allPrograms = yield front._getAllPrograms();
+  allPrograms = yield front._getAllPrograms();
   is(allPrograms.length, 3,
     "Should be three programs in cache.");
 
   // 2. Perform a bfcache navigation.
 
   yield navigateInHistory(target, "back");
   let globalDestroyed = once(front, "global-created");
   let globalCreated = once(front, "global-destroyed");
   let programsLinked = once(front, "program-linked");
   reload(target);
 
   yield promise.all([programsLinked, globalDestroyed, globalCreated]);
-  let allPrograms = yield front._getAllPrograms();
+  allPrograms = yield front._getAllPrograms();
   is(allPrograms.length, 3,
     "Should be 3 programs total in cache.");
 
-  let programs = yield front.getPrograms();
+  programs = yield front.getPrograms();
   is(programs.length, 1,
     "There should be 1 cached program actor now.");
 
   yield checkHighlightingInTheFirstPage(programs[0]);
   ok(true, "The cached programs behave correctly after navigating back and reloading.");
 
   // 3. Perform a bfcache navigation and a page reload.
 
   yield navigateInHistory(target, "forward");
 
-  let globalDestroyed = once(front, "global-created");
-  let globalCreated = once(front, "global-destroyed");
-  let programsLinked = getPrograms(front, 2);
+  globalDestroyed = once(front, "global-created");
+  globalCreated = once(front, "global-destroyed");
+  programsLinked = getPrograms(front, 2);
 
   reload(target);
 
   yield promise.all([programsLinked, globalDestroyed, globalCreated]);
-  let allPrograms = yield front._getAllPrograms();
+  allPrograms = yield front._getAllPrograms();
   is(allPrograms.length, 3,
     "Should be 3 programs total in cache.");
 
-  let programs = yield front.getPrograms();
+  programs = yield front.getPrograms();
   is(programs.length, 2,
     "There should be 2 cached program actors now.");
 
   yield checkHighlightingInTheSecondPage(programs[0], programs[1]);
   ok(true, "The cached programs behave correctly after navigating forward and reloading.");
 
   yield removeTab(target.tab);
   finish();
--- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-18.js
+++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-18.js
@@ -15,17 +15,17 @@ function ifWebGLSupported() {
   yield front.waitForFrame();
 
   let pixel = yield front.getPixel({ selector: "#canvas1", position: { x: 0, y: 0 }});
   is(pixel.r, 255, "correct `r` value for first canvas.")
   is(pixel.g, 255, "correct `g` value for first canvas.")
   is(pixel.b, 0, "correct `b` value for first canvas.")
   is(pixel.a, 255, "correct `a` value for first canvas.")
 
-  let pixel = yield front.getPixel({ selector: "#canvas2", position: { x: 0, y: 0 }});
+  pixel = yield front.getPixel({ selector: "#canvas2", position: { x: 0, y: 0 }});
   is(pixel.r, 0, "correct `r` value for second canvas.")
   is(pixel.g, 255, "correct `g` value for second canvas.")
   is(pixel.b, 255, "correct `b` value for second canvas.")
   is(pixel.a, 255, "correct `a` value for second canvas.")
 
   yield removeTab(target.tab);
   finish();
 }
--- a/browser/devtools/shared/test/browser_cubic-bezier-02.js
+++ b/browser/devtools/shared/test/browser_cubic-bezier-02.js
@@ -40,26 +40,26 @@ function* pointsCanBeDragged(widget) {
 
   let bezier = yield onUpdated;
   ok(true, "The widget fired the updated event");
   ok(bezier, "The updated event contains a bezier argument");
   is(bezier.P1[0], 0, "The new P1 time coordinate is correct");
   is(bezier.P1[1], 1, "The new P1 progress coordinate is correct");
 
   info("Listening for the update event");
-  let onUpdated = widget.once("updated");
+  onUpdated = widget.once("updated");
 
   info("Generating a mousedown/move/up on P2");
   widget._onPointMouseDown({target: widget.p2});
   EventUtils.synthesizeMouse(content.document.documentElement, 200, 300,
     {type: "mousemove"}, content.window);
   EventUtils.synthesizeMouse(content.document.documentElement, 200, 300,
     {type: "mouseup"}, content.window);
 
-  let bezier = yield onUpdated;
+  bezier = yield onUpdated;
   is(bezier.P2[0], 1, "The new P2 time coordinate is correct");
   is(bezier.P2[1], 0, "The new P2 progress coordinate is correct");
 }
 
 function* curveCanBeClicked(widget) {
   info("Checking that clicking on the curve moves the closest control point");
 
   info("Listening for the update event");
@@ -71,22 +71,22 @@ function* curveCanBeClicked(widget) {
   let bezier = yield onUpdated;
   ok(true, "The widget fired the updated event");
   is(bezier.P1[0], 0.25, "The new P1 time coordinate is correct");
   is(bezier.P1[1], 0.75, "The new P1 progress coordinate is correct");
   is(bezier.P2[0], 1, "P2 time coordinate remained unchanged");
   is(bezier.P2[1], 0, "P2 progress coordinate remained unchanged");
 
   info("Listening for the update event");
-  let onUpdated = widget.once("updated");
+  onUpdated = widget.once("updated");
 
   info("Click close to P2");
   widget._onCurveClick({pageX: 150, pageY: 250});
 
-  let bezier = yield onUpdated;
+  bezier = yield onUpdated;
   is(bezier.P2[0], 0.75, "The new P2 time coordinate is correct");
   is(bezier.P2[1], 0.25, "The new P2 progress coordinate is correct");
   is(bezier.P1[0], 0.25, "P1 time coordinate remained unchanged");
   is(bezier.P1[1], 0.75, "P1 progress coordinate remained unchanged");
 }
 
 function* pointsCanBeMovedWithKeyboard(widget) {
   info("Checking that points respond to keyboard events");
@@ -94,55 +94,55 @@ function* pointsCanBeMovedWithKeyboard(w
   info("Moving P1 to the left");
   let onUpdated = widget.once("updated");
   widget._onPointKeyDown(getKeyEvent(widget.p1, 37));
   let bezier = yield onUpdated;
   is(bezier.P1[0], 0.235, "The new P1 time coordinate is correct");
   is(bezier.P1[1], 0.75, "The new P1 progress coordinate is correct");
 
   info("Moving P1 to the left, fast");
-  let onUpdated = widget.once("updated");
+  onUpdated = widget.once("updated");
   widget._onPointKeyDown(getKeyEvent(widget.p1, 37, true));
-  let bezier = yield onUpdated;
+  bezier = yield onUpdated;
   is(bezier.P1[0], 0.085, "The new P1 time coordinate is correct");
   is(bezier.P1[1], 0.75, "The new P1 progress coordinate is correct");
 
   info("Moving P1 to the right, fast");
-  let onUpdated = widget.once("updated");
+  onUpdated = widget.once("updated");
   widget._onPointKeyDown(getKeyEvent(widget.p1, 39, true));
-  let bezier = yield onUpdated;
+  bezier = yield onUpdated;
   is(bezier.P1[0], 0.235, "The new P1 time coordinate is correct");
   is(bezier.P1[1], 0.75, "The new P1 progress coordinate is correct");
 
   info("Moving P1 to the bottom");
-  let onUpdated = widget.once("updated");
+  onUpdated = widget.once("updated");
   widget._onPointKeyDown(getKeyEvent(widget.p1, 40));
-  let bezier = yield onUpdated;
+  bezier = yield onUpdated;
   is(bezier.P1[0], 0.235, "The new P1 time coordinate is correct");
   is(bezier.P1[1], 0.735, "The new P1 progress coordinate is correct");
 
   info("Moving P1 to the bottom, fast");
-  let onUpdated = widget.once("updated");
+  onUpdated = widget.once("updated");
   widget._onPointKeyDown(getKeyEvent(widget.p1, 40, true));
-  let bezier = yield onUpdated;
+  bezier = yield onUpdated;
   is(bezier.P1[0], 0.235, "The new P1 time coordinate is correct");
   is(bezier.P1[1], 0.585, "The new P1 progress coordinate is correct");
 
   info("Moving P1 to the top, fast");
-  let onUpdated = widget.once("updated");
+  onUpdated = widget.once("updated");
   widget._onPointKeyDown(getKeyEvent(widget.p1, 38, true));
-  let bezier = yield onUpdated;
+  bezier = yield onUpdated;
   is(bezier.P1[0], 0.235, "The new P1 time coordinate is correct");
   is(bezier.P1[1], 0.735, "The new P1 progress coordinate is correct");
 
   info("Checking that keyboard events also work with P2");
   info("Moving P2 to the left");
-  let onUpdated = widget.once("updated");
+  onUpdated = widget.once("updated");
   widget._onPointKeyDown(getKeyEvent(widget.p2, 37));
-  let bezier = yield onUpdated;
+  bezier = yield onUpdated;
   is(bezier.P2[0], 0.735, "The new P2 time coordinate is correct");
   is(bezier.P2[1], 0.25, "The new P2 progress coordinate is correct");
 }
 
 function getKeyEvent(target, keyCode, shift=false) {
   return {
     target: target,
     keyCode: keyCode,
--- a/browser/devtools/shared/test/browser_cubic-bezier-03.js
+++ b/browser/devtools/shared/test/browser_cubic-bezier-03.js
@@ -50,18 +50,18 @@ function* coordinatesCanBeChangedByProvi
   ok(true, "The updated event was fired as a result of setting cssValue");
 
   is(bezier.P1[0], 0, "The new P1 time coordinate is correct");
   is(bezier.P1[1], 0, "The new P1 progress coordinate is correct");
   is(bezier.P2[0], 1, "The new P2 time coordinate is correct");
   is(bezier.P2[1], 1, "The new P2 progress coordinate is correct");
 
   info("Setting a custom cubic-bezier css value");
-  let onUpdated = widget.once("updated");
+  onUpdated = widget.once("updated");
   widget.cssCubicBezierValue = "cubic-bezier(.25,-0.5, 1, 1.45)";
-  let bezier = yield onUpdated;
+  bezier = yield onUpdated;
   ok(true, "The updated event was fired as a result of setting cssValue");
 
   is(bezier.P1[0], .25, "The new P1 time coordinate is correct");
   is(bezier.P1[1], -.5, "The new P1 progress coordinate is correct");
   is(bezier.P2[0], 1, "The new P2 time coordinate is correct");
   is(bezier.P2[1], 1.45, "The new P2 progress coordinate is correct");
 }
--- a/browser/devtools/shared/test/browser_layoutHelpers-getBoxQuads.js
+++ b/browser/devtools/shared/test/browser_layoutHelpers-getBoxQuads.js
@@ -166,17 +166,17 @@ function takesScrollingIntoAccount(doc, 
   let quad = helper.getAdjustedQuads(innerNode, "content");
   is(quad.p1.x, 0, "p1.x of the scrolled node is correct after scrolling down");
   is(quad.p1.y, -300, "p1.y of the scrolled node is correct after scrolling down");
 
   info("Scrolling back up");
   scrolledNode.scrollTop = 0;
   subScrolledNode.scrollTop = 0;
 
-  let quad = helper.getAdjustedQuads(innerNode, "content");
+  quad = helper.getAdjustedQuads(innerNode, "content");
   is(quad.p1.x, 0, "p1.x of the scrolled node is correct after scrolling up");
   is(quad.p1.y, 0, "p1.y of the scrolled node is correct after scrolling up");
 }
 
 function takesZoomIntoAccount(doc, helper) {
   info("Checks that if the page is zoomed in/out, the quad returned is correct");
 
   // Hard-coding coordinates in this zoom test is a bad idea as it can vary
--- a/browser/devtools/shared/test/browser_outputparser.js
+++ b/browser/devtools/shared/test/browser_outputparser.js
@@ -37,17 +37,17 @@ function testParseCssProperty() {
   target.appendChild(frag);
 
   is(target.innerHTML,
      '1px solid <span data-color="#F00"><span style="background-color:red" class="test-colorswatch"></span><span>#F00</span></span>',
      "CSS property correctly parsed");
 
   target.innerHTML = "";
 
-  let frag = parser.parseCssProperty("background-image", "linear-gradient(to right, #F60 10%, rgba(0,0,0,1))", {
+  frag = parser.parseCssProperty("background-image", "linear-gradient(to right, #F60 10%, rgba(0,0,0,1))", {
     colorSwatchClass: "test-colorswatch",
     colorClass: "test-color"
   });
   target.appendChild(frag);
   is(target.innerHTML,
      'linear-gradient(to right, <span data-color="#F60"><span style="background-color:#F60" class="test-colorswatch"></span><span class="test-color">#F60</span></span> 10%, ' +
      '<span data-color="#000"><span style="background-color:rgba(0,0,0,1)" class="test-colorswatch"></span><span class="test-color">#000</span></span>)',
      "Gradient CSS property correctly parsed");
--- a/browser/devtools/shared/test/browser_tableWidget_basic.js
+++ b/browser/devtools/shared/test/browser_tableWidget_basic.js
@@ -334,36 +334,36 @@ function testAPI() {
   }
   // Calling it on an unsorted column should sort by it in ascending manner
   table.sortBy("col2");
   let cell = table.tbody.children[2].firstChild.children[2];
   checkAscendingOrder(cell);
 
   // Calling it again should sort by it in descending manner
   table.sortBy("col2");
-  let cell = table.tbody.children[2].firstChild.lastChild.previousSibling;
+  cell = table.tbody.children[2].firstChild.lastChild.previousSibling;
   checkDescendingOrder(cell);
 
   // Calling it again should sort by it in ascending manner
   table.sortBy("col2");
-  let cell = table.tbody.children[2].firstChild.children[2];
+  cell = table.tbody.children[2].firstChild.children[2];
   checkAscendingOrder(cell);
 
   table.clear();
   populateTable();
 
   // testing if sorting works should sort by ascending manner
   table.sortBy("col4");
-  let cell = table.tbody.children[6].firstChild.children[1];
+  cell = table.tbody.children[6].firstChild.children[1];
   is(cell.textContent, "domnode", "DOMNode sorted correctly");
   checkAscendingOrder(cell.nextSibling);
 
   // Calling it again should sort it in descending order
   table.sortBy("col4");
-  let cell = table.tbody.children[6].firstChild.children[9];
+  cell = table.tbody.children[6].firstChild.children[9];
   is(cell.textContent, "domnode", "DOMNode sorted correctly");
   checkDescendingOrder(cell.previousSibling);
 }
 
 function checkAscendingOrder(cell) {
   while(cell) {
     let currentCell = cell.value || cell.textContent;
     let prevCell = cell.previousSibling.value || cell.previousSibling.textContent;
--- a/browser/devtools/shared/test/browser_tableWidget_keyboard_interaction.js
+++ b/browser/devtools/shared/test/browser_tableWidget_keyboard_interaction.js
@@ -142,17 +142,17 @@ let testKeyboardInteraction = Task.async
 
   node = table.tbody.firstChild.firstChild.children[2];
   // node should not have selected class
   ok(!node.classList.contains("theme-selected"),
      "Row should not have selected class");
   info("Pressing down key to select next row");
   event = table.once(TableWidget.EVENTS.ROW_SELECTED);
   EventUtils.sendKey("DOWN", doc.defaultView);
-  let id = yield event;
+  id = yield event;
   is(id, "id2", "Correct row was selected after pressing down");
   ok(node.classList.contains("theme-selected"), "row has selected class");
   let nodes = doc.querySelectorAll(".theme-selected");
   for (let i = 0; i < nodes.length; i++) {
     is(nodes[i].getAttribute("data-id"), "id2",
        "Correct cell selected in all columns");
   }
 
@@ -161,34 +161,34 @@ let testKeyboardInteraction = Task.async
   ok(!node.classList.contains("theme-selected"),
      "Row should not have selected class");
   info("Pressing down key to select next row");
   event = table.once(TableWidget.EVENTS.ROW_SELECTED);
   EventUtils.sendKey("DOWN", doc.defaultView);
   id = yield event;
   is(id, "id3", "Correct row was selected after pressing down");
   ok(node.classList.contains("theme-selected"), "row has selected class");
-  let nodes = doc.querySelectorAll(".theme-selected");
+  nodes = doc.querySelectorAll(".theme-selected");
   for (let i = 0; i < nodes.length; i++) {
     is(nodes[i].getAttribute("data-id"), "id3",
        "Correct cell selected in all columns");
   }
 
   // pressing up arrow key to select previous row
   node = table.tbody.firstChild.firstChild.children[2];
   // node should not have selected class
   ok(!node.classList.contains("theme-selected"),
      "Row should not have selected class");
   info("Pressing up key to select previous row");
   event = table.once(TableWidget.EVENTS.ROW_SELECTED);
   EventUtils.sendKey("UP", doc.defaultView);
   id = yield event;
   is(id, "id2", "Correct row was selected after pressing down");
   ok(node.classList.contains("theme-selected"), "row has selected class");
-  let nodes = doc.querySelectorAll(".theme-selected");
+  nodes = doc.querySelectorAll(".theme-selected");
   for (let i = 0; i < nodes.length; i++) {
     is(nodes[i].getAttribute("data-id"), "id2",
        "Correct cell selected in all columns");
   }
 
   // selecting last item node to test edge navigation cycling case
   table.selectedRow = "id9";
   // pressing down now should move to first row.
@@ -197,31 +197,31 @@ let testKeyboardInteraction = Task.async
   ok(!node.classList.contains("theme-selected"),
      "Row should not have selected class");
   info("Pressing down key on last row to select first row");
   event = table.once(TableWidget.EVENTS.ROW_SELECTED);
   EventUtils.sendKey("DOWN", doc.defaultView);
   id = yield event;
   is(id, "id1", "Correct row was selected after pressing down");
   ok(node.classList.contains("theme-selected"), "row has selected class");
-  let nodes = doc.querySelectorAll(".theme-selected");
+  nodes = doc.querySelectorAll(".theme-selected");
   for (let i = 0; i < nodes.length; i++) {
     is(nodes[i].getAttribute("data-id"), "id1",
        "Correct cell selected in all columns");
   }
 
   // pressing up now should move to last row.
   node = table.tbody.firstChild.firstChild.lastChild;
   // node should not have selected class
   ok(!node.classList.contains("theme-selected"),
      "Row should not have selected class");
   info("Pressing down key on last row to select first row");
   event = table.once(TableWidget.EVENTS.ROW_SELECTED);
   EventUtils.sendKey("UP", doc.defaultView);
   id = yield event;
   is(id, "id9", "Correct row was selected after pressing down");
   ok(node.classList.contains("theme-selected"), "row has selected class");
-  let nodes = doc.querySelectorAll(".theme-selected");
+  nodes = doc.querySelectorAll(".theme-selected");
   for (let i = 0; i < nodes.length; i++) {
     is(nodes[i].getAttribute("data-id"), "id9",
        "Correct cell selected in all columns");
   }
 });
--- a/browser/devtools/shared/test/browser_tableWidget_mouse_interaction.js
+++ b/browser/devtools/shared/test/browser_tableWidget_mouse_interaction.js
@@ -142,157 +142,157 @@ let testMouseInteraction = Task.async(fu
   ok(!node.classList.contains("theme-selected"),
      "Node should not have selected class before clicking");
   click(node);
   let id = yield event;
   ok(node.classList.contains("theme-selected"), "Node has selected class after click");
   is(id, "id1", "Correct row was selected");
 
   info("clicking on third row to select it");
-  let event = table.once(TableWidget.EVENTS.ROW_SELECTED);
+  event = table.once(TableWidget.EVENTS.ROW_SELECTED);
   let node2 = table.tbody.firstChild.firstChild.children[3];
   // node should not have selected class
   ok(!node2.classList.contains("theme-selected"),
      "New node should not have selected class before clicking");
   click(node2);
-  let id = yield event;
+  id = yield event;
   ok(node2.classList.contains("theme-selected"),
      "New node has selected class after clicking");
   is(id, "id3", "Correct table path is emitted for new node")
   isnot(node, node2, "Old and new node are different");
   ok(!node.classList.contains("theme-selected"),
      "Old node should not have selected class after the click on new node");
 
   // clicking on table header to sort by it
-  let event = table.once(TableWidget.EVENTS.COLUMN_SORTED);
-  let node = table.tbody.children[6].firstChild.children[0];
+  event = table.once(TableWidget.EVENTS.COLUMN_SORTED);
+  node = table.tbody.children[6].firstChild.children[0];
   info("clicking on the 4th coulmn header to sort the table by it");
   ok(!node.hasAttribute("sorted"),
      "Node should not have sorted attribute before clicking");
   ok(doc.querySelector("[sorted]"), "Although, something else should be sorted on");
   isnot(doc.querySelector("[sorted]"), node, "Which is not equal to this node");
   click(node);
-  let id = yield event;
+  id = yield event;
   is(id, "col4", "Correct column was sorted on");
   ok(node.hasAttribute("sorted"),
      "Node should now have sorted attribute after clicking");
   is(doc.querySelectorAll("[sorted]").length, 1,
      "Now only one column should be sorted on");
   is(doc.querySelector("[sorted]"), node, "Which should be this column");
 
   // test context menu opening.
   // hiding second column
   // event listener for popupshown
-  let event = Promise.defer();
+  event = Promise.defer();
   table.menupopup.addEventListener("popupshown", function onPopupShown(e) {
     table.menupopup.removeEventListener("popupshown", onPopupShown);
     event.resolve();
   })
   info("right clicking on the first column header");
-  let node = table.tbody.firstChild.firstChild.firstChild;
+  node = table.tbody.firstChild.firstChild.firstChild;
   click(node, 2);
   yield event.promise;
   is(table.menupopup.querySelectorAll("[disabled]").length, 1,
      "Only 1 menuitem is disabled");
   is(table.menupopup.querySelector("[disabled]"),
      table.menupopup.querySelector("[data-id='col1']"),
      "Which is the unique column");
   // popup should be open now
   // clicking on second column label
-  let event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU);
-  let node = table.menupopup.querySelector("[data-id='col2']");
+  event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU);
+  node = table.menupopup.querySelector("[data-id='col2']");
   info("selecting to hide the second column");
   ok(!table.tbody.children[2].hasAttribute("hidden"),
      "Column is not hidden before hiding it");
   click(node);
-  let id = yield event;
+  id = yield event;
   is(id, "col2", "Correct column was triggered to be hidden");
   is(table.tbody.children[2].getAttribute("hidden"), "true",
      "Column is hidden after hiding it");
 
   // hiding third column
   // event listener for popupshown
-  let event = Promise.defer();
+  event = Promise.defer();
   table.menupopup.addEventListener("popupshown", function onPopupShown(e) {
     table.menupopup.removeEventListener("popupshown", onPopupShown);
     event.resolve();
   })
   info("right clicking on the first column header");
-  let node = table.tbody.firstChild.firstChild.firstChild;
+  node = table.tbody.firstChild.firstChild.firstChild;
   click(node, 2);
   yield event.promise;
   is(table.menupopup.querySelectorAll("[disabled]").length, 1,
      "Only 1 menuitem is disabled");
   // popup should be open now
   // clicking on second column label
-  let event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU);
-  let node = table.menupopup.querySelector("[data-id='col3']");
+  event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU);
+  node = table.menupopup.querySelector("[data-id='col3']");
   info("selecting to hide the second column");
   ok(!table.tbody.children[4].hasAttribute("hidden"),
      "Column is not hidden before hiding it");
   click(node);
-  let id = yield event;
+  id = yield event;
   is(id, "col3", "Correct column was triggered to be hidden");
   is(table.tbody.children[4].getAttribute("hidden"), "true",
      "Column is hidden after hiding it");
 
   // opening again to see if 2 items are disabled now
   // event listener for popupshown
-  let event = Promise.defer();
+  event = Promise.defer();
   table.menupopup.addEventListener("popupshown", function onPopupShown(e) {
     table.menupopup.removeEventListener("popupshown", onPopupShown);
     event.resolve();
   })
   info("right clicking on the first column header");
-  let node = table.tbody.firstChild.firstChild.firstChild;
+  node = table.tbody.firstChild.firstChild.firstChild;
   click(node, 2);
   yield event.promise;
   is(table.menupopup.querySelectorAll("[disabled]").length, 2,
      "2 menuitems are disabled now as only 2 columns remain visible");
   is(table.menupopup.querySelectorAll("[disabled]")[0],
      table.menupopup.querySelector("[data-id='col1']"),
      "First is the unique column");
   is(table.menupopup.querySelectorAll("[disabled]")[1],
      table.menupopup.querySelector("[data-id='col4']"),
      "Second is the last column");
 
   // showing back 2nd column
   // popup should be open now
   // clicking on second column label
-  let event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU);
-  let node = table.menupopup.querySelector("[data-id='col2']");
+  event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU);
+  node = table.menupopup.querySelector("[data-id='col2']");
   info("selecting to hide the second column");
   is(table.tbody.children[2].getAttribute("hidden"), "true",
      "Column is hidden before unhiding it");
   click(node);
-  let id = yield event;
+  id = yield event;
   is(id, "col2", "Correct column was triggered to be hidden");
   ok(!table.tbody.children[2].hasAttribute("hidden"),
      "Column is not hidden after unhiding it");
 
   // showing back 3rd column
   // event listener for popupshown
-  let event = Promise.defer();
+  event = Promise.defer();
   table.menupopup.addEventListener("popupshown", function onPopupShown(e) {
     table.menupopup.removeEventListener("popupshown", onPopupShown);
     event.resolve();
   })
   info("right clicking on the first column header");
-  let node = table.tbody.firstChild.firstChild.firstChild;
+  node = table.tbody.firstChild.firstChild.firstChild;
   click(node, 2);
   yield event.promise;
   // popup should be open now
   // clicking on second column label
-  let event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU);
-  let node = table.menupopup.querySelector("[data-id='col3']");
+  event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU);
+  node = table.menupopup.querySelector("[data-id='col3']");
   info("selecting to hide the second column");
   is(table.tbody.children[4].getAttribute("hidden"), "true",
      "Column is hidden before unhiding it");
   click(node);
-  let id = yield event;
+  id = yield event;
   is(id, "col3", "Correct column was triggered to be hidden");
   ok(!table.tbody.children[4].hasAttribute("hidden"),
      "Column is not hidden after unhiding it");
 
   // reset table state
   table.clearSelection();
   table.sortBy("col1");
 });
--- a/browser/devtools/shared/test/browser_treeWidget_keyboard_interaction.js
+++ b/browser/devtools/shared/test/browser_treeWidget_keyboard_interaction.js
@@ -119,36 +119,36 @@ let testKeyboardInteraction = Task.async
   ok(!attachment, "null attachment was emitted");
   ok(node.classList.contains("theme-selected"), "Node has selected class");
   ok(node.hasAttribute("expanded"), "Node is expanded now");
 
   info("Pressing down key again to select next item");
   event = Promise.defer();
   tree.once("select", pass);
   EventUtils.sendKey("DOWN", content);
-  let [name, data, attachment] = yield event.promise;
+  [name, data, attachment] = yield event.promise;
   is(data.length, 2, "Correct level item was selected after second down keypress");
   is(data[0], "level1", "Correct parent level");
   is(data[1], "level2", "Correct second level");
 
   info("Pressing down key again to select next item");
   event = Promise.defer();
   tree.once("select", pass);
   EventUtils.sendKey("DOWN", content);
-  let [name, data, attachment] = yield event.promise;
+  [name, data, attachment] = yield event.promise;
   is(data.length, 3, "Correct level item was selected after third down keypress");
   is(data[0], "level1", "Correct parent level");
   is(data[1], "level2", "Correct second level");
   is(data[2], "level3", "Correct third level");
 
   info("Pressing down key again to select next item");
   event = Promise.defer();
   tree.once("select", pass);
   EventUtils.sendKey("DOWN", content);
-  let [name, data, attachment] = yield event.promise;
+  [name, data, attachment] = yield event.promise;
   is(data.length, 2, "Correct level item was selected after fourth down keypress");
   is(data[0], "level1", "Correct parent level");
   is(data[1], "level2-1", "Correct second level");
 
   // pressing left to check expand collapse feature.
   // This does not emit any event, so listening for keypress
   tree.root.children.addEventListener("keypress", function onClick() {
     tree.root.children.removeEventListener("keypress", onClick);
@@ -168,30 +168,30 @@ let testKeyboardInteraction = Task.async
 
   info("Pressing left key on collapsed item to select previous");
   tree.once("select", pass);
   event = Promise.defer();
   // parent node should have no effect of this keypress
   node = tree.root.children.firstChild.nextSibling.firstChild;
   ok(node.hasAttribute("expanded"), "Parent is expanded");
   EventUtils.sendKey("LEFT", content);
-  let [name, data] = yield event.promise;
+  [name, data] = yield event.promise;
   is(data.length, 3, "Correct level item was selected after second left keypress");
   is(data[0], "level1", "Correct parent level");
   is(data[1], "level2", "Correct second level");
   is(data[2], "level3", "Correct third level");
   ok(node.hasAttribute("expanded"), "Parent is still expanded after left keypress");
 
   // pressing down again
 
   info("Pressing down key to select next item");
   event = Promise.defer();
   tree.once("select", pass);
   EventUtils.sendKey("DOWN", content);
-  let [name, data, attachment] = yield event.promise;
+  [name, data, attachment] = yield event.promise;
   is(data.length, 2, "Correct level item was selected after fifth down keypress");
   is(data[0], "level1", "Correct parent level");
   is(data[1], "level2-1", "Correct second level");
 
   // collapsing the item to check expand feature.
 
   tree.root.children.addEventListener("keypress", function onClick() {
     tree.root.children.removeEventListener("keypress", onClick);
--- a/browser/devtools/shared/test/browser_treeWidget_mouse_interaction.js
+++ b/browser/devtools/shared/test/browser_treeWidget_mouse_interaction.js
@@ -118,17 +118,17 @@ let testMouseInteraction = Task.async(fu
   let node2 = tree.root.children.firstChild.nextSibling.firstChild;
   event = Promise.defer();
   // node should not have selected class
   ok(!node2.classList.contains("theme-selected"),
      "New node should not have selected class before clicking");
   ok(!node2.hasAttribute("expanded"), "New node is not expanded before clicking");
   tree.once("select", pass);
   click(node2);
-  let [name, data, attachment] = yield event.promise;
+  [name, data, attachment] = yield event.promise;
   ok(node2.classList.contains("theme-selected"),
      "New node has selected class after clicking");
   is(data[0], "level1", "Correct tree path is emitted for new node")
   ok(!attachment, "null attachment should be emitted for new node")
   ok(node2.hasAttribute("expanded"), "New node expanded after click");
 
   ok(!node.classList.contains("theme-selected"),
      "Old node should not have selected class after the click on new node");
--- a/browser/devtools/shared/test/unit/test_bezierCanvas.js
+++ b/browser/devtools/shared/test/unit/test_bezierCanvas.js
@@ -30,18 +30,18 @@ function offsetsGetterReturnsData() {
 
   do_check_eq(offsets[0].top, "300px");
   do_check_eq(offsets[0].left, "0px");
   do_check_eq(offsets[1].top, "100px");
   do_check_eq(offsets[1].left, "200px");
 
   do_print("offsets getter returns data according to current padding");
 
-  let b = new BezierCanvas(getCanvasMock(), getCubicBezier(), [0, 0]);
-  let offsets = b.offsets;
+  b = new BezierCanvas(getCanvasMock(), getCubicBezier(), [0, 0]);
+  offsets = b.offsets;
 
   do_check_eq(offsets[0].top, "400px");
   do_check_eq(offsets[0].left, "0px");
   do_check_eq(offsets[1].top, "0px");
   do_check_eq(offsets[1].left, "200px");
 }
 
 function convertsOffsetsToCoordinates() {
@@ -52,24 +52,24 @@ function convertsOffsetsToCoordinates() 
   let coordinates = b.offsetsToCoordinates({style: {
     left: "0px",
     top: "0px"
   }});
   do_check_eq(coordinates.length, 2);
   do_check_eq(coordinates[0], 0);
   do_check_eq(coordinates[1], 1.5);
 
-  let coordinates = b.offsetsToCoordinates({style: {
+  coordinates = b.offsetsToCoordinates({style: {
     left: "0px",
     top: "300px"
   }});
   do_check_eq(coordinates[0], 0);
   do_check_eq(coordinates[1], 0);
 
-  let coordinates = b.offsetsToCoordinates({style: {
+  coordinates = b.offsetsToCoordinates({style: {
     left: "200px",
     top: "100px"
   }});
   do_check_eq(coordinates[0], 1);
   do_check_eq(coordinates[1], 1);
 }
 
 function plotsCanvas() {
--- a/browser/devtools/shared/test/unit/test_cubicBezier.js
+++ b/browser/devtools/shared/test/unit/test_cubicBezier.js
@@ -58,18 +58,18 @@ function convertsStringCoordinates() {
 
 function coordinatesToStringOutputsAString() {
   do_print("coordinates.toString() outputs a string representation");
 
   let c = new CubicBezier(["0", "1", "0.5", "-2"]);
   let string = c.coordinates.toString();
   do_check_eq(string, "0,1,.5,-2");
 
-  let c = new CubicBezier([1, 1, 1, 1]);
-  let string = c.coordinates.toString();
+  c = new CubicBezier([1, 1, 1, 1]);
+  string = c.coordinates.toString();
   do_check_eq(string, "1,1,1,1");
 }
 
 function pointGettersReturnPointCoordinatesArrays() {
   do_print("Points getters return arrays of coordinates");
 
   let c = new CubicBezier([0, .2, .5, 1]);
   do_check_eq(c.P1[0], 0);
--- a/browser/devtools/styleeditor/test/browser_styleeditor_cmd_edit.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_cmd_edit.js
@@ -188,17 +188,17 @@ function spawnTest() {
             }
           }
         }
       },
       exec: { output: "" }
     },
   ]);
 
-  let toolbox = gDevTools.getToolbox(options.target);
+  toolbox = gDevTools.getToolbox(options.target);
   ok(toolbox != null, "toolbox is open");
 
   let styleEditor = toolbox.getCurrentPanel();
   ok(typeof styleEditor.selectStyleSheet === "function", "styleeditor is open");
 
   yield toolbox.destroy();
 
   yield helpers.closeToolbar(options);
--- a/browser/devtools/styleeditor/test/browser_styleeditor_new.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_new.js
@@ -68,17 +68,17 @@ function testInitialState(aEditor) {
 
   let summary = aEditor.summary;
 
   ok(aEditor.sourceLoaded, "new editor is loaded when attached");
   ok(aEditor.isNew, "new editor has isNew flag");
 
   ok(aEditor.sourceEditor.hasFocus(), "new editor has focus");
 
-  let summary = aEditor.summary;
+  summary = aEditor.summary;
   let ruleCount = summary.querySelector(".stylesheet-rule-count").textContent;
   is(parseInt(ruleCount), 0,
      "new editor initially shows 0 rules");
 
   let computedStyle = content.getComputedStyle(content.document.body, null);
   is(computedStyle.backgroundColor, "rgb(255, 255, 255)",
      "content's background color is initially white");
 }
--- a/browser/devtools/styleinspector/test/browser_computedview_keybindings_02.js
+++ b/browser/devtools/styleinspector/test/browser_computedview_keybindings_02.js
@@ -45,17 +45,17 @@ let test = asyncTest(function*() {
   yield onExpanded;
 
   info("Verify the 2nd style has been expanded");
   let secondStyleSelectors = view.styleDocument.querySelectorAll(
     ".property-content .matchedselectors")[1];
   ok(secondStyleSelectors.childNodes.length > 0, "Matched selectors expanded");
 
   info("Tab back up and test the same thing, with space");
-  let onExpanded = inspector.once("computed-view-property-expanded");
+  onExpanded = inspector.once("computed-view-property-expanded");
   EventUtils.synthesizeKey("VK_TAB", {shiftKey: true});
   EventUtils.synthesizeKey("VK_SPACE", {});
   yield onExpanded;
 
   info("Verify the 1st style has been expanded too");
   let firstStyleSelectors = view.styleDocument.querySelectorAll(
     ".property-content .matchedselectors")[0];
   ok(firstStyleSelectors.childNodes.length > 0, "Matched selectors expanded");
--- a/browser/devtools/styleinspector/test/browser_ruleview_add-property-cancel_02.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_add-property-cancel_02.js
@@ -40,40 +40,40 @@ let test = asyncTest(function*() {
 
   info("Entering a value in the property name editor");
   let onModifications = elementRuleEditor.rule._applyingModifications;
   input.value = "color";
   yield onModifications;
 
   info("Pressing return to commit and focus the new value field");
   let onValueFocus = once(elementRuleEditor.element, "focus", true);
-  let onModifications = elementRuleEditor.rule._applyingModifications;
+  onModifications = elementRuleEditor.rule._applyingModifications;
   EventUtils.synthesizeKey("VK_RETURN", {}, view.doc.defaultView);
   yield onValueFocus;
   yield onModifications;
 
   // Getting the new value editor after focus
   editor = inplaceEditor(view.doc.activeElement);
   let textProp = elementRuleEditor.rule.textProps[1];
 
   is(elementRuleEditor.rule.textProps.length,  2, "Created a new text property.");
   is(elementRuleEditor.propertyList.children.length, 2, "Created a property editor.");
   is(editor, inplaceEditor(textProp.editor.valueSpan), "Editing the value span now.");
 
   info("Entering a property value");
   editor.input.value = "red";
 
   info("Escaping out of the field");
-  let onModifications = elementRuleEditor.rule._applyingModifications;
+  onModifications = elementRuleEditor.rule._applyingModifications;
   EventUtils.synthesizeKey("VK_ESCAPE", {}, view.doc.defaultView);
   yield onModifications;
 
   info("Checking that the previous field is focused");
   let focusedElement = inplaceEditor(elementRuleEditor.rule.textProps[0].editor.valueSpan).input;
   is(focusedElement, focusedElement.ownerDocument.activeElement, "Correct element has focus");
 
-  let onModifications = elementRuleEditor.rule._applyingModifications;
+  onModifications = elementRuleEditor.rule._applyingModifications;
   EventUtils.synthesizeKey("VK_ESCAPE", {}, view.doc.defaultView);
   yield onModifications;
 
   is(elementRuleEditor.rule.textProps.length,  1, "Removed the new text property.");
   is(elementRuleEditor.propertyList.children.length, 1, "Removed the property editor.");
 });
--- a/browser/devtools/styleinspector/test/browser_ruleview_add-property_01.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_add-property_01.js
@@ -63,17 +63,17 @@ function* testCreateNew(view) {
 
   is(elementRuleEditor.rule.textProps.length,  1, "Created a new text property.");
   is(elementRuleEditor.propertyList.children.length, 1, "Created a property editor.");
   is(editor, inplaceEditor(textProp.editor.valueSpan), "Editing the value span now.");
 
   info("Entering a value and bluring the field to expect a rule change");
   editor.input.value = "#XYZ";
   let onBlur = once(editor.input, "blur");
-  let onModifications = elementRuleEditor.rule._applyingModifications;
+  onModifications = elementRuleEditor.rule._applyingModifications;
   editor.input.blur();
   yield onBlur;
   yield onModifications;
 
   is(textProp.value, "#XYZ", "Text prop should have been changed.");
   is(textProp.overridden, false, "Property should not be overridden");
   is(textProp.editor.isValid(), false, "#XYZ should not be a valid entry");
 }
--- a/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_01.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_01.js
@@ -49,12 +49,12 @@ function* testImageTooltipAfterColorChan
   let onHidden = picker.tooltip.once("hidden");
   EventUtils.sendKey("RETURN", spectrum.element.ownerDocument.defaultView);
   yield onHidden;
 
   info("Verify again that the image preview tooltip works");
   // After a color change, the property is re-populated, we need to get the new
   // dom node
   url = getRuleViewProperty(ruleView, "body", "background").valueSpan.querySelector(".theme-link");
-  let anchor = yield isHoverTooltipTarget(ruleView.tooltips.previewTooltip, url);
+  anchor = yield isHoverTooltipTarget(ruleView.tooltips.previewTooltip, url);
   ok(anchor, "The image preview tooltip is shown on the url span");
   is(anchor, url, "The anchor returned by the showOnHover callback is correct");
 }
--- a/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_02.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_02.js
@@ -44,18 +44,18 @@ function* testColorChangeIsntRevertedWhe
   let spectrum = yield picker.spectrum;
   let onHidden = picker.tooltip.once("hidden");
   EventUtils.sendKey("RETURN", spectrum.element.ownerDocument.defaultView);
   yield onHidden;
 
   info("Open the image preview tooltip");
   let value = getRuleViewProperty(ruleView, "body", "background").valueSpan;
   let url = value.querySelector(".theme-link");
-  let onShown = ruleView.tooltips.previewTooltip.once("shown");
+  onShown = ruleView.tooltips.previewTooltip.once("shown");
   let anchor = yield isHoverTooltipTarget(ruleView.tooltips.previewTooltip, url);
   ruleView.tooltips.previewTooltip.show(anchor);
   yield onShown;
 
   info("Image tooltip is shown, verify that the swatch is still correct");
-  let swatch = value.querySelector(".ruleview-colorswatch");
+  swatch = value.querySelector(".ruleview-colorswatch");
   is(swatch.style.backgroundColor, "rgb(0, 0, 0)", "The swatch's color is correct");
   is(swatch.nextSibling.textContent, "#000", "The color name is correct");
 }
--- a/browser/devtools/styleinspector/test/browser_ruleview_edit-property_01.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_edit-property_01.js
@@ -60,17 +60,17 @@ function* testEditProperty(view, name, v
 
   // Getting the value editor after focus
   editor = inplaceEditor(view.doc.activeElement);
   input = editor.input;
   is(inplaceEditor(propEditor.valueSpan), editor, "Focus moved to the value.");
 
   info("Entering a new value, including ; to commit and blur the value");
   let onBlur = once(input, "blur");
-  let onModifications = idRuleEditor.rule._applyingModifications;
+  onModifications = idRuleEditor.rule._applyingModifications;
   for (let ch of value + ";") {
     EventUtils.sendChar(ch, view.doc.defaultView);
   }
   yield onBlur;
   yield onModifications;
 
   is(propEditor.isValid(), true, value + " is a valid entry");
 
--- a/browser/devtools/styleinspector/test/browser_ruleview_edit-property_02.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_edit-property_02.js
@@ -71,27 +71,27 @@ function* testEditProperty(inspector, ru
   let newValue = yield executeInContent("Test:GetRulePropertyValue", {
     styleSheetIndex: 0,
     ruleIndex: 0,
     name: "border-color"
   });
   is(newValue, "red", "border-color should have been set.");
 
   info("Entering property name \"color\" followed by a colon to focus the value");
-  let onFocus = once(idRuleEditor.element, "focus", true);
+  onFocus = once(idRuleEditor.element, "focus", true);
   for (let ch of "color:") {
     EventUtils.sendChar(ch, ruleView.doc.defaultView);
   }
   yield onFocus;
 
   info("Verifying that the focused field is the valueSpan");
   editor = inplaceEditor(ruleView.doc.activeElement);
 
   info("Entering a value following by a semi-colon to commit it");
-  let onBlur = once(editor.input, "blur");
+  onBlur = once(editor.input, "blur");
   for (let ch of "red;") {
     EventUtils.sendChar(ch, ruleView.doc.defaultView);
   }
   yield onBlur;
   yield idRuleEditor.rule._applyingModifications;
 
   let props = ruleView.element.querySelectorAll(".ruleview-property");
   for (let i = 0; i < props.length; i++) {
@@ -114,17 +114,17 @@ function* testDisableProperty(inspector,
     name: "border-color"
   });
   is(newValue, "", "Border-color should have been unset.");
 
   info("Enabling the property again");
   propEditor.enable.click();
   yield idRuleEditor.rule._applyingModifications;
 
-  let newValue = yield executeInContent("Test:GetRulePropertyValue", {
+  newValue = yield executeInContent("Test:GetRulePropertyValue", {
     styleSheetIndex: 0,
     ruleIndex: 0,
     name: "border-color"
   });
   is(newValue, "red", "Border-color should have been reset.");
 }
 
 function* testPropertyStillMarkedDirty(inspector, ruleView) {
--- a/browser/devtools/styleinspector/test/browser_ruleview_keybindings.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_keybindings.js
@@ -22,27 +22,27 @@ let test = asyncTest(function*() {
   brace.click();
   yield onFocus;
 
   info("Entering a property name");
   let editor = getCurrentInplaceEditor(view);
   editor.input.value = "color";
 
   info("Typing ENTER to focus the next field: property value");
-  let onFocus = once(brace.parentNode, "focus", true);
+  onFocus = once(brace.parentNode, "focus", true);
   EventUtils.sendKey("return");
   yield onFocus;
   ok(true, "The value field was focused");
 
   info("Entering a property value");
-  let editor = getCurrentInplaceEditor(view);
+  editor = getCurrentInplaceEditor(view);
   editor.input.value = "green";
 
   info("Typing ENTER again should focus a new property name");
-  let onFocus = once(brace.parentNode, "focus", true);
+  onFocus = once(brace.parentNode, "focus", true);
   EventUtils.sendKey("return");
   yield onFocus;
   ok(true, "The new property name field was focused");
   getCurrentInplaceEditor(view).input.blur();
 });
 
 function getCurrentInplaceEditor(view) {
   return inplaceEditor(view.doc.activeElement);
--- a/browser/devtools/styleinspector/test/browser_ruleview_pseudo-element.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_pseudo-element.js
@@ -105,17 +105,17 @@ function* testTopLeft(inspector, view) {
   secondProp.setEnabled(true);
   yield elementAfterRule._applyingModifications;
 
   is(defaultView.getComputedStyle(element, ":after").getPropertyValue("padding-top"), "100px",
     "Enabled property should have been used.");
   is(defaultView.getComputedStyle(element).getPropertyValue("padding-top"), "32px",
     "Added property should not apply to element");
 
-  let firstProp = elementRuleView.addProperty("background-color", "rgb(0, 0, 255)", "");
+  firstProp = elementRuleView.addProperty("background-color", "rgb(0, 0, 255)", "");
   yield elementRule._applyingModifications;
 
   is(defaultView.getComputedStyle(element).getPropertyValue("background-color"), "rgb(0, 0, 255)",
     "Added property should have been used.");
   is(defaultView.getComputedStyle(element, ":after").getPropertyValue("background-color"), "rgb(0, 255, 0)",
     "Added prop does not apply to pseudo");
 }
 
--- a/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-attribute-change_01.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-attribute-change_01.js
@@ -33,17 +33,17 @@ let test = asyncTest(function*() {
   let ruleViewRefreshed = inspector.once("rule-view-refreshed");
   testElement.setAttribute("id", "differentid");
   yield ruleViewRefreshed;
 
   info("Checking that the rule-view doesn't have the #testid selector anymore");
   checkRuleViewContent(view, ["element", ".testclass"]);
 
   info("Reverting the ID attribute change");
-  let ruleViewRefreshed = inspector.once("rule-view-refreshed");
+  ruleViewRefreshed = inspector.once("rule-view-refreshed");
   testElement.setAttribute("id", "testid");
   yield ruleViewRefreshed;
 
   info("Checking that the rule-view has all the selectors again");
   checkRuleViewContent(view, ["element", "#testid", ".testclass"]);
 });
 
 function checkRuleViewContent(view, expectedSelectors) {
--- a/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-style-change.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-style-change.js
@@ -29,13 +29,13 @@ let test = asyncTest(function*() {
   let onUpdated = inspector.once("rule-view-refreshed");
   div.style.cssText = "font-size: 3em; color: lightgoldenrodyellow; text-align: right; text-transform: uppercase";
   yield onUpdated;
 
   let textAlign = getRuleViewPropertyValue(view, "element", "text-align");
   is(textAlign, "right", "The rule view shows the new text align.");
   let color = getRuleViewPropertyValue(view, "element", "color");
   is(color, "lightgoldenrodyellow", "The rule view shows the new color.")
-  let fontSize = getRuleViewPropertyValue(view, "element", "font-size");
+  fontSize = getRuleViewPropertyValue(view, "element", "font-size");
   is(fontSize, "3em", "The rule view shows the new font size.");
   let textTransform = getRuleViewPropertyValue(view, "element", "text-transform");
   is(textTransform, "uppercase", "The rule view shows the new text transform.");
 });
--- a/browser/devtools/styleinspector/test/browser_ruleview_selector-highlighter_02.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_selector-highlighter_02.js
@@ -58,25 +58,25 @@ let test = asyncTest(function*() {
   info("Checking that the HighlighterFront's show/hide methods are called");
   rView.highlighters._onMouseMove({target: selectorSpan});
   ok(HighlighterFront.isShown, "The highlighter is shown");
   rView.highlighters._onMouseLeave();
   ok(!HighlighterFront.isShown, "The highlighter is hidden");
 
   info("Checking that the right NodeFront reference and options are passed");
   yield selectNode("p", inspector);
-  let selectorSpan = getRuleViewSelector(rView, "p").firstElementChild;
+  selectorSpan = getRuleViewSelector(rView, "p").firstElementChild;
   rView.highlighters._onMouseMove({target: selectorSpan});
   is(HighlighterFront.nodeFront.tagName, "P",
     "The right NodeFront is passed to the highlighter (1)");
   is(HighlighterFront.options.selector, "p",
     "The right selector option is passed to the highlighter (1)");
 
   yield selectNode("body", inspector);
-  let selectorSpan = getRuleViewSelector(rView, "body").firstElementChild;
+  selectorSpan = getRuleViewSelector(rView, "body").firstElementChild;
   rView.highlighters._onMouseMove({target: selectorSpan});
   is(HighlighterFront.nodeFront.tagName, "BODY",
     "The right NodeFront is passed to the highlighter (2)");
   is(HighlighterFront.options.selector, "body",
     "The right selector option is passed to the highlighter (2)");
 
   info("Checking that the highlighter gets hidden when hovering somewhere else");
   let {valueSpan} = getRuleViewProperty(rView, "body", "background");
--- a/browser/devtools/styleinspector/test/browser_ruleview_urls-clickable.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_urls-clickable.js
@@ -26,17 +26,17 @@ function* selectNodes(inspector, ruleVie
   let inlineresolved = ".inline-resolved";
 
   yield selectNode(relative1, inspector);
   let relativeLink = ruleView.doc.querySelector(".ruleview-propertycontainer a");
   ok(relativeLink, "Link exists for relative1 node");
   is(relativeLink.getAttribute("href"), TEST_IMAGE, "href matches");
 
   yield selectNode(relative2, inspector);
-  let relativeLink = ruleView.doc.querySelector(".ruleview-propertycontainer a");
+  relativeLink = ruleView.doc.querySelector(".ruleview-propertycontainer a");
   ok(relativeLink, "Link exists for relative2 node");
   is(relativeLink.getAttribute("href"), TEST_IMAGE, "href matches");
 
   yield selectNode(absolute, inspector);
   let absoluteLink = ruleView.doc.querySelector(".ruleview-propertycontainer a");
   ok(absoluteLink, "Link exists for absolute node");
   is(absoluteLink.getAttribute("href"), TEST_IMAGE, "href matches");
 
--- a/browser/devtools/styleinspector/test/browser_ruleview_user-agent-styles.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_user-agent-styles.js
@@ -61,26 +61,26 @@ function* userAgentStylesVisible(inspect
   let userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable);
   let uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable);
   is (userRules.length, 1, "Correct number of user rules");
   ok (uaRules.length > 0, "Has UA rules");
 
   yield selectNode("pre", inspector);
   yield compareAppliedStylesWithUI(inspector, view, "ua");
 
-  let userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable);
-  let uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable);
+  userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable);
+  uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable);
   is (userRules.length, 1, "Correct number of user rules");
   ok (uaRules.length > 0, "Has UA rules");
 
   yield selectNode("a", inspector);
   yield compareAppliedStylesWithUI(inspector, view, "ua");
 
-  let userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable);
-  let uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable);
+  userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable);
+  uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable);
   is (userRules.length, 1, "Correct number of user rules");
 
   ok (userRules.some(rule=> rule.matchedSelectors.length === 0),
     "There is an inline style for element in user styles");
 
   ok (uaRules.some(rule=> rule.matchedSelectors.indexOf(":-moz-any-link")),
     "There is a rule for :-moz-any-link");
   ok (uaRules.some(rule=> rule.matchedSelectors.indexOf("*|*:link")),
@@ -98,26 +98,26 @@ function* userAgentStylesNotVisible(insp
   let userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable);
   let uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable);
   is (userRules.length, 1, "Correct number of user rules");
   is (uaRules.length, 0, "No UA rules");
 
   yield selectNode("pre", inspector);
   yield compareAppliedStylesWithUI(inspector, view);
 
-  let userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable);
-  let uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable);
+  userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable);
+  uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable);
   is (userRules.length, 1, "Correct number of user rules");
   is (uaRules.length, 0, "No UA rules");
 
   yield selectNode("a", inspector);
   yield compareAppliedStylesWithUI(inspector, view);
 
-  let userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable);
-  let uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable);
+  userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable);
+  uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable);
   is (userRules.length, 1, "Correct number of user rules");
   is (uaRules.length, 0, "No UA rules");
 }
 
 function* compareAppliedStylesWithUI(inspector, view, filter) {
   info ("Making sure that UI is consistent with pageStyle.getApplied");
 
   let entries = yield inspector.pageStyle.getApplied(inspector.selection.nodeFront, {
--- a/browser/devtools/styleinspector/test/browser_styleinspector_csslogic-content-stylesheets.js
+++ b/browser/devtools/styleinspector/test/browser_styleinspector_csslogic-content-stylesheets.js
@@ -29,18 +29,18 @@ let test = asyncTest(function*() {
   info("Checking stylesheets");
   yield checkSheets(target);
 
   info("Checking stylesheets on XUL document");
   info("Allowing XUL content");
   allowXUL();
   yield addTab(TEST_URI_XUL);
 
-  let {toolbox, inspector, view} = yield openRuleView();
-  let target = getNode("#target");
+  ({toolbox, inspector, view} = yield openRuleView());
+  target = getNode("#target");
   yield selectNode("#target", inspector);
 
   yield checkSheets(target);
   info("Disallowing XUL content");
   disallowXUL();
 });
 
 function allowXUL() {
--- a/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-background-image.js
+++ b/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-background-image.js
@@ -37,17 +37,17 @@ let test = asyncTest(function*() {
   yield selectNode(".test-element", inspector);
   info("Testing the the background property on the .test-element rule");
   yield testDivRuleView(view);
 
   info("Testing that image preview tooltips show even when there are fields being edited");
   yield testTooltipAppearsEvenInEditMode(view);
 
   info("Switching over to the computed-view");
-  let {view} = yield openComputedView();
+  ({view} = yield openComputedView());
 
   info("Testing that the background-image computed style has a tooltip too");
   yield testComputedView(view);
 });
 
 function* testBodyRuleView(view) {
   info("Testing tooltips in the rule view");
   let panel = view.tooltips.previewTooltip.panel;
--- a/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-closes-on-new-selection.js
+++ b/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-closes-on-new-selection.js
@@ -11,17 +11,17 @@ let test = asyncTest(function*() {
 
   let {toolbox, inspector, view} = yield openRuleView();
   yield selectNode(".one", inspector);
 
   info("Testing rule view tooltip closes on new selection");
   yield testRuleView(view, inspector);
 
   info("Testing computed view tooltip closes on new selection");
-  let {view} = yield openComputedView();
+  ({view} = yield openComputedView());
   yield testComputedView(view, inspector);
 });
 
 function* testRuleView(ruleView, inspector) {
   info("Showing the tooltip");
   let tooltip = ruleView.tooltips.previewTooltip;
   let onShown = tooltip.once("shown");
   tooltip.show();
--- a/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-longhand-fontfamily.js
+++ b/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-longhand-fontfamily.js
@@ -27,17 +27,17 @@ let test = asyncTest(function*() {
   let {toolbox, inspector, view} = yield openRuleView();
 
   info("Selecting the test node");
   yield selectNode("#testElement", inspector);
 
   yield testRuleView(view, inspector.selection.nodeFront);
 
   info("Opening the computed view");
-  let {toolbox, inspector, view} = yield openComputedView();
+  ({toolbox, inspector, view} = yield openComputedView());
 
   yield testComputedView(view, inspector.selection.nodeFront);
 
   yield testExpandedComputedViewProperty(view, inspector.selection.nodeFront);
 });
 
 function* testRuleView(ruleView, nodeFront) {
   info("Testing font-family tooltips in the rule view");
--- a/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-01.js
+++ b/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-01.js
@@ -26,17 +26,17 @@ let test = asyncTest(function*() {
   ok(!overlay.highlighters[TYPE], "No highlighter exists in the rule-view");
   let h = yield overlay._getHighlighter(TYPE);
   ok(overlay.highlighters[TYPE], "The highlighter has been created in the rule-view");
   is(h, overlay.highlighters[TYPE], "The right highlighter has been created");
   let h2 = yield overlay._getHighlighter(TYPE);
   is(h, h2, "The same instance of highlighter is returned everytime in the rule-view");
 
   let {view: cView} = yield openComputedView();
-  let overlay = cView.highlighters;
+  overlay = cView.highlighters;
 
   ok(!overlay.highlighters[TYPE], "No highlighter exists in the computed-view");
-  let h = yield overlay._getHighlighter(TYPE);
+  h = yield overlay._getHighlighter(TYPE);
   ok(overlay.highlighters[TYPE], "The highlighter has been created in the computed-view");
   is(h, overlay.highlighters[TYPE], "The right highlighter has been created");
-  let h2 = yield overlay._getHighlighter(TYPE);
+  h2 = yield overlay._getHighlighter(TYPE);
   is(h, h2, "The same instance of highlighter is returned everytime in the computed-view");
 });
--- a/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-02.js
+++ b/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-02.js
@@ -31,33 +31,33 @@ let test = asyncTest(function*() {
 
   info("Faking a mousemove on a non-transform property");
   let {valueSpan} = getRuleViewProperty(rView, "body", "color");
   hs._onMouseMove({target: valueSpan});
   ok(!hs.highlighters[TYPE], "No highlighter exists in the rule-view (2)");
   ok(!hs.promises[TYPE], "No highlighter is being created in the rule-view (2)");
 
   info("Faking a mousemove on a transform property");
-  let {valueSpan} = getRuleViewProperty(rView, "body", "transform");
+  ({valueSpan} = getRuleViewProperty(rView, "body", "transform"));
   hs._onMouseMove({target: valueSpan});
   ok(hs.promises[TYPE], "The highlighter is being initialized");
   let h = yield hs.promises[TYPE];
   is(h, hs.highlighters[TYPE], "The initialized highlighter is the right one");
 
   let {view: cView} = yield openComputedView();
-  let hs = cView.highlighters;
+  hs = cView.highlighters;
 
   ok(!hs.highlighters[TYPE], "No highlighter exists in the computed-view (1)");
   ok(!hs.promises[TYPE], "No highlighter is being created in the computed-view (1)");
 
   info("Faking a mousemove on a non-transform property");
-  let {valueSpan} = getComputedViewProperty(cView, "color");
+  ({valueSpan} = getComputedViewProperty(cView, "color"));
   hs._onMouseMove({target: valueSpan});
   ok(!hs.highlighters[TYPE], "No highlighter exists in the computed-view (2)");
   ok(!hs.promises[TYPE], "No highlighter is being created in the computed-view (2)");
 
   info("Faking a mousemove on a transform property");
-  let {valueSpan} = getComputedViewProperty(cView, "transform");
+  ({valueSpan} = getComputedViewProperty(cView, "transform"));
   hs._onMouseMove({target: valueSpan});
   ok(hs.promises[TYPE], "The highlighter is being initialized");
-  let h = yield hs.promises[TYPE];
+  h = yield hs.promises[TYPE];
   is(h, hs.highlighters[TYPE], "The initialized highlighter is the right one");
 });
--- a/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-03.js
+++ b/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-03.js
@@ -68,24 +68,24 @@ let test = asyncTest(function*() {
   is(HighlighterFront.nbOfTimesShown, nb + 1, "The highlighter was shown once");
   rView.highlighters._onMouseMove({target: valueSpan});
   rView.highlighters._onMouseMove({target: valueSpan});
   is(HighlighterFront.nbOfTimesShown, nb + 1,
     "The highlighter was shown once, after several mousemove");
 
   info("Checking that the right NodeFront reference is passed");
   yield selectNode("html", inspector);
-  let {valueSpan} = getRuleViewProperty(rView, "html", "transform");
+  ({valueSpan} = getRuleViewProperty(rView, "html", "transform"));
   rView.highlighters._onMouseMove({target: valueSpan});
   is(HighlighterFront.nodeFront.tagName, "HTML",
     "The right NodeFront is passed to the highlighter (1)");
 
   yield selectNode("body", inspector);
-  let {valueSpan} = getRuleViewProperty(rView, "body", "transform");
+  ({valueSpan} = getRuleViewProperty(rView, "body", "transform"));
   rView.highlighters._onMouseMove({target: valueSpan});
   is(HighlighterFront.nodeFront.tagName, "BODY",
     "The right NodeFront is passed to the highlighter (2)");
 
   info("Checking that the highlighter gets hidden when hovering a non-transform property");
-  let {valueSpan} = getRuleViewProperty(rView, "body", "color");
+  ({valueSpan} = getRuleViewProperty(rView, "body", "color"));
   rView.highlighters._onMouseMove({target: valueSpan});
   ok(!HighlighterFront.isShown, "The highlighter is hidden");
 });
--- a/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-04.js
+++ b/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-04.js
@@ -43,20 +43,20 @@ let test = asyncTest(function*() {
 
   info("Disabling the applied property");
   let classRuleEditor = getRuleViewRuleEditor(rView, 1);
   let propEditor = classRuleEditor.rule.textProps[0].editor;
   propEditor.enable.click();
   yield classRuleEditor.rule._applyingModifications;
 
   info("Faking a mousemove on the disabled property");
-  let {valueSpan} = getRuleViewProperty(rView, ".test", "transform");
+  ({valueSpan} = getRuleViewProperty(rView, ".test", "transform"));
   hs._onMouseMove({target: valueSpan});
   ok(!hs.highlighters[TYPE], "No highlighter was created for the disabled property");
   ok(!hs.promises[TYPE], "And no highlighter is being initialized either");
 
   info("Faking a mousemove on the now unoverriden property");
-  let {valueSpan} = getRuleViewProperty(rView, "div", "transform");
+  ({valueSpan} = getRuleViewProperty(rView, "div", "transform"));
   hs._onMouseMove({target: valueSpan});
   ok(hs.promises[TYPE], "The highlighter is being initialized now");
   let h = yield hs.promises[TYPE];
   is(h, hs.highlighters[TYPE], "The initialized highlighter is the right one");
 });
--- a/browser/devtools/webaudioeditor/test/browser_audionode-actor-get-set-param.js
+++ b/browser/devtools/webaudioeditor/test/browser_audionode-actor-get-set-param.js
@@ -14,27 +14,27 @@ function spawnTest () {
 
   let freq = yield oscNode.getParam("frequency");
   info(typeof freq);
   ise(freq, 440, "AudioNode:getParam correctly fetches AudioParam");
 
   let type = yield oscNode.getParam("type");
   ise(type, "sine", "AudioNode:getParam correctly fetches non-AudioParam");
 
-  let type = yield oscNode.getParam("not-a-valid-param");
+  type = yield oscNode.getParam("not-a-valid-param");
   ok(type.type === "undefined",
     "AudioNode:getParam correctly returns a grip value for `undefined` for an invalid param.");
 
   let resSuccess = yield oscNode.setParam("frequency", 220);
-  let freq = yield oscNode.getParam("frequency");
+  freq = yield oscNode.getParam("frequency");
   ise(freq, 220, "AudioNode:setParam correctly sets a `number` AudioParam");
   is(resSuccess, undefined, "AudioNode:setParam returns undefined for correctly set AudioParam");
 
   resSuccess = yield oscNode.setParam("type", "square");
-  let type = yield oscNode.getParam("type");
+  type = yield oscNode.getParam("type");
   ise(type, "square", "AudioNode:setParam correctly sets a `string` non-AudioParam");
   is(resSuccess, undefined, "AudioNode:setParam returns undefined for correctly set AudioParam");
 
   try {
     yield oscNode.setParam("frequency", "hello");
     ok(false, "setParam with invalid types should throw");
   } catch (e) {
     ok(/is not a finite floating-point/.test(e.message), "AudioNode:setParam returns error with correct message when attempting an invalid assignment");
--- a/browser/devtools/webaudioeditor/test/browser_wa_reset-01.js
+++ b/browser/devtools/webaudioeditor/test/browser_wa_reset-01.js
@@ -35,18 +35,18 @@ function spawnTest() {
 
   is($("#reload-notice").hidden, true,
     "The 'reload this page' notice should be hidden after context found.");
   is($("#waiting-notice").hidden, true,
     "The 'waiting for an audio context' notice should be hidden after context found.");
   is($("#content").hidden, false,
     "The tool's content should not be hidden anymore.");
 
-  let navigating = once(target, "will-navigate");
-  let started = once(gFront, "start-context");
+  navigating = once(target, "will-navigate");
+  started = once(gFront, "start-context");
 
   reload(target);
 
   yield Promise.all([navigating, started]);
 
   is($("#reload-notice").hidden, true,
     "The 'reload this page' notice should be hidden after context found after reload.");
   is($("#waiting-notice").hidden, true,
--- a/browser/devtools/webaudioeditor/test/browser_wa_reset-02.js
+++ b/browser/devtools/webaudioeditor/test/browser_wa_reset-02.js
@@ -19,20 +19,20 @@ function spawnTest() {
   ]);
 
   let { nodes, edges } = countGraphObjects(panelWin);
   ise(nodes, 3, "should only be 3 nodes.");
   ise(edges, 2, "should only be 2 edges.");
 
   reload(target);
 
-  let [actors] = yield Promise.all([
+  [actors] = yield Promise.all([
     get3(gFront, "create-node"),
     waitForGraphRendered(panelWin, 3, 2)
   ]);
 
-  let { nodes, edges } = countGraphObjects(panelWin);
+  ({ nodes, edges } = countGraphObjects(panelWin));
   ise(nodes, 3, "after reload, should only be 3 nodes.");
   ise(edges, 2, "after reload, should only be 2 edges.");
 
   yield teardown(panel);
   finish();
 }
--- a/browser/devtools/webaudioeditor/test/browser_wa_reset-03.js
+++ b/browser/devtools/webaudioeditor/test/browser_wa_reset-03.js
@@ -24,21 +24,21 @@ function spawnTest() {
   is(WebAudioInspectorView.getCurrentAudioNode().id, nodeIds[1], "InspectorView has correct node set.");
 
   /**
    * Reload
    */
 
   reload(target);
 
-  let [actors] = yield Promise.all([
+  [actors] = yield Promise.all([
     get3(gFront, "create-node"),
     waitForGraphRendered(panelWin, 3, 2)
   ]);
-  let nodeIds = actors.map(actor => actor.actorID);
+  nodeIds = actors.map(actor => actor.actorID);
 
   ok(!WebAudioInspectorView.isVisible(), "InspectorView hidden on start.");
   ise(WebAudioInspectorView.getCurrentAudioNode(), null,
     "InspectorView has no current node set on reset.");
 
   yield clickGraphNode(panelWin, nodeIds[2], true);
   ok(WebAudioInspectorView.isVisible(),
     "InspectorView visible after selecting a node after a reset.");
--- a/browser/devtools/webaudioeditor/test/browser_wa_reset-04.js
+++ b/browser/devtools/webaudioeditor/test/browser_wa_reset-04.js
@@ -32,17 +32,17 @@ function spawnTest() {
 
   is($("#reload-notice").hidden, false,
     "The 'reload this page' notice should still be visible when switching to a frame.");
   is($("#waiting-notice").hidden, true,
     "The 'waiting for an audio context' notice should be kept hidden when switching to a frame.");
   is($("#content").hidden, true,
     "The tool's content should still be hidden.");
 
-  let navigating = once(target, "will-navigate");
+  navigating = once(target, "will-navigate");
   let started = once(gFront, "start-context");
 
   reload(target);
 
   yield Promise.all([navigating, started]);
 
   is($("#reload-notice").hidden, true,
     "The 'reload this page' notice should be hidden after reloading the frame.");
--- a/browser/devtools/webaudioeditor/test/browser_webaudio-actor-connect-param.js
+++ b/browser/devtools/webaudioeditor/test/browser_webaudio-actor-connect-param.js
@@ -2,17 +2,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Test the `connect-param` event on the web audio actor.
  */
 
 function spawnTest () {
   let [target, debuggee, front] = yield initBackend(CONNECT_PARAM_URL);
-  let [_, _, [destNode, carrierNode, modNode, gainNode], _, connectParam] = yield Promise.all([
+  let [, , [destNode, carrierNode, modNode, gainNode], , connectParam] = yield Promise.all([
     front.setup({ reload: true }),
     once(front, "start-context"),
     getN(front, "create-node", 4),
     get2(front, "connect-node"),
     once(front, "connect-param")
   ]);
 
   info(connectParam);
--- a/browser/devtools/webaudioeditor/test/browser_webaudio-actor-destroy-node.js
+++ b/browser/devtools/webaudioeditor/test/browser_webaudio-actor-destroy-node.js
@@ -4,17 +4,17 @@
 /**
  * Test `destroy-node` event on WebAudioActor.
  */
 
 function spawnTest () {
   let [target, debuggee, front] = yield initBackend(DESTROY_NODES_URL);
 
   let waitUntilDestroyed = getN(front, "destroy-node", 10);
-  let [_, _, created] = yield Promise.all([
+  let [, , created] = yield Promise.all([
     front.setup({ reload: true }),
     once(front, "start-context"),
     // Should create 1 destination node and 10 disposable buffer nodes
     getN(front, "create-node", 13)
   ]);
 
   // Force CC so we can ensure it's run to clear out dead AudioNodes
   forceCC();
--- a/browser/devtools/webaudioeditor/test/browser_webaudio-actor-simple.js
+++ b/browser/devtools/webaudioeditor/test/browser_webaudio-actor-simple.js
@@ -21,15 +21,15 @@ function spawnTest () {
   is(destType, "AudioDestinationNode", "WebAudioActor:create-node returns AudioNodeActor for AudioDestination");
   is(oscType, "OscillatorNode", "WebAudioActor:create-node returns AudioNodeActor");
   is(gainType, "GainNode", "WebAudioActor:create-node returns AudioNodeActor");
 
   let { source, dest } = connect1;
   is(source.actorID, oscNode.actorID, "WebAudioActor:connect-node returns correct actor with ID on source (osc->gain)");
   is(dest.actorID, gainNode.actorID, "WebAudioActor:connect-node returns correct actor with ID on dest (osc->gain)");
 
-  let { source, dest } = connect2;
+  ({ source, dest } = connect2);
   is(source.actorID, gainNode.actorID, "WebAudioActor:connect-node returns correct actor with ID on source (gain->dest)");
   is(dest.actorID, destNode.actorID, "WebAudioActor:connect-node returns correct actor with ID on dest (gain->dest)");
 
   yield removeTab(target.tab);
   finish();
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_586388_select_all.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_586388_select_all.js
@@ -75,17 +75,17 @@ function test() {
     let selectAllItem = contextMenu.querySelector("*[command='cmd_selectAll']");
     ok(selectAllItem != null,
        "the context menu on the output node has a \"Select All\" item");
 
     outputNode.focus();
 
     selectAllItem.doCommand();
 
-    let selectedCount = hud.ui.output.getSelectedMessages().length;
+    selectedCount = hud.ui.output.getSelectedMessages().length;
     is(selectedCount, outputNode.childNodes.length,
        "all console messages are selected after performing a select-all " +
        "operation from the context menu");
 
     hud.iframeWindow.getSelection().removeAllRanges();
 
     finishTest();
   }
--- a/browser/devtools/webconsole/test/browser_webconsole_network_panel.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_network_panel.js
@@ -355,17 +355,17 @@ function testGen() {
     requestCookie: true,
     responseContainer: true,
     responseBody: false,
     responseNoBody: false,
     responseImage: false,
     responseImageCached: true
   });
 
-  let imgNode = networkPanel.document.getElementById("responseImageCachedNode");
+  imgNode = networkPanel.document.getElementById("responseImageCachedNode");
   is(imgNode.getAttribute("src"), "data:image/png;base64," + TEST_IMG_BASE64,
      "Displayed image is correct");
 
   networkPanel.panel.hidePopup();
 
   // Test sent form data.
   info("test 9: sent form data");
   httpActivity.request.postData.text = [
--- a/browser/devtools/webconsole/test/browser_webconsole_split.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_split.js
@@ -112,17 +112,17 @@ function test()
       is (currentUIState.deckHeight, 0, "Deck has a height == 0 when console is opened.");
       is (currentUIState.webconsoleHeight, currentUIState.containerHeight, "Web console is full height.");
       ok (currentUIState.openedConsolePanel, "The console panel is the current tool");
       ok (currentUIState.buttonSelected, "The command button is still selected.");
 
       // Make sure splitting console does nothing while webconsole is opened
       toolbox.toggleSplitConsole();
 
-      let currentUIState = getCurrentUIState();
+      currentUIState = getCurrentUIState();
 
       ok (!currentUIState.splitterVisibility, "Splitter is hidden when console is opened.");
       is (currentUIState.deckHeight, 0, "Deck has a height == 0 when console is opened.");
       is (currentUIState.webconsoleHeight, currentUIState.containerHeight, "Web console is full height.");
       ok (currentUIState.openedConsolePanel, "The console panel is the current tool");
       ok (currentUIState.buttonSelected, "The command button is still selected.");
 
       // Make sure that split state is saved after opening another panel
@@ -171,30 +171,30 @@ function test()
     ok (!currentUIState.splitterVisibility, "Splitter is hidden by default");
     is (currentUIState.deckHeight, currentUIState.containerHeight, "Deck has a height > 0 by default");
     is (currentUIState.webconsoleHeight, 0, "Web console is collapsed by default");
     ok (!currentUIState.openedConsolePanel, "The console panel is not the current tool");
     ok (!currentUIState.buttonSelected, "The command button is not selected.");
 
     toolbox.toggleSplitConsole();
 
-    let currentUIState = getCurrentUIState();
+    currentUIState = getCurrentUIState();
 
     ok (currentUIState.splitterVisibility, "Splitter is visible when console is split");
     ok (currentUIState.deckHeight > 0, "Deck has a height > 0 when console is split");
     ok (currentUIState.webconsoleHeight > 0, "Web console has a height > 0 when console is split");
     is (Math.round(currentUIState.deckHeight + currentUIState.webconsoleHeight),
           currentUIState.containerHeight,
         "Everything adds up to container height");
     ok (!currentUIState.openedConsolePanel, "The console panel is not the current tool");
     ok (currentUIState.buttonSelected, "The command button is selected.");
 
     toolbox.toggleSplitConsole();
 
-    let currentUIState = getCurrentUIState();
+    currentUIState = getCurrentUIState();
 
     ok (!currentUIState.splitterVisibility, "Splitter is hidden after toggling");
     is (currentUIState.deckHeight, currentUIState.containerHeight, "Deck has a height > 0 after toggling");
     is (currentUIState.webconsoleHeight, 0, "Web console is collapsed after toggling");
     ok (!currentUIState.openedConsolePanel, "The console panel is not the current tool");
     ok (!currentUIState.buttonSelected, "The command button is not selected.");
   }
 
--- a/browser/devtools/webconsole/test/browser_webconsole_split_focus.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_split_focus.js
@@ -28,26 +28,26 @@ function test() {
     activeElement = activeElement.ownerDocument.getBindingParent(activeElement);
     is (activeElement, inspector.searchBox, "Search box is focused");
 
     yield toolbox.openSplitConsole();
 
     ok(toolbox.splitConsole, "Split console is now visible");
 
     // Use the binding element since jsterm.inputNode is a XUL textarea element.
-    let activeElement = getActiveElement(toolbox.doc);
+    activeElement = getActiveElement(toolbox.doc);
     activeElement = activeElement.ownerDocument.getBindingParent(activeElement);
     let inputNode = toolbox.getPanel("webconsole").hud.jsterm.inputNode;
     is(activeElement, inputNode, "Split console input is focused by default");
 
     yield toolbox.closeSplitConsole();
 
     info ("Making sure that the search box is refocused after closing the split console");
     // Use the binding element since inspector.searchBox is a XUL element.
-    let activeElement = getActiveElement(inspector.panelDoc);
+    activeElement = getActiveElement(inspector.panelDoc);
     activeElement = activeElement.ownerDocument.getBindingParent(activeElement);
     is (activeElement, inspector.searchBox, "Search box is focused");
 
     yield toolbox.destroy();
   }
 
   function getActiveElement(doc) {
     let activeElement = doc.activeElement;
--- a/browser/devtools/webconsole/test/browser_webconsole_split_persist.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_split_persist.js
@@ -25,18 +25,18 @@ function test() {
     ok(getVisiblePrefValue(), "Visibility pref is true");
 
     is(getHeightPrefValue(), toolbox.webconsolePanel.height, "Panel height matches the pref");
     toolbox.webconsolePanel.height = 200;
 
     yield toolbox.destroy();
 
     info("Opening a tab while there is a true user setting on split console pref");
-    let {tab} = yield loadTab(TEST_URI);
-    let target = TargetFactory.forTab(tab);
+    ({tab} = yield loadTab(TEST_URI));
+    target = TargetFactory.forTab(tab);
     toolbox = yield gDevTools.showToolbox(target, "inspector");
 
     ok(toolbox.splitConsole, "Split console is visible by default.");
     ok(isCommandButtonChecked(), "Split console button is checked by default.");
     is(getHeightPrefValue(), 200, "Height is set based on panel height after closing");
 
     // Use the binding element since jsterm.inputNode is a XUL textarea element.
     let activeElement = getActiveElement(toolbox.doc);
@@ -58,18 +58,18 @@ function test() {
     ok(!getVisiblePrefValue(), "Visibility pref is false");
 
     yield toolbox.destroy();
 
     is(getHeightPrefValue(), 10000, "Height is set based on panel height after closing");
 
 
     info("Opening a tab while there is a false user setting on split console pref");
-    let {tab} = yield loadTab(TEST_URI);
-    let target = TargetFactory.forTab(tab);
+    ({tab} = yield loadTab(TEST_URI));
+    target = TargetFactory.forTab(tab);
     toolbox = yield gDevTools.showToolbox(target, "inspector");
 
     ok(!toolbox.splitConsole, "Split console is hidden by default.");
     ok(!getVisiblePrefValue(), "Visibility pref is false");
 
     yield toolbox.destroy();
   }
 
--- a/browser/devtools/webconsole/test/head.js
+++ b/browser/devtools/webconsole/test/head.js
@@ -343,29 +343,29 @@ function finishTest()
   if (browserConsole) {
     if (browserConsole.jsterm) {
       browserConsole.jsterm.clearOutput(true);
     }
     HUDService.toggleBrowserConsole().then(finishTest);
     return;
   }
 
-  let hud = HUDService.getHudByWindow(content);
-  if (!hud) {
+  let contentHud = HUDService.getHudByWindow(content);
+  if (!contentHud) {
     finish();
     return;
   }
 
-  if (hud.jsterm) {
-    hud.jsterm.clearOutput(true);
+  if (contentHud.jsterm) {
+    contentHud.jsterm.clearOutput(true);
   }
 
-  closeConsole(hud.target.tab, finish);
+  closeConsole(contentHud.target.tab, finish);
 
-  hud = null;
+  contentHud = null;
 }
 
 function tearDown()
 {
   dumpConsoles();
 
   if (HUDService.getBrowserConsole()) {
     HUDService.toggleBrowserConsole();
--- a/browser/devtools/webide/test/test_newapp.html
+++ b/browser/devtools/webide/test/test_newapp.html
@@ -23,17 +23,17 @@
             let tmpDir = FileUtils.getDir("TmpD", []);
             yield win.Cmds.newApp({
               index: 0,
               name: "webideTmpApp",
               folder: tmpDir
             });
 
             let project = win.AppManager.selectedProject;
-            let tmpDir = FileUtils.getDir("TmpD", ["webidetmpapp"]);
+            tmpDir = FileUtils.getDir("TmpD", ["webidetmpapp"]);
             ok(tmpDir.isDirectory(), "Directory created");
             is(project.location, tmpDir.path, "Location is valid (and lowercase)");
             is(project.name, "webideTmpApp", "name field has been updated");
 
             // Clean up
             tmpDir.remove(true);
             yield closeWebIDE(win);
             yield removeAllProjects();
--- a/browser/experiments/test/xpcshell/test_activate.js
+++ b/browser/experiments/test/xpcshell/test_activate.js
@@ -121,17 +121,17 @@ add_task(function* test_startStop() {
   Assert.equal(changes, experiment.ADDON_CHANGE_INSTALL, "Add-on was installed.");
   addons = yield getExperimentAddons();
   Assert.equal(experiment.enabled, true, "Experiment should now be enabled.");
   Assert.equal(addons.length, 1, "1 experiment add-on is installed.");
   Assert.equal(addons[0].id, experiment._addonId, "The add-on is the one we expect.");
   Assert.equal(addons[0].userDisabled, false, "The add-on is not userDisabled.");
   Assert.ok(addons[0].isActive, "The add-on is active.");
 
-  let result = yield experiment.shouldStop();
+  result = yield experiment.shouldStop();
   Assert.equal(result.shouldStop, false, "shouldStop should be false.");
   Assert.equal(experiment.enabled, true, "Experiment should be enabled.");
   addons = yield getExperimentAddons();
   Assert.equal(addons.length, 1, "Experiment still in add-ons manager.");
   Assert.ok(addons[0].isActive, "The add-on is still active.");
 
   defineNow(gPolicy, futureDate(endDate, MS_IN_ONE_DAY));
   result = yield experiment.shouldStop();
@@ -151,13 +151,13 @@ add_task(function* test_startStop() {
   } catch (ex) {
     errored = true;
   }
   Assert.ok(experiment._failedStart, "Experiment failed to start.");
   Assert.ok(errored, "start() threw an exception.");
 
   // Make sure "ignore hashes" mode works.
   gPolicy.ignoreHashes = true;
-  let changes = yield experiment.start();
+  changes = yield experiment.start();
   Assert.equal(changes, experiment.ADDON_CHANGE_INSTALL);
   yield experiment.stop();
   gPolicy.ignoreHashes = false;
 });
--- a/browser/experiments/test/xpcshell/test_api.js
+++ b/browser/experiments/test/xpcshell/test_api.js
@@ -1627,30 +1627,30 @@ add_task(function* test_foreignUninstall
 
   addons = yield getExperimentAddons();
   Assert.equal(addons.length, 1, "A single experiment add-on is installed.");
   Assert.ok(addons[0].isActive, "That experiment is active.");
 
   yield AddonTestUtils.uninstallAddonByID(EXPERIMENT1_ID);
   yield experiments._mainTask;
 
-  let addons = yield getExperimentAddons();
+  addons = yield getExperimentAddons();
   Assert.equal(addons.length, 0, "Experiment add-on should have been removed.");
 
   experimentList = yield experiments.getExperiments();
   Assert.equal(experimentList.length, 1, "A single experiment is known.");
   Assert.equal(experimentList[0].id, EXPERIMENT1_ID, "Experiment 1 should be the sole entry.");
   Assert.ok(!experimentList[0].active, "Experiment 1 should not be active anymore.");
 
   // Fake restart behaviour.
   yield promiseRestartManager();
   experiments = new Experiments.Experiments(gPolicy);
   yield experiments.updateManifest();
 
-  let addons = yield getExperimentAddons();
+  addons = yield getExperimentAddons();
   Assert.equal(addons.length, 0, "No experiment add-ons installed.");
 
   experimentList = yield experiments.getExperiments();
   Assert.equal(experimentList.length, 1, "A single experiment is known.");
   Assert.equal(experimentList[0].id, EXPERIMENT1_ID, "Experiment 1 should be the sole entry.");
   Assert.ok(!experimentList[0].active, "Experiment 1 should not be active.");
 
   yield testCleanup(experiments);
--- a/browser/modules/test/browser_ContentSearch.js
+++ b/browser/modules/test/browser_ContentSearch.js
@@ -54,17 +54,17 @@ add_task(function* SetCurrentEngine() {
   yield deferred.promise;
   let msg = yield searchPromise;
   checkMsg(msg, {
     type: "CurrentEngine",
     data: yield currentEngineObj(newCurrentEngine),
   });
 
   Services.search.currentEngine = oldCurrentEngine;
-  let msg = yield waitForTestMsg("CurrentEngine");
+  msg = yield waitForTestMsg("CurrentEngine");
   checkMsg(msg, {
     type: "CurrentEngine",
     data: yield currentEngineObj(oldCurrentEngine),
   });
 });
 
 add_task(function* ManageEngines() {
   yield addTab();
--- a/browser/modules/test/browser_UITour2.js
+++ b/browser/modules/test/browser_UITour2.js
@@ -73,17 +73,17 @@ let tests = [
     isnot(tabInfo, null, "Should have recorded data about a pinned tab after addPinnedTab()");
     isnot(tabInfo.tab, null, "Should have added a pinned tab after addPinnedTab()");
     is(tabInfo.tab.pinned, true, "Tab should be marked as pinned");
 
     let tab = tabInfo.tab;
 
     gContentAPI.removePinnedTab();
     isnot(gBrowser.tabs[0], tab, "First tab should not be the pinned tab");
-    let tabInfo = UITour.pinnedTabs.get(window);
+    tabInfo = UITour.pinnedTabs.get(window);
     is(tabInfo, null, "Should not have any data about the removed pinned tab after removePinnedTab()");
 
     gContentAPI.addPinnedTab();
     gContentAPI.addPinnedTab();
     gContentAPI.addPinnedTab();
     is(gBrowser.tabs[1].pinned, false, "After multiple calls of addPinnedTab, should still only have one pinned tab");
 
     done();
--- a/caps/tests/mochitest/test_disableScript.xul
+++ b/caps/tests/mochitest/test_disableScript.xul
@@ -93,17 +93,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   function setScriptEnabledForDocShell(win, enabled) {
     win.QueryInterface(Ci.nsIInterfaceRequestor)
        .getInterface(Ci.nsIDocShell)
        .allowJavascript = enabled;
   }
 
   function testList(expectEnabled, win, list, idx) {
-    let idx = idx || 0;
+    idx = idx || 0;
     let deferred = Promise.defer();
     let target = list[idx] + path;
     info("Testing scriptability for: " + target + ". expecting " + expectEnabled);
     navigateFrame(win.frameElement, target).then(function() {
       checkScriptEnabled(win, expectEnabled);
       if (idx == list.length - 1)
         deferred.resolve();
       else
--- a/dom/cellbroadcast/tests/marionette/test_cellbroadcast_gsm.js
+++ b/dom/cellbroadcast/tests/marionette/test_cellbroadcast_gsm.js
@@ -109,26 +109,26 @@ function testReceiving_GSM_MessageId() {
 }
 
 function testReceiving_GSM_Language_and_Body() {
   log("Test receiving GSM Cell Broadcast - Language & Body");
 
   let promise = Promise.resolve();
 
   let testDcs = [];
-  dcs = 0;
+  let dcs = 0;
   while (dcs <= 0xFF) {
     try {
       let dcsInfo = { dcs: dcs };
       [ dcsInfo.encoding, dcsInfo.language,
         dcsInfo.indicator, dcsInfo.messageClass ] = decodeGsmDataCodingScheme(dcs);
       testDcs.push(dcsInfo);
     } catch (e) {
       // Unsupported coding group, skip.
-      let dcs = (dcs & PDU_DCS_CODING_GROUP_BITS) + 0x10;
+      dcs = (dcs & PDU_DCS_CODING_GROUP_BITS) + 0x10;
     }
     dcs++;
   }
 
   let verifyCBMessage = (aMessage, aDcsInfo) => {
     if (aDcsInfo.language) {
       is(aMessage.language, aDcsInfo.language, "aMessage.language");
     } else if (aDcsInfo.indicator) {
--- a/dom/cellbroadcast/tests/marionette/test_cellbroadcast_umts.js
+++ b/dom/cellbroadcast/tests/marionette/test_cellbroadcast_umts.js
@@ -125,26 +125,26 @@ function testReceiving_UMTS_MessageId() 
 }
 
 function testReceiving_UMTS_Language_and_Body() {
   log("Test receiving UMTS Cell Broadcast - Language & Body");
 
   let promise = Promise.resolve();
 
   let testDcs = [];
-  dcs = 0;
+  let dcs = 0;
   while (dcs <= 0xFF) {
     try {
       let dcsInfo = { dcs: dcs };
       [ dcsInfo.encoding, dcsInfo.language,
         dcsInfo.indicator, dcsInfo.messageClass ] = decodeGsmDataCodingScheme(dcs);
       testDcs.push(dcsInfo);
     } catch (e) {
       // Unsupported coding group, skip.
-      let dcs = (dcs & PDU_DCS_CODING_GROUP_BITS) + 0x10;
+      dcs = (dcs & PDU_DCS_CODING_GROUP_BITS) + 0x10;
     }
     dcs++;
   }
 
   let verifyCBMessage = (aMessage, aDcsInfo) => {
     if (aDcsInfo.language) {
       is(aMessage.language, aDcsInfo.language, "aMessage.language");
     } else if (aDcsInfo.indicator) {
--- a/dom/indexedDB/test/error_events_abort_transactions_iframe.html
+++ b/dom/indexedDB/test/error_events_abort_transactions_iframe.html
@@ -91,30 +91,30 @@
       is(originalRequest.transaction, trans, "request.transaction should still be set");
 
       event = yield undefined;
       is(event.type, "error", "Got request error event");
       is(event.target, originalRequest, "error event has right target");
       is(event.target.error.name, "ConstraintError", "Right error");
       is(originalRequest.transaction, null, "request.transaction should now be null");
 
-      let request = indexedDB.open(window.location.pathname, 1);
+      request = indexedDB.open(window.location.pathname, 1);
       request.onerror = errorHandler;
       request.onupgradeneeded = grabEventAndContinueHandler;
-      let event = yield undefined;
+      event = yield undefined;
 
-      let db = event.target.result;
+      db = event.target.result;
 
       event.target.transaction.oncomplete = grabEventAndContinueHandler;
       event.target.transaction.onabort = unexpectedSuccessHandler;
 
       is(db.version, "1", "Correct version");
       is(db.objectStoreNames.length, 0, "Correct objectStoreNames length");
 
-      let objectStore = db.createObjectStore("foo");
+      objectStore = db.createObjectStore("foo");
 
       is(db.objectStoreNames.length, 1, "Correct objectStoreNames length");
       ok(db.objectStoreNames.contains("foo"), "Has correct objectStore");
 
       objectStore.createIndex("baz", "key.path");
       objectStore.createIndex("dontDeleteMe", "");
 
       is(objectStore.indexNames.length, 2, "Correct indexNames length");
@@ -148,33 +148,33 @@
 
       is(db.version, "1", "Correct version");
       is(db.objectStoreNames.length, 2, "Correct objectStoreNames length");
       ok(db.objectStoreNames.contains("foo"), "Has correct objectStore");
       ok(db.objectStoreNames.contains("bar"), "Has correct objectStore");
 
       db.close();
 
-      let request = indexedDB.open(window.location.pathname, 2);
+      request = indexedDB.open(window.location.pathname, 2);
       request.onerror = errorHandler;
       request.onupgradeneeded = grabEventAndContinueHandler;
-      let event = yield undefined;
+      event = yield undefined;
 
-      let db = event.target.result;
+      db = event.target.result;
 
-      let trans = event.target.transaction;
+      trans = event.target.transaction;
       trans.oncomplete = unexpectedSuccessHandler;
 
       is(db.version, "2", "Correct version");
       is(db.objectStoreNames.length, 2, "Correct objectStoreNames length");
       ok(db.objectStoreNames.contains("foo"), "Has correct objectStore");
       ok(db.objectStoreNames.contains("bar"), "Has correct objectStore");
 
       let createdObjectStore = db.createObjectStore("newlyCreated");
-      let objectStore = trans.objectStore("foo");
+      objectStore = trans.objectStore("foo");
       let deletedObjectStore = trans.objectStore("bar");
       deletedObjectStore.deleteIndex("foo");
       db.deleteObjectStore("bar");
 
       createdObjectStore.createIndex("newIndex", "key.path");
       objectStore.createIndex("newIndex", "key.path");
       objectStore.deleteIndex("baz");
 
--- a/dom/indexedDB/test/exceptions_in_events_iframe.html
+++ b/dom/indexedDB/test/exceptions_in_events_iframe.html
@@ -71,23 +71,23 @@
       request.onerror = grabEventAndContinueHandler;
       event = yield undefined;
 
       is(event.type, "error",
          "Throwing during an upgradeneeded event should fire an error.");
 
       // Test 2: Throwing during a request's success handler should abort the
       // transaction.
-      let request = indexedDB.open(window.location.pathname, 1);
+      request = indexedDB.open(window.location.pathname, 1);
       request.onerror = errorHandler;
       request.onblocked = errorHandler;
       request.onupgradeneeded = grabEventAndContinueHandler;
       request.onsuccess = unexpectedSuccessHandler;
       let openrequest = request;
-      let event = yield undefined;
+      event = yield undefined;
 
       request.onupgradeneeded = unexpectedSuccessHandler;
 
       let db = event.target.result;
       db.onerror = function(event) {
         event.preventDefault();
       };
 
@@ -116,38 +116,38 @@
       event = yield undefined;
 
       is(event.type, "error", "Got IDBOpenDBRequest error event");
       is(event.target, openrequest, "Right event target");
       is(event.target.error.name, "AbortError", "Right error name");
 
       // Test 3: Throwing during a request's error handler should abort the
       // transaction, even if preventDefault is called on the error event.
-      let request = indexedDB.open(window.location.pathname, 1);
+      request = indexedDB.open(window.location.pathname, 1);
       request.onerror = errorHandler;
       request.onblocked = errorHandler;
       request.onupgradeneeded = grabEventAndContinueHandler;
       request.onsuccess = unexpectedSuccessHandler;
-      let openrequest = request;
-      let event = yield undefined;
+      openrequest = request;
+      event = yield undefined;
 
       request.onupgradeneeded = unexpectedSuccessHandler;
 
-      let db = event.target.result;
+      db = event.target.result;
       db.onerror = function(event) {
         event.preventDefault();
       };
 
       event.target.transaction.oncomplete = unexpectedSuccessHandler;
       event.target.transaction.onabort = grabEventAndContinueHandler;
 
       is(db.version, 1, "Correct version");
       is(db.objectStoreNames.length, 0, "Correct objectStoreNames length");
 
-      let objectStore = db.createObjectStore("foo");
+      objectStore = db.createObjectStore("foo");
 
       is(db.objectStoreNames.length, 1, "Correct objectStoreNames length");
       ok(db.objectStoreNames.contains("foo"), "Has correct objectStore");
 
       request = objectStore.add({}, 1);
       request.onerror = errorHandler;
       request = objectStore.add({}, 1);
       request.onsuccess = unexpectedSuccessHandler;
--- a/dom/indexedDB/test/test_blob_simple.html
+++ b/dom/indexedDB/test/test_blob_simple.html
@@ -127,17 +127,17 @@
     fileReader.readAsText(cursorResults[0].blob);
     event = yield undefined;
 
     is(event.target.result, BLOB_DATA.join(""), "Correct text");
 
 
     info("Retrieve blobs from database via index and verify contents.");
 
-    let index = db.transaction("foo").objectStore("foo").index("foo");
+    index = db.transaction("foo").objectStore("foo").index("foo");
     index.get(INDEX_KEY).onsuccess = grabEventAndContinueHandler;
     event = yield undefined;
 
     info("Got blob from database");
 
     fileReader = new FileReader();
     fileReader.onload = grabEventAndContinueHandler;
     fileReader.readAsText(event.target.result.blob);
@@ -243,26 +243,26 @@
 
     let txn = db.transaction("foo", "readwrite");
     txn.objectStore("foo").put(event.target.result, key);
     txn.oncomplete = grabEventAndContinueHandler;
     event = yield undefined;
 
     info("Stored blob back into database");
 
-    let fileReader = new FileReader();
+    fileReader = new FileReader();
     fileReader.onload = grabEventAndContinueHandler;
     fileReader.readAsText(blobFromDB);
     event = yield undefined;
 
     is(event.target.result, BLOB_DATA.join(""), "Correct text");
 
-    let blobURL = URL.createObjectURL(blobFromDB);
+    blobURL = URL.createObjectURL(blobFromDB);
 
-    let xhr = new XMLHttpRequest();
+    xhr = new XMLHttpRequest();
     xhr.open("GET", blobURL);
     xhr.onload = grabEventAndContinueHandler;
     xhr.send();
     yield undefined;
 
     URL.revokeObjectURL(blobURL);
 
     is(xhr.responseText, BLOB_DATA.join(""), "Correct responseText");
--- a/dom/indexedDB/test/test_file_transaction_abort.html
+++ b/dom/indexedDB/test/test_file_transaction_abort.html
@@ -27,24 +27,24 @@
       request.onsuccess = grabEventAndContinueHandler;
       let event = yield undefined;
 
       is(event.type, "upgradeneeded", "Got correct event type");
 
       let db = event.target.result;
       db.onerror = errorHandler;
 
-      objectStore = db.createObjectStore(objectStoreName, { });
+      let objectStore = db.createObjectStore(objectStoreName, { });
 
       event = yield undefined;
 
       is(event.type, "success", "Got correct event type");
 
       let trans = db.transaction([objectStoreName], READ_WRITE);
-      let objectStore = trans.objectStore(objectStoreName);
+      objectStore = trans.objectStore(objectStoreName);
 
       request = objectStore.add(fileData.file, fileData.key);
       request.onsuccess = grabEventAndContinueHandler;
       event = yield undefined;
 
       is(event.target.result, fileData.key, "Got correct key");
 
       trans.onabort = grabEventAndContinueHandler;
--- a/dom/indexedDB/test/test_filehandle_store_snapshot.html
+++ b/dom/indexedDB/test/test_filehandle_store_snapshot.html
@@ -54,17 +54,17 @@
 
     request = mutableFile.getFile();
     request.onsuccess = grabEventAndContinueHandler;
     event = yield undefined;
 
     let file = event.target.result;
 
     let trans = db.transaction([objectStoreName], READ_WRITE);
-    let objectStore = trans.objectStore(objectStoreName);
+    objectStore = trans.objectStore(objectStoreName);
 
     request = objectStore.add(file, 42);
     request.onsuccess = grabEventAndContinueHandler;
     event = yield undefined;
 
     // At this moment, the file should not be readable anymore.
     let reader = new FileReader();
     try {
--- a/dom/indexedDB/test/test_persistenceType.html
+++ b/dom/indexedDB/test/test_persistenceType.html
@@ -75,17 +75,17 @@
 
       is(event.target.result, data.key, "Got correct key");
 
       request = indexedDB.open(name, { version: version,
                                        storage: "temporary" });
       request.onerror = errorHandler;
       request.onupgradeneeded = grabEventAndContinueHandler;
       request.onsuccess = grabEventAndContinueHandler;
-      let event = yield undefined;
+      event = yield undefined;
 
       is(event.type, "upgradeneeded", "Got correct event type");
 
       db = event.target.result;
       db.onerror = errorHandler;
 
       objectStore = db.createObjectStore(objectStoreName, { });
 
--- a/dom/indexedDB/test/unit/test_autoIncrement_indexes.js
+++ b/dom/indexedDB/test/unit/test_autoIncrement_indexes.js
@@ -26,17 +26,17 @@ function testSteps()
   objectStore.add(data).onsuccess = grabEventAndContinueHandler;
   event = yield undefined;
 
   is(event.target.result, 1, "Added entry");
   request.onsuccess = grabEventAndContinueHandler;
 
   event = yield undefined;
 
-  let objectStore = db.transaction("foo").objectStore("foo");
+  objectStore = db.transaction("foo").objectStore("foo");
   let first = objectStore.index("first");
   let second = objectStore.index("second");
   let third = objectStore.index("third");
 
   first.get("foo").onsuccess = grabEventAndContinueHandler;
   event = yield undefined;
 
   is (event.target.result.id, 1, "Entry in first");
--- a/dom/indexedDB/test/unit/test_complex_keyPaths.js
+++ b/dom/indexedDB/test/unit/test_complex_keyPaths.js
@@ -159,18 +159,18 @@ function testSteps()
     store.clear().onsuccess = grabEventAndContinueHandler;
     yield undefined;
   }
 
   // Attempt to create indexes and insert data
   let store = db.createObjectStore("indexStore");
   let indexes = {};
   for (let i = 0; i < keyPaths.length; i++) {
+    let info = keyPaths[i];
     let test = " for index test " + JSON.stringify(info);
-    let info = keyPaths[i];
     let indexName = JSON.stringify(info.keyPath);
     if (!indexes[indexName]) {
       try {
         let index = store.createIndex(indexName, info.keyPath);
         ok(!("exception" in info), "shouldn't throw" + test);
         is(JSON.stringify(index.keyPath), JSON.stringify(info.keyPath),
            "index has correct keyPath property" + test);
         ok(index.keyPath === index.keyPath,
--- a/dom/indexedDB/test/unit/test_create_index_with_integer_keys.js
+++ b/dom/indexedDB/test/unit/test_create_index_with_integer_keys.js
@@ -21,20 +21,20 @@ function testSteps()
   event.target.onsuccess = continueToNextStep;
 
   // Make object store, add data.
   let objectStore = db.createObjectStore("foo", { keyPath: "id" });
   objectStore.add(data);
   yield undefined;
   db.close();
 
-  let request = indexedDB.open(this.window ? window.location.pathname : "Splendid Test", 2);
+  request = indexedDB.open(this.window ? window.location.pathname : "Splendid Test", 2);
   request.onerror = errorHandler;
   request.onupgradeneeded = grabEventAndContinueHandler;
-  let event = yield undefined;
+  event = yield undefined;
 
   let db2 = event.target.result;
   db2.onerror = errorHandler;
 
   event.target.onsuccess = continueToNextStep;
 
   // Create index.
   event.target.transaction.objectStore("foo").createIndex("foo", "num");
--- a/dom/indexedDB/test/unit/test_create_objectStore.js
+++ b/dom/indexedDB/test/unit/test_create_objectStore.js
@@ -108,17 +108,16 @@ function testSteps()
     ex = e;
   }
   ok(ex, "createObjectStore with empty keyPath and autoIncrement should throw");
   is(ex.name, "InvalidAccessError", "should throw right exception");
   ok(ex instanceof DOMException, "should throw right exception");
   is(ex.code, DOMException.INVALID_ACCESS_ERR, "should throw right exception");
 
   // Can't handle autoincrement and array keypath
-  let ex;
   try {
     db.createObjectStore("storefail", { keyPath: ["a"], autoIncrement: true });
   }
   catch(e) {
     ex = e;
   }
   ok(ex, "createObjectStore with array keyPath and autoIncrement should throw");
   is(ex.name, "InvalidAccessError", "should throw right exception");
--- a/dom/indexedDB/test/unit/test_deleteDatabase.js
+++ b/dom/indexedDB/test/unit/test_deleteDatabase.js
@@ -30,17 +30,17 @@ function testSteps()
 
   event = yield undefined;
 
   is(event.type, "success", "Expect a success event");
   is(event.target, request, "Event has right target");
   ok(event.target.result instanceof IDBDatabase, "Result should be a database");
   is(db.objectStoreNames.length, 1, "Expect an objectStore here");
 
-  let request = indexedDB.open(name, 10);
+  request = indexedDB.open(name, 10);
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
 
   event = yield undefined;
   is(event.type, "success", "Expect a success event");
   is(event.target, request, "Event has right target");
   ok(event.target.result instanceof IDBDatabase, "Result should be a database");
   let db2 = event.target.result;
@@ -61,45 +61,45 @@ function testSteps()
     db2.onversionchange = unexpectedSuccessHandler;
   };
 
   // The IDB spec doesn't guarantee the order that onversionchange will fire
   // on the dbs.
   db.onversionchange = closeDBs;
   db2.onversionchange = closeDBs;
 
-  let request = indexedDB.deleteDatabase(name);
+  request = indexedDB.deleteDatabase(name);
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
 
   ok(request instanceof IDBOpenDBRequest, "Expect an IDBOpenDBRequest");
 
   event = yield undefined;
   ok(onversionchangecalled, "Expected versionchange events");
   is(event.type, "success", "expect a success event");
   is(event.target, request, "event has right target");
   ok(event.target.result === undefined, "event should have no result");
 
-  let request = indexedDB.open(name, 1);
+  request = indexedDB.open(name, 1);
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
 
   event = yield undefined;
   is(event.target.result.version, 1, "DB has proper version");
   is(event.target.result.objectStoreNames.length, 0, "DB should have no object stores");
 
 
-  let request = indexedDB.deleteDatabase("thisDatabaseHadBetterNotExist");
+  request = indexedDB.deleteDatabase("thisDatabaseHadBetterNotExist");
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
 
   event = yield undefined;
   ok(true, "deleteDatabase on a non-existent database succeeded");
 
-  let request = indexedDB.open("thisDatabaseHadBetterNotExist");
+  request = indexedDB.open("thisDatabaseHadBetterNotExist");
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
 
   event = yield undefined;
   ok(true, "after deleting a non-existent database, open should work");
 
   finishTest();
   yield undefined;
--- a/dom/indexedDB/test/unit/test_deleteDatabase_interactions.js
+++ b/dom/indexedDB/test/unit/test_deleteDatabase_interactions.js
@@ -30,17 +30,17 @@ function testSteps()
 
   is(event.type, "success", "Expect a success event");
   is(event.target, request, "Event has right target");
   ok(event.target.result instanceof IDBDatabase, "Result should be a database");
   is(db.objectStoreNames.length, 1, "Expect an objectStore here");
 
   db.close();
 
-  let request = indexedDB.deleteDatabase(name);
+  request = indexedDB.deleteDatabase(name);
 
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
 
   ok(request instanceof IDBOpenDBRequest, "Expect an IDBOpenDBRequest");
 
   let openRequest = indexedDB.open(name, 1);
   openRequest.onerror = errorHandler;
--- a/dom/indexedDB/test/unit/test_index_empty_keyPath.js
+++ b/dom/indexedDB/test/unit/test_index_empty_keyPath.js
@@ -42,39 +42,39 @@ function testSteps()
   // Now create the index.
   objectStore.createIndex("set", "", { unique: true });
   yield undefined; // success
 
   let trans = db.transaction("data", "readwrite");
   objectStore = trans.objectStore("data");
   index = objectStore.index("set");
 
-  let request = index.get("bar");
+  request = index.get("bar");
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
   
-  let event = yield undefined;
+  event = yield undefined;
 
   is(event.target.result, "bar", "Got correct result");
 
-  let request = objectStore.add("foopy", 4);
+  request = objectStore.add("foopy", 4);
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
 
   yield undefined;
 
-  let request = index.get("foopy");
+  request = index.get("foopy");
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
   
-  let event = yield undefined;
+  event = yield undefined;
 
   is(event.target.result, "foopy", "Got correct result");
 
-  let request = objectStore.add("foopy", 5);
+  request = objectStore.add("foopy", 5);
   request.addEventListener("error", new ExpectError("ConstraintError", true));
   request.onsuccess = unexpectedSuccessHandler;
 
   trans.oncomplete = grabEventAndContinueHandler;
 
   yield undefined;
   yield undefined;
 
--- a/dom/indexedDB/test/unit/test_indexes.js
+++ b/dom/indexedDB/test/unit/test_indexes.js
@@ -247,17 +247,17 @@ function testSteps()
   }
   yield undefined;
 
   is(keyIndex, 5, "Saw all the expected keys");
 
   ok(true, "Test group 5");
 
   keyIndex = 2;
-  let keyRange = IDBKeyRange.bound("Bob", "Ron", true);
+  keyRange = IDBKeyRange.bound("Bob", "Ron", true);
 
   request = objectStore.index("name").openKeyCursor(keyRange);
   request.onerror = errorHandler;
   request.onsuccess = function (event) {
     let cursor = event.target.result;
     if (cursor) {
       is(cursor.key, objectStoreDataNameSort[keyIndex].value.name,
          "Correct key");
@@ -273,17 +273,17 @@ function testSteps()
   }
   yield undefined;
 
   is(keyIndex, 5, "Saw all the expected keys");
 
   ok(true, "Test group 6");
 
   keyIndex = 1;
-  let keyRange = IDBKeyRange.bound("Bob", "Ron", false, true);
+  keyRange = IDBKeyRange.bound("Bob", "Ron", false, true);
 
   request = objectStore.index("name").openKeyCursor(keyRange);
   request.onerror = errorHandler;
   request.onsuccess = function (event) {
     let cursor = event.target.result;
     if (cursor) {
       is(cursor.key, objectStoreDataNameSort[keyIndex].value.name,
          "Correct key");
--- a/dom/indexedDB/test/unit/test_multientry.js
+++ b/dom/indexedDB/test/unit/test_multientry.js
@@ -138,17 +138,16 @@ function testSteps()
      { put:     { x: 0, id: 8 },
        fail:    true },
     ];
 
   store.deleteIndex("myindex");
   index = store.createIndex("myindex", "x", { multiEntry: true, unique: true });
   is(index.multiEntry, true, "index created with multiEntry");
 
-  let i;
   let indexes;
   for (i = 0; i < tests.length; ++i) {
     let test = tests[i];
     let testName = " for " + JSON.stringify(test);
     let req;
     if (test.add) {
       req = store.add(test.add);
     }
--- a/dom/indexedDB/test/unit/test_names_sorted.js
+++ b/dom/indexedDB/test/unit/test_names_sorted.js
@@ -69,42 +69,42 @@ function testSteps()
     let info = objectStoreInfo[i];
   
     is(trans.objectStoreNames[info.location], info.name,
        "Got objectStore name in the right location");
   }
 
   db.close();
 
-  let request = indexedDB.open(name, 1);
+  request = indexedDB.open(name, 1);
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
   request.onupgradeneeded = unexpectedSuccessHandler;
-  let event = yield undefined;
+  event = yield undefined;
 
-  let db = event.target.result;
+  db = event.target.result;
 
-  let objectStoreNames = []
+  objectStoreNames = []
   for (let i = 0; i < objectStoreInfo.length; i++) {
     let info = objectStoreInfo[i];
     objectStoreNames.push(info.name);
 
     is(db.objectStoreNames[info.location], info.name,
        "Got objectStore name in the right location");
 
     let trans = db.transaction(info.name);
     let objectStore = trans.objectStore(info.name);
     for (let j = 0; j < indexInfo.length; j++) {
       let info = indexInfo[j];
       is(objectStore.indexNames[info.location], info.name,
          "Got index name in the right location");
     }
   }
 
-  let trans = db.transaction(objectStoreNames);
+  trans = db.transaction(objectStoreNames);
   for (let i = 0; i < objectStoreInfo.length; i++) {
     let info = objectStoreInfo[i];
   
     is(trans.objectStoreNames[info.location], info.name,
        "Got objectStore name in the right location");
   }
 
   db.close();
--- a/dom/indexedDB/test/unit/test_objectStore_openKeyCursor.js
+++ b/dom/indexedDB/test/unit/test_objectStore_openKeyCursor.js
@@ -322,17 +322,17 @@ function testSteps() {
     } else {
       cursor.continue();
     }
   };
   yield undefined;
 
   is(seenKeys.length, allKeys.length - 9, "Saw the right number of keys");
 
-  let match = true;
+  match = true;
   for (let i = 0, j = 0; i < seenKeys.length; i++) {
     if (seenKeys[i] !== allKeys[i + j]) {
       match = false;
       break;
     }
     if (i == 0) {
       j = 9;
     }
@@ -378,17 +378,17 @@ function testSteps() {
     } else {
       cursor.continue();
     }
   };
   yield undefined;
 
   is(seenKeys.length, allKeys.length - 9, "Saw the right number of keys");
 
-  let match = true;
+  match = true;
   for (let i = 0, j = 0; i < seenKeys.length; i++) {
     if (seenKeys[i] !== allKeys[i + j]) {
       match = false;
       break;
     }
     if (i == 0) {
       j = 9;
     }
--- a/dom/indexedDB/test/unit/test_open_for_principal.js
+++ b/dom/indexedDB/test/unit/test_open_for_principal.js
@@ -51,17 +51,17 @@ function testSteps()
   let principal = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
                      .getService(Components.interfaces.nsIScriptSecurityManager)
                      .getNoAppCodebasePrincipal(uri);
 
   request = indexedDB.openForPrincipal(principal, name, 1);
   request.onerror = errorHandler;
   request.onupgradeneeded = grabEventAndContinueHandler;
   request.onsuccess = grabEventAndContinueHandler;
-  let event = yield undefined;
+  event = yield undefined;
 
   is(event.type, "upgradeneeded", "Got correct event type");
 
   db = event.target.result;
   db.onerror = errorHandler;
 
   objectStore = db.createObjectStore(objectStoreName, { });
 
--- a/dom/indexedDB/test/unit/test_overlapping_transactions.js
+++ b/dom/indexedDB/test/unit/test_overlapping_transactions.js
@@ -17,17 +17,17 @@ function testSteps()
 
   let db = event.target.result;
   is(db.objectStoreNames.length, 0, "Correct objectStoreNames list");
 
   event.target.onsuccess = grabEventAndContinueHandler;
   for (let i in objectStores) {
     db.createObjectStore(objectStores[i], { autoIncrement: true });
   }
-  let event = yield undefined;
+  event = yield undefined;
 
   is(db.objectStoreNames.length, objectStores.length,
      "Correct objectStoreNames list");
 
   for (let i = 0; i < 50; i++) {
     let stepNumber = 0;
 
     request = db.transaction(["foo"], "readwrite")
--- a/dom/indexedDB/test/unit/test_persistenceType.js
+++ b/dom/indexedDB/test/unit/test_persistenceType.js
@@ -59,17 +59,17 @@ function testSteps()
 
   is(event.target.result, data.key, "Got correct key");
 
   request = indexedDB.open(name, { version: version,
                                    storage: "temporary" });
   request.onerror = errorHandler;
   request.onupgradeneeded = grabEventAndContinueHandler;
   request.onsuccess = grabEventAndContinueHandler;
-  let event = yield undefined;
+  event = yield undefined;
 
   is(event.type, "success", "Got correct event type");
 
   is(db.name, name, "Correct name");
   is(db.version, version, "Correct version");
   is(db.storage, "persistent", "Correct persistence type");
 
   objectStore = db.transaction([objectStoreName])
--- a/dom/indexedDB/test/unit/test_remove_objectStore.js
+++ b/dom/indexedDB/test/unit/test_remove_objectStore.js
@@ -34,22 +34,22 @@ function testSteps()
   }
   yield undefined;
 
   is(db.objectStoreNames.length, 1, "Correct objectStoreNames list");
   is(db.objectStoreNames.item(0), objectStoreName, "Correct name");
 
   db.close();
 
-  let request = indexedDB.open(name, 2);
+  request = indexedDB.open(name, 2);
   request.onerror = errorHandler;
   request.onupgradeneeded = grabEventAndContinueHandler;
-  let event = yield undefined;
+  event = yield undefined;
 
-  let db = event.target.result;
+  db = event.target.result;
   let trans = event.target.transaction;
 
   let oldObjectStore = trans.objectStore(objectStoreName);
   isnot(oldObjectStore, null, "Correct object store prior to deleting");
   db.deleteObjectStore(objectStoreName);
   is(db.objectStoreNames.length, 0, "Correct objectStores list");
   try {
     trans.objectStore(objectStoreName);
@@ -78,22 +78,22 @@ function testSteps()
   db.deleteObjectStore(objectStore.name);
   is(db.objectStoreNames.length, 0, "Correct objectStores list");
 
   continueToNextStep();
   yield undefined;
 
   db.close();
 
-  let request = indexedDB.open(name, 3);
+  request = indexedDB.open(name, 3);
   request.onerror = errorHandler;
   request.onupgradeneeded = grabEventAndContinueHandler;
-  let event = yield undefined;
+  event = yield undefined;
 
-  let db = event.target.result;
+  db = event.target.result;
 
   objectStore = db.createObjectStore(objectStoreName, { keyPath: "foo" });
 
   request = objectStore.add({foo:"bar"});
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
 
   db.deleteObjectStore(objectStoreName);
--- a/dom/indexedDB/test/unit/test_temporary_storage.js
+++ b/dom/indexedDB/test/unit/test_temporary_storage.js
@@ -195,17 +195,17 @@ function testSteps()
   request = indexedDB.openForPrincipal(getPrincipal(lastUrl), name,
                                        { storage: "temporary" });
   request.onerror = errorHandler;
   request.onsuccess = grabEventAndContinueHandler;
   event = yield undefined;
 
   is(event.type, "success", "Got correct event type");
 
-  let db = event.target.result;
+  db = event.target.result;
 
   checkUsage(3);
   yield undefined;
 
   info("Stage 4");
 
   let trans = db.transaction(["foo"], "readwrite");
 
--- a/dom/indexedDB/test/unit/test_transaction_error.js
+++ b/dom/indexedDB/test/unit/test_transaction_error.js
@@ -38,17 +38,17 @@ function testSteps() {
   let transaction = db.transaction(objectStoreName, "readwrite");
   transaction.onerror = grabEventAndContinueHandler;
   transaction.oncomplete = grabEventAndContinueHandler;
 
   objectStore = transaction.objectStore(objectStoreName);
 
   info("Adding duplicate entry with preventDefault()");
 
-  let request = objectStore.add(data, dataKey);
+  request = objectStore.add(data, dataKey);
   request.onsuccess = unexpectedSuccessHandler;
   request.onerror = grabEventAndContinueHandler;
   event = yield undefined;
 
   is(event.type, "error", "Got an error event");
   is(event.target, request, "Error event targeted request");
   is(event.currentTarget, request, "Got request error first");
   is(event.currentTarget.error.name, expectedError,
--- a/dom/indexedDB/test/unit/test_transaction_ordering.js
+++ b/dom/indexedDB/test/unit/test_transaction_ordering.js
@@ -31,19 +31,19 @@ function testSteps()
 
   trans1.oncomplete = grabEventAndContinueHandler;
   trans2.oncomplete = grabEventAndContinueHandler;
 
   yield undefined;
   yield undefined;
 
   let trans3 = db.transaction("foo", "readonly");
-  let request = trans3.objectStore("foo").get(42);
+  request = trans3.objectStore("foo").get(42);
   request.onsuccess = grabEventAndContinueHandler;
   request.onerror = errorHandler;
 
-  let event = yield undefined;
+  event = yield undefined;
   is(event.target.result, "2", "Transactions were ordered properly.");
 
   finishTest();
   yield undefined;
 }
 
--- a/dom/system/gonk/tests/test_ril_worker_sms_cdma.js
+++ b/dom/system/gonk/tests/test_ril_worker_sms_cdma.js
@@ -149,17 +149,17 @@ function pduToParcelData(cdmaPduHelper, 
   }
 
   // Subaddress
   writeByte(0);
   writeByte(0);
   writeByte(0);
 
   // Bearer Data Length
-  let dataLength = pdu.bearerData.length;
+  dataLength = pdu.bearerData.length;
   writeByte(dataLength);
 
   // Bearer Data
   for (let i = 0; i < dataLength; i++) {
     writeByte(pdu.bearerData[i]);
   }
 
   return data;
--- a/dom/system/gonk/tests/test_ril_worker_stk.js
+++ b/dom/system/gonk/tests/test_ril_worker_stk.js
@@ -860,17 +860,17 @@ add_test(function test_stk_proactive_com
 
   berTlv = berHelper.decode(set_up_menu_2.length);
   ctlvs = berTlv.value;
   tlv = stkHelper.searchForTag(COMPREHENSIONTLV_TAG_COMMAND_DETAILS, ctlvs);
   do_check_eq(tlv.value.commandNumber, 0x01);
   do_check_eq(tlv.value.typeOfCommand, STK_CMD_SET_UP_MENU);
   do_check_eq(tlv.value.commandQualifier, 0x00);
 
-  let menu = stkFactory.createParam(tlv.value, ctlvs);
+  menu = stkFactory.createParam(tlv.value, ctlvs);
   do_check_eq(menu.title, "Title");
   do_check_eq(menu.items[0].identifier, 1);
   do_check_eq(menu.items[0].text, "item 1");
   do_check_eq(menu.items[1].identifier, 2);
   do_check_eq(menu.items[1].text, "item 2");
   do_check_eq(menu.items[2].identifier, 3);
   do_check_eq(menu.items[2].text, "item 3");
   do_check_eq(menu.nextActionList[0], STK_NEXT_ACTION_END_PROACTIVE_SESSION);
--- a/dom/system/tests/marionette/test_proximity_init.js
+++ b/dom/system/tests/marionette/test_proximity_init.js
@@ -19,17 +19,17 @@ function testEventInit() {
   if (event.value !== initValue ||
       event.min !== initMin ||
       event.max !== initMax) {
     log("DeviceProximityEvent not initialized correctly.");
   }
 
   // Test UserProximityEvent initialization
   log("Verifying UserProximityEvent constructor.");
-  let event = new UserProximityEvent("userproximity", {near: true});
+  event = new UserProximityEvent("userproximity", {near: true});
   is(event.type, "userproximity", "event type");
   ok(event.near, "Initialization of UserProximityEvent");
   verifyDefaultStatus();
 }
 
 function verifyDefaultStatus() {
   let emulatorDone = false;
 
--- a/dom/tests/mochitest/chrome/queryCaretRectUnix.html
+++ b/dom/tests/mochitest/chrome/queryCaretRectUnix.html
@@ -135,17 +135,17 @@
       max: { left: 25, top: 390 },
     });
 
     cp = document.caretPositionFromPoint(395, 395);
     input = cp.offsetNode;
     offset = cp.offset;
     input.selectionStart = input.selectionEnd = offset;
 
-    let selection = getSelection(text);
+    selection = getSelection(text);
 
     testCaretPosition(domWinUtils, input.selectionStart, {
       min: { left: 390, top: 380 },
       max: { left: 400, top: 390 },
     });
 
     testCaretPosition(domWinUtils, input.selectionEnd, {
       min: { left: 390, top: 380 },
--- a/dom/tests/mochitest/chrome/queryCaretRectWin.html
+++ b/dom/tests/mochitest/chrome/queryCaretRectWin.html
@@ -144,17 +144,17 @@
       max: { left: 25, top: 390 },
     });
 
     cp = document.caretPositionFromPoint(395, 395);
     input = cp.offsetNode;
     offset = cp.offset;
     input.selectionStart = input.selectionEnd = offset;
 
-    let selection = getSelection(text);
+    selection = getSelection(text);
 
     testCaretPosition(domWinUtils, input.selectionStart, {
       min: { left: 390, top: 380 },
       max: { left: 400, top: 390 },
     });
 
     testCaretPosition(domWinUtils, input.selectionEnd, {
       min: { left: 390, top: 380 },
--- a/dom/tests/mochitest/chrome/selectAtPoint.html
+++ b/dom/tests/mochitest/chrome/selectAtPoint.html
@@ -108,69 +108,69 @@
       checkSelection(document, "SELECT_WORD", "ttestselection1");
     } else if (isWindows) {
       checkSelection(document, "SELECT_WORD", "ttestselection1 ");
     }
     setSingle(dwu, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_PARAGRAPH);
     checkSelection(document, "SELECT_PARAGRAPH", "ttestselection1 Lorem ipsum dolor sit amet, at duo debet graeci, vivendum vulputate per ut. Ne labore incorrupte vix. Cu copiosae postulant tincidunt ius, in illud appetere contentiones eos. Ei munere officiis assentior pro, nibh decore ius at.");
 
     // Centered on the second character in the sentence div
-    let targetPoint = { xPos: rect.left + (charDims.width + (charDims.width / 2)),
-                        yPos: rect.top + (charDims.height / 2) };
+    targetPoint = { xPos: rect.left + (charDims.width + (charDims.width / 2)),
+                    yPos: rect.top + (charDims.height / 2) };
     setSingle(dwu, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_CHARACTER);
     checkSelection(document, "SELECT_CHARACTER", "te");
     setSingle(dwu, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_CLUSTER);
     checkSelection(document, "SELECT_CLUSTER", "te");
 
     // Separate character blocks in a word 't(te)s(ts)election1'
-    let targetPoint = { xPos: rect.left + (charDims.width + (charDims.width / 2)),
-                        yPos: rect.top + (charDims.height / 2) };
+    targetPoint = { xPos: rect.left + (charDims.width + (charDims.width / 2)),
+                    yPos: rect.top + (charDims.height / 2) };
     setStart(dwu, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_CHARACTER);
-    let targetPoint = { xPos: rect.left + ((charDims.width * 4) + (charDims.width / 2)),
-                        yPos: rect.top + (charDims.height / 2) };
+    targetPoint = { xPos: rect.left + ((charDims.width * 4) + (charDims.width / 2)),
+                    yPos: rect.top + (charDims.height / 2) };
     setEnd(dwu, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_CHARACTER);
     if (isLinux || isMac) {
       // XXX I think this is a bug, the right hand selection is 4.5 characters over with a
       // monspaced font. what we want: t(te)s(ts)election1 what we get: t(te)st(se)lection1
       checkSelection(document, "split selection", "tese");
     } else if (isWindows) {
       checkSelection(document, "split selection", "tets");
     }
 
     // Trying to select where there's no text, should fail but not throw
     let result = dwu.selectAtPoint(rect.left - 20, rect.top - 20, Ci.nsIDOMWindowUtils.SELECT_CHARACTER, false);
     ok(result == false, "couldn't select?");
 
     // Second div in the main page
 
-    let div = document.getElementById("div2");
-    let rect = div.getBoundingClientRect();
+    div = document.getElementById("div2");
+    rect = div.getBoundingClientRect();
 
     // Centered on the first line, first character in the paragraph div
-    let targetPoint = { xPos: rect.left + (charDims.width / 2),
-                        yPos: rect.top + (charDims.height / 2) };
+    targetPoint = { xPos: rect.left + (charDims.width / 2),
+                    yPos: rect.top + (charDims.height / 2) };
     setSingle(dwu, targetPoint.xPos + 50, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_PARAGRAPH);
     checkSelection(document, "SELECT_PARAGRAPH", "Lorem ipsum dolor sit amet, at duo debet graeci, vivendum vulputate per ut. Ne labore incorrupte vix. Cu copiosae postulant tincidunt ius, in illud appetere contentiones eos.");
 
     //
     // Inner IFRAME selection tests
     //
 
     let frame = document.getElementById("frame1");
     let dwuFrame = frame.contentDocument
                         .defaultView
                         .QueryInterface(Ci.nsIInterfaceRequestor)
                         .getInterface(Ci.nsIDOMWindowUtils);
 
     frame.contentWindow.scrollTo(0, 0);
 
-    let rect = frame.getBoundingClientRect();
+    rect = frame.getBoundingClientRect();
 
-    let targetPoint = { xPos: charDims.width / 2,
-                        yPos: charDims.height / 2 };
+    targetPoint = { xPos: charDims.width / 2,
+                    yPos: charDims.height / 2 };
     setSingle(dwuFrame, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_WORDNOSPACE);
     checkSelection(frame.contentWindow.document, "SELECT_WORDNOSPACE", "ttestselection2");
     setSingle(dwuFrame, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_WORD);
     if (isLinux || isMac) {
       checkSelection(frame.contentWindow.document, "SELECT_WORD", "ttestselection2");
     } else if (isWindows) {
       checkSelection(frame.contentWindow.document, "SELECT_WORD", "ttestselection2 ");
     }
--- a/dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.js
+++ b/dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.js
@@ -25,39 +25,39 @@ function getTestContent()
   recursiveobj.bar = new Object();
   recursiveobj.bar.foo = "foo";
   recursiveobj.bar.backref = recursiveobj;
   recursiveobj.bar.baz = new Date(1306113544);
   recursiveobj.bar.backref2 = recursiveobj;
   recursiveobj.expando = recursiveobj;
   yield recursiveobj;
 
-  let obj = new Object();
+  obj = new Object();
   obj.expando1 = 1;
   obj.foo = new Object();
   obj.foo.bar = 2;
   obj.bar = new Object();
   obj.bar.foo = obj.foo;
   obj.expando = new Object();
   obj.expando.expando = new Object();
   obj.expando.expando.obj = obj;
   obj.expando2 = 4;
   obj.baz = obj.expando.expando;
   obj.blah = obj.bar;
   obj.foo.baz = obj.blah;
   obj.foo.blah = obj.blah;
   yield obj;
 
   let diamond = new Object();
-  let obj = new Object();
+  obj = new Object();
   obj.foo = "foo";
   obj.bar = 92;
   obj.backref = diamond;
   diamond.ref1 = obj;
   diamond.ref2 = obj;
   yield diamond;
 
   let doubleref = new Object();
-  let obj = new Object();
+  obj = new Object();
   doubleref.ref1 = obj;
   doubleref.ref2 = obj;
   yield doubleref;
 }
--- a/dom/wappush/tests/test_si_pdu_helper.js
+++ b/dom/wappush/tests/test_si_pdu_helper.js
@@ -50,17 +50,17 @@ add_test(function test_si_parse_wbxml_em
   let data = {};
 
   contentType = "application/vnd.wap.sic";
   data.array = new Uint8Array([
                   0x02, 0x05, 0x6A, 0x00, 0x05
                 ]);
   data.offset = 0;
   let result = "<si/>";
-  let msg = SI.PduHelper.parse(data, contentType);
+  msg = SI.PduHelper.parse(data, contentType);
   do_check_eq(msg.content, result);
 
   run_next_test();
 });
 
 /**
  * Empty SI compressed by WBXML, with public ID stored in string table
  */
@@ -74,17 +74,17 @@ add_test(function test_si_parse_wbxml_em
                   0x02, 0x00, 0x00, 0x6A, 0x1C, 0x2D, 0x2F, 0x2F,
                   0x57, 0x41, 0x50, 0x46, 0x4F, 0x52, 0x55, 0x4D,
                   0x2F, 0x2F, 0x44, 0x54, 0x44, 0x20, 0x53, 0x49,
                   0x20, 0x31, 0x2E, 0x30, 0x2F, 0x2F, 0x45, 0x4E,
                   0x00, 0x05
                 ]);
   data.offset = 0;
   let result = "<si/>";
-  let msg = SI.PduHelper.parse(data, contentType);
+  msg = SI.PduHelper.parse(data, contentType);
   do_check_eq(msg.content, result);
 
   run_next_test();
 });
 
 /**
  * SI compressed by WBXML with href attribute
  */
@@ -99,17 +99,17 @@ add_test(function test_si_parse_wbxml_wi
                   0x6F, 0x72, 0x65, 0x69, 0x6C, 0x6C, 0x79, 0x00,
                   0x85, 0x01, 0x03, 0x43, 0x68, 0x65, 0x63, 0x6B,
                   0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x77, 0x65,
                   0x62, 0x73, 0x69, 0x74, 0x65, 0x00, 0x01, 0x01
                 ]);
   data.offset = 0;
   let result = "<si><indication href=\"http://www.oreilly.com/\">" +
                "Check this website</indication></si>";
-  let msg = SI.PduHelper.parse(data, contentType);
+  msg = SI.PduHelper.parse(data, contentType);
   do_check_eq(msg.content, result);
 
   run_next_test();
 });
 
 /**
  * SI compressed by WBXML with href attribute containing reserved XML character
  */
@@ -126,17 +126,17 @@ add_test(function test_si_parse_wbxml_wi
                   0x72, 0x00, 0x01, 0x03, 0x43, 0x68, 0x65, 0x63,
                   0x6B, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x77,
                   0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x00, 0x01,
                   0x01
                 ]);
   data.offset = 0;
   let result = "<si><indication href=\"http://www.oreilly.com/foo&amp;bar\">" +
                "Check this website</indication></si>";
-  let msg = SI.PduHelper.parse(data, contentType);
+  msg = SI.PduHelper.parse(data, contentType);
   do_check_eq(msg.content, result);
 
   run_next_test();
 });
 
 /**
  * SI compressed by WBXML with href and date attribute
  */
@@ -157,17 +157,17 @@ add_test(function test_si_parse_wbxml_wi
                   0x61, 0x76, 0x65, 0x20, 0x34, 0x20, 0x6E, 0x65,
                   0x77, 0x20, 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x73,
                   0x00, 0x01, 0x01
                 ]);
   data.offset = 0;
   let result = "<si><indication href=\"http://www.xyz.com/email/123/abc.wml\"" +
                " created=\"1999-06-25T15:23:15Z\" si-expires=\"1999-06-30T00:00:00Z\">" +
                "You have 4 new emails</indication></si>";
-  let msg = SI.PduHelper.parse(data, contentType);
+  msg = SI.PduHelper.parse(data, contentType);
   do_check_eq(msg.content, result);
 
   run_next_test();
 });
 
 /**
  * SI compressed by WBXML with attributes and string table
  */
@@ -188,13 +188,13 @@ add_test(function test_si_parse_wbxml_wi
                   0xC3, 0x07, 0x19, 0x99, 0x06, 0x25, 0x15, 0x23,
                   0x15, 0x10, 0xC3, 0x04, 0x19, 0x99, 0x06, 0x30,
                   0x01, 0x83, 0x12, 0x01, 0x01
                 ]);
   data.offset = 0;
   let result = "<si><indication href=\"http://www.xyz.com/email/123/abc.wml\"" +
                " created=\"1999-06-25T15:23:15Z\" si-expires=\"1999-06-30T00:00:00Z\">" +
                "You have 4 new emails</indication></si>";
-  let msg = SI.PduHelper.parse(data, contentType);
+  msg = SI.PduHelper.parse(data, contentType);
   do_check_eq(msg.content, result);
 
   run_next_test();
 });
--- a/dom/wappush/tests/test_sl_pdu_helper.js
+++ b/dom/wappush/tests/test_sl_pdu_helper.js
@@ -46,42 +46,42 @@ add_test(function test_sl_parse_wbxml() 
   contentType = "application/vnd.wap.slc";
   data.array = new Uint8Array([
                   0x03, 0x06, 0x6A, 0x00, 0x85, 0x0A, 0x03, 0x6F,
                   0x72, 0x65, 0x69, 0x6C, 0x6C, 0x79, 0x00, 0x85,
                   0x01
                 ]);
   data.offset = 0;
   let result = "<sl href=\"http://www.oreilly.com/\"/>";
-  let msg = SL.PduHelper.parse(data, contentType);
+  msg = SL.PduHelper.parse(data, contentType);
   do_check_eq(msg.content, result);
 
   run_next_test();
 });
 
 /**
  * SL compressed by WBXML, with public ID stored in string table
  */
 add_test(function test_sl_parse_wbxml_public_id_string_table() {
-    let msg = {};
+  let msg = {};
   let contentType = "";
   let data = {};
 
   contentType = "application/vnd.wap.slc";
   data.array = new Uint8Array([
                   0x03, 0x00, 0x00, 0x6A, 0x1C, 0x2D, 0x2F, 0x2F,
                   0x57, 0x41, 0x50, 0x46, 0x4F, 0x52, 0x55, 0x4D,
                   0x2F, 0x2F, 0x44, 0x54, 0x44, 0x20, 0x53, 0x4C,
                   0x20, 0x31, 0x2E, 0x30, 0x2F, 0x2F, 0x45, 0x4E,
                   0x00, 0x85, 0x0A, 0x03, 0x6F, 0x72, 0x65, 0x69,
                   0x6C, 0x6C, 0x79, 0x00, 0x85, 0x01
                 ]);
   data.offset = 0;
   let result = "<sl href=\"http://www.oreilly.com/\"/>";
-  let msg = SL.PduHelper.parse(data, contentType);
+  msg = SL.PduHelper.parse(data, contentType);
   do_check_eq(msg.content, result);
 
   run_next_test();
 });
 
 /**
  * SL compressed by WBXML with string table
  */
@@ -93,13 +93,13 @@ add_test(function test_sl_parse_wbxml_wi
   contentType = "application/vnd.wap.slc";
   data.array = new Uint8Array([
                   0x03, 0x06, 0x6A, 0x08, 0x6F, 0x72, 0x65, 0x69,
                   0x6C, 0x6C, 0x79, 0x00, 0x85, 0x0A, 0x83, 0x00,
                   0x85, 0x01
                 ]);
   data.offset = 0;
   let result = "<sl href=\"http://www.oreilly.com/\"/>";
-  let msg = SL.PduHelper.parse(data, contentType);
+  msg = SL.PduHelper.parse(data, contentType);
   do_check_eq(msg.content, result);
 
   run_next_test();
 });
--- a/dom/workers/test/test_multi_sharedWorker_lifetimes.html
+++ b/dom/workers/test/test_multi_sharedWorker_lifetimes.html
@@ -65,33 +65,33 @@
           event = yield undefined;
           ok(event instanceof MessageEvent, "Got a MessageEvent");
           is(event.source, frame, "Correct window got the event");
           is(event.data.type, "result", "Got a result message");
           is(event.data.data, storedData, "Got stored data");
 
           // Navigate when the bfcache is disabled.
           info("Navigating to about:blank");
-          let frame = document.getElementById("frame");
+          frame = document.getElementById("frame");
           frame.onload = sendToGenerator;
           frame.src = "about:blank";
           frame.contentWindow.document.body.offsetTop;
 
           yield undefined;
 
           info("Navigating to " + frameRelativeURL);
           frame.src = frameRelativeURL;
           frame.contentWindow.document.body.offsetTop;
 
           yield undefined;
 
           frame = frame.contentWindow;
           frame.postMessage({ command: "retrieve" }, "*");
 
-          let event = yield undefined;
+          event = yield undefined;
           ok(event instanceof MessageEvent, "Got a MessageEvent");
           is(event.source, frame, "Correct window got the event");
           is(event.data.type, "result", "Got a result message");
           is(event.data.data, undefined, "No data stored");
 
           frame.postMessage({ command: "store", data: storedData }, "*");
           frame.postMessage({ command: "retrieve" }, "*");
 
@@ -103,17 +103,17 @@
 
           info("Enabling '" + bfCacheEnabledPref + "' pref");
           SpecialPowers.pushPrefEnv({ set: [[bfCacheEnabledPref, true],
                                             [bfCacheDepthPref, bfCacheDepth]] },
                                     sendToGenerator);
           yield undefined;
 
           // Navigate when the bfcache is enabled.
-          let frame = document.getElementById("frame");
+          frame = document.getElementById("frame");
           frame.onload = sendToGenerator;
 
           info("Navigating to about:blank");
           frame.src = "about:blank";
           frame.contentWindow.document.body.offsetTop;
 
           yield undefined;
 
@@ -131,17 +131,17 @@
           frame.src = frameRelativeURL;
           frame.contentWindow.document.body.offsetTop;
 
           yield undefined;
 
           frame = frame.contentWindow;
           frame.postMessage({ command: "retrieve" }, "*");
 
-          let event = yield undefined;
+          event = yield undefined;
           ok(event instanceof MessageEvent, "Got a MessageEvent");
           is(event.source, frame, "Correct window got the event");
           is(event.data.type, "result", "Got a result message");
           is(event.data.data, storedData, "Still have data stored");
 
           info("Resetting '" + bfCacheEnabledPref + "' pref");
           SpecialPowers.popPrefEnv(sendToGenerator);
           yield undefined;
--- a/dom/xbl/test/test_bug591198.html
+++ b/dom/xbl/test/test_bug591198.html
@@ -26,17 +26,17 @@ function runTest() {
   
   iframe.src = "file_bug591198_inner.html";
   let res = (yield);
   is(res.widths[0], res.widths[2], "binding was rendered");
   isnot(res.widths[0], res.widths[1], "binding was rendered");
   is(res.anonChildCount, 2, "correct number of anon children");
 
   iframe.src = "http://noxul.example.com/tests/dom/xbl/test/file_bug591198_inner.html";
-  let res = (yield);
+  res = (yield);
   is(res.widths[0], res.widths[1], "binding was not rendered");
   isnot(res.widths[0], res.widths[2], "binding was not rendered");
   is("anonChildCount" in res, false, "no anon children");
 
   SimpleTest.finish();
   yield undefined;
 }
 
--- a/extensions/cookie/test/unit/test_cookies_async_failure.js
+++ b/extensions/cookie/test/unit/test_cookies_async_failure.js
@@ -347,17 +347,17 @@ function run_test_3(generator)
   new _observer(sub_generator, "cookie-db-rebuilding");
   yield;
   do_execute_soon(function() { do_run_generator(sub_generator); });
   yield;
 
   // Close the profile.
   do_close_profile(sub_generator);
   yield;
-  let db = Services.storage.openDatabase(do_get_cookie_file(profile));
+  db = Services.storage.openDatabase(do_get_cookie_file(profile));
   do_check_eq(do_count_cookies_in_db(db), 0);
   db.close();
 
   // Check that the original database was renamed.
   do_check_true(do_get_backup_file(profile).exists());
   do_check_eq(do_get_backup_file(profile).fileSize, size);
 
   // Clean up.
--- a/extensions/cookie/test/unit/test_domain_eviction.js
+++ b/extensions/cookie/test/unit/test_domain_eviction.js
@@ -72,17 +72,17 @@ function do_run_test()
   do_timeout(2100, continue_test);
   yield;
 
   do_check_eq(countCookies("captchart.com", "captchart.com"), 50);
   Services.cookiemgr.add("captchart.com", "", "test200", "eviction",
     false, false, false, futureExpiry);
   do_check_eq(countCookies("captchart.com", "captchart.com"), 50);
 
-  let enumerator = Services.cookiemgr.getCookiesFromHost("captchart.com");
+  enumerator = Services.cookiemgr.getCookiesFromHost("captchart.com");
   while (enumerator.hasMoreElements()) {
     let cookie = enumerator.getNext().QueryInterface(Ci.nsICookie2);
     do_check_true(cookie.expiry == futureExpiry);
   }
 
   do_finish_generator_test(test_generator);
 }
 
--- a/extensions/cookie/test/unit/test_schema_2_migration.js
+++ b/extensions/cookie/test/unit/test_schema_2_migration.js
@@ -110,17 +110,17 @@ function do_run_test() {
                             futureExpiry, now, now + i, false, false, false);
 
     schema2db.insertCookie(cookie);
   }
 
   // Attempt to add a cookie with the same (name, host, path) values as another
   // cookie. This should succeed since we have a REPLACE clause for conflict on
   // the unique index.
-  let cookie = new Cookie("oh", "hai", "baz.com", "/",
+  cookie = new Cookie("oh", "hai", "baz.com", "/",
                           futureExpiry, now, now + 100, false, false, false);
 
   schema2db.insertCookie(cookie);
 
   // Check that there is, indeed, a singular cookie for baz.com.
   do_check_eq(do_count_cookies_in_db(schema2db.db, "baz.com"), 1);
 
   // Close it.
--- a/extensions/cookie/test/unit/test_schema_3_migration.js
+++ b/extensions/cookie/test/unit/test_schema_3_migration.js
@@ -111,15 +111,15 @@ function do_run_test() {
   schema3db = null;
 
   // Load the database. The cookies added immediately prior will have a NULL
   // creationTime column.
   do_load_profile();
 
   // Test the expected set of cookies.
   do_check_eq(Services.cookiemgr.countCookiesFromHost("cat.com"), 20);
-  let enumerator = Services.cookiemgr.getCookiesFromHost("cat.com");
-  let cookie = enumerator.getNext().QueryInterface(Ci.nsICookie2);
+  enumerator = Services.cookiemgr.getCookiesFromHost("cat.com");
+  cookie = enumerator.getNext().QueryInterface(Ci.nsICookie2);
   do_check_eq(cookie.creationTime, 0);
 
   finish_test();
 }
 
--- a/image/test/unit/test_moz_icon_uri.js
+++ b/image/test/unit/test_moz_icon_uri.js
@@ -108,17 +108,17 @@ function run_test() {
     uri = ioService.newURI(currentSpec, null, null);
   } catch (e) {
     exception = true;
   }
   do_check_eq(exception, false);
   exception = false; // reset exception value
 
   iconURI = uri.QueryInterface(Ci.nsIMozIconURI);
-  let fileURL = null;
+  fileURL = null;
   try {
     fileURL = iconURI.iconURL.QueryInterface(Ci.nsIFileURL);
   } catch (e) {
     exception = true;
   }
   do_check_eq(exception, false);
   exception = false; // reset exception value
 
--- a/js/xpconnect/tests/unit/test_sandbox_metadata.js
+++ b/js/xpconnect/tests/unit/test_sandbox_metadata.js
@@ -9,17 +9,17 @@ function run_test()
   let sandbox = Components.utils.Sandbox("http://www.blah.com", {
     metadata: "test metadata",
     addonId: "12345"
   });
 
   do_check_eq(Components.utils.getSandboxMetadata(sandbox), "test metadata");
   do_check_eq(Components.utils.getSandboxAddonId(sandbox), "12345");
 
-  let sandbox = Components.utils.Sandbox("http://www.blah.com", {
+  sandbox = Components.utils.Sandbox("http://www.blah.com", {
     metadata: { foopy: { bar: 2 }, baz: "hi" }
   });
 
   let metadata = Components.utils.getSandboxMetadata(sandbox);
   do_check_eq(metadata.baz, "hi");
   do_check_eq(metadata.foopy.bar, 2);
   metadata.baz = "foo";
 
--- a/mobile/android/base/tests/testHomeProvider.js
+++ b/mobile/android/base/tests/testHomeProvider.js
@@ -61,17 +61,17 @@ add_task(function test_save_and_delete()
     do_check_eq(row.getResultByName("dataset_id"), TEST_DATASET_ID);
     do_check_eq(row.getResultByName("url"), TEST_URL);
   });
 
   // Use the HomeProvider API to delete the data.
   yield storage.deleteAll();
 
   // Make sure the data was deleted.
-  let result = yield db.execute("SELECT * FROM items");
+  result = yield db.execute("SELECT * FROM items");
   do_check_eq(result.length, 0);
 
   db.close();
 });
 
 add_task(function test_row_validation() {
   // Use the HomeProvider API to save some data.
   let storage = HomeProvider.getStorage(TEST_DATASET_ID);
--- a/mobile/android/base/tests/testMozPay.js
+++ b/mobile/android/base/tests/testMozPay.js
@@ -76,17 +76,17 @@ add_task(function test_default() {
                      },
                      function(id, msg) {
                        do_throw("confirmPaymentRequest should not have failed");
                        deferred.resolve();
                      });
   yield deferred.promise;
 
   deferred = Promise.defer();
-  let id = getRequestId(1);
+  id = getRequestId(1);
   shouldPass = false;
   ui.showPaymentFlow(id,
                      {
                        uri: "chrome://roboextender/content/paymentsUI.html",
                        jwt: "#fail"
                      },
                      function(id, msg) {
                        do_throw("confirmPaymentRequest should not have failed");
--- a/modules/libpref/test/unit/test_libPrefs.js
+++ b/modules/libpref/test/unit/test_libPrefs.js
@@ -161,32 +161,32 @@ function run_test() {
   let pb_2 = ps.getBranch("UserPref.root.boolPref");
   do_check_eq(pb_2.getBoolPref(""), true);
   pb_2.setBoolPref(".anotherPref", false);
   let pb_3 = ps.getBranch("UserPref.root.boolPre");
   do_check_eq(pb_3.getBoolPref("f.anotherPref"), false);
 
   // int ...
   pb.setIntPref("UserPref.root.intPref", 23);
-  let pb_1 = ps.getBranch("UserPref.root.");
+  pb_1 = ps.getBranch("UserPref.root.");
   do_check_eq(pb_1.getIntPref("intPref"), 23);
-  let pb_2 = ps.getBranch("UserPref.root.intPref");
+  pb_2 = ps.getBranch("UserPref.root.intPref");
   do_check_eq(pb_2.getIntPref(""), 23);
   pb_2.setIntPref(".anotherPref", 69);
-  let pb_3 = ps.getBranch("UserPref.root.intPre");
+  pb_3 = ps.getBranch("UserPref.root.intPre");
   do_check_eq(pb_3.getIntPref("f.anotherPref"), 69);
 
   // char...
   pb.setCharPref("UserPref.root.charPref", "_char");
-  let pb_1 = ps.getBranch("UserPref.root.");
+  pb_1 = ps.getBranch("UserPref.root.");
   do_check_eq(pb_1.getCharPref("charPref"), "_char");
-  let pb_2 = ps.getBranch("UserPref.root.charPref");
+  pb_2 = ps.getBranch("UserPref.root.charPref");
   do_check_eq(pb_2.getCharPref(""), "_char");
   pb_2.setCharPref(".anotherPref", "_another");
-  let pb_3 = ps.getBranch("UserPref.root.charPre");
+  pb_3 = ps.getBranch("UserPref.root.charPre");
   do_check_eq(pb_3.getCharPref("f.anotherPref"), "_another");
 
   //**************************************************************************//
   // getChildlist tests
 
   // get an already set prefBranch
   pb1 = ps.getBranch("UserPref.root.");
   let prefList = pb1.getChildList("");
--- a/services/common/tests/unit/test_storage_server.js
+++ b/services/common/tests/unit/test_storage_server.js
@@ -147,38 +147,39 @@ add_test(function test_url_parsing() {
   do_check_eq(version, "2.0");
   do_check_eq(user, "12345");
   do_check_eq(first, "storage");
   do_check_eq(rest, "crypto/keys");
   do_check_eq(null, server.pathRE.exec("/nothing/else"));
 
   // Check that we can parse a collection URI.
   parts = server.pathRE.exec("/2.0/123/storage/crypto");
-  let [all, version, user, first, rest] = parts;
+  [all, version, user, first, rest] = parts;
   do_check_eq(all, "/2.0/123/storage/crypto");
   do_check_eq(version, "2.0");
   do_check_eq(user, "123");
   do_check_eq(first, "storage");
   do_check_eq(rest, "crypto");
 
   // We don't allow trailing slash on storage URI.
   parts = server.pathRE.exec("/2.0/1234/storage/");
   do_check_eq(parts, undefined);
 
   // storage alone is a valid request.
   parts = server.pathRE.exec("/2.0/123456/storage");
-  let [all, version, user, first, rest] = parts;
+  [all, version, user, first, rest] = parts;
   do_check_eq(all, "/2.0/123456/storage");
   do_check_eq(version, "2.0");
   do_check_eq(user, "123456");
   do_check_eq(first, "storage");
   do_check_eq(rest, undefined);
 
   parts = server.storageRE.exec("storage");
-  let [all, storage, collection, id] = parts;
+  let storage, collection, id;
+  [all, storage, collection, id] = parts;
   do_check_eq(all, "storage");
   do_check_eq(collection, undefined);
 
   run_next_test();
 });
 
 add_test(function test_basic_http() {
   let server = new StorageServer();
@@ -208,18 +209,18 @@ add_test(function test_info_collections(
   let request = localRequest(server, path, "123", "password");
   let error = doGetRequest(request);
   do_check_eq(error, null);
   do_check_eq(request.response.status, 200);
   do_check_eq(request.response.body, "{}");
 
   _("Creating an empty collection should result in collection appearing.");
   let coll = server.createCollection("123", "col1");
-  let request = localRequest(server, path, "123", "password");
-  let error = doGetRequest(request);
+  request = localRequest(server, path, "123", "password");
+  error = doGetRequest(request);
   do_check_eq(error, null);
   do_check_eq(request.response.status, 200);
   let info = JSON.parse(request.response.body);
   do_check_attribute_count(info, 1);
   do_check_true("col1" in info);
   do_check_eq(info.col1, coll.timestamp);
 
   server.stop(run_next_test);
@@ -317,20 +318,20 @@ add_test(function test_bso_if_modified_s
                              "123", "password");
   request.setHeader("X-If-Modified-Since", "" + server.serverTime());
   let error = doGetRequest(request);
   do_check_eq(null, error);
 
   do_check_eq(request.response.status, 304);
   do_check_false("content-type" in request.response.headers);
 
-  let request = localRequest(server, "/2.0/123/storage/test/bso",
+  request = localRequest(server, "/2.0/123/storage/test/bso",
                              "123", "password");
   request.setHeader("X-If-Modified-Since", "" + (server.serverTime() - 20000));
-  let error = doGetRequest(request);
+  error = doGetRequest(request);
   do_check_eq(null, error);
   do_check_eq(request.response.status, 200);
   do_check_eq(request.response.headers["content-type"], "application/json");
 
   server.stop(run_next_test);
 });
 
 add_test(function test_bso_if_unmodified_since() {
@@ -354,33 +355,33 @@ add_test(function test_bso_if_unmodified
   request.setHeader("X-If-Unmodified-Since", time - 5000);
   request.setHeader("Content-Type", "application/json");
   let payload = JSON.stringify({"payload": "foobar"});
   let error = doPutRequest(request, payload);
   do_check_eq(null, error);
   do_check_eq(request.response.status, 412);
 
   _("Ensure we get a 204 if update goes through.");
-  let request = localRequest(server, "/2.0/123/storage/test/bso",
-                             "123", "password");
+  request = localRequest(server, "/2.0/123/storage/test/bso",
+                         "123", "password");
   request.setHeader("Content-Type", "application/json");
   request.setHeader("X-If-Unmodified-Since", time + 1);
-  let error = doPutRequest(request, payload);
+  error = doPutRequest(request, payload);
   do_check_eq(null, error);
   do_check_eq(request.response.status, 204);
   do_check_true(coll.timestamp > time);
 
   // Not sure why a client would send X-If-Unmodified-Since if a BSO doesn't
   // exist. But, why not test it?
   _("Ensure we get a 201 if creation goes through.");
-  let request = localRequest(server, "/2.0/123/storage/test/none",
-                             "123", "password");
+  request = localRequest(server, "/2.0/123/storage/test/none",
+                         "123", "password");
   request.setHeader("Content-Type", "application/json");
   request.setHeader("X-If-Unmodified-Since", time);
-  let error = doPutRequest(request, payload);
+  error = doPutRequest(request, payload);
   do_check_eq(null, error);
   do_check_eq(request.response.status, 201);
 
   server.stop(run_next_test);
 });
 
 add_test(function test_bso_delete_not_exist() {
   _("Ensure server behaves properly when deleting a BSO that does not exist.");
@@ -427,19 +428,19 @@ add_test(function test_bso_delete_exists
                              "123", "password");
   let error = doDeleteRequest(request);
   do_check_eq(error, null);
   do_check_eq(request.response.status, 204);
   do_check_eq(coll.bsos().length, 0);
   do_check_true(coll.timestamp > timestamp);
 
   _("On next request the BSO should not exist.");
-  let request = localRequest(server, "/2.0/123/storage/test/myid",
-                             "123", "password");
-  let error = doGetRequest(request);
+  request = localRequest(server, "/2.0/123/storage/test/myid",
+                         "123", "password");
+  error = doGetRequest(request);
   do_check_eq(error, null);
   do_check_eq(request.response.status, 404);
 
   server.stop(run_next_test);
 });
 
 add_test(function test_bso_delete_unmodified() {
   _("Ensure X-If-Unmodified-Since works when deleting BSOs.");
@@ -458,19 +459,19 @@ add_test(function test_bso_delete_unmodi
   request.setHeader("X-If-Unmodified-Since", modified - 1000);
   let error = doDeleteRequest(request);
   do_check_eq(error, null);
   do_check_eq(request.response.status, 412);
   do_check_false("content-type" in request.response.headers);
   do_check_neq(coll.bso("myid"), null);
 
   _("Issuing a DELETE with a newer time should work.");
-  let request = localRequest(server, path, "123", "password");
+  request = localRequest(server, path, "123", "password");
   request.setHeader("X-If-Unmodified-Since", modified + 1000);
-  let error = doDeleteRequest(request);
+  error = doDeleteRequest(request);
   do_check_eq(error, null);
   do_check_eq(request.response.status, 204);
   do_check_true(coll.bso("myid").deleted);
 
   server.stop(run_next_test);
 });
 
 add_test(function test_collection_get_unmodified_since() {
@@ -489,17 +490,17 @@ add_test(function test_collection_get_un
   request1.setHeader("X-If-Unmodified-Since", serverModified);
   let error = doGetRequest(request1);
   do_check_null(error);
   do_check_eq(request1.response.status, 200);
 
   let request2 = localRequest(server, "/2.0/123/storage/testcoll",
                               "123", "password");
   request2.setHeader("X-If-Unmodified-Since", serverModified - 1);
-  let error = doGetRequest(request2);
+  error = doGetRequest(request2);
   do_check_null(error);
   do_check_eq(request2.response.status, 412);
 
   server.stop(run_next_test);
 });
 
 add_test(function test_bso_get_unmodified_since() {
   _("Ensure conditional unmodified get on BSO works appropriately.");
@@ -517,17 +518,17 @@ add_test(function test_bso_get_unmodifie
   request1.setHeader("X-If-Unmodified-Since", serverModified);
   let error = doGetRequest(request1);
   do_check_null(error);
   do_check_eq(request1.response.status, 200);
 
   let request2 = localRequest(server, "/2.0/123/storage/testcoll/bso0",
                               "123", "password");
   request2.setHeader("X-If-Unmodified-Since", serverModified - 1);
-  let error = doGetRequest(request2);
+  error = doGetRequest(request2);
   do_check_null(error);
   do_check_eq(request2.response.status, 412);
 
   server.stop(run_next_test);
 });
 
 add_test(function test_missing_collection_404() {
   _("Ensure a missing collection returns a 404.");
--- a/services/common/tests/unit/test_storageservice_bso.js
+++ b/services/common/tests/unit/test_storageservice_bso.js
@@ -16,22 +16,22 @@ add_test(function test_bso_constructor()
   do_check_eq(bso.id, null);
   do_check_eq(bso.collection, null);
   do_check_attribute_count(bso.data, 0);
   do_check_eq(bso.payload, null);
   do_check_eq(bso.modified, null);
   do_check_eq(bso.sortindex, 0);
   do_check_eq(bso.ttl, null);
 
-  let bso = new BasicStorageObject("foobar");
+  bso = new BasicStorageObject("foobar");
   do_check_eq(bso.id, "foobar");
   do_check_eq(bso.collection, null);
   do_check_attribute_count(bso.data, 0);
 
-  let bso = new BasicStorageObject("foo", "coll");
+  bso = new BasicStorageObject("foo", "coll");
   do_check_eq(bso.id, "foo");
   do_check_eq(bso.collection, "coll");
   do_check_attribute_count(bso.data, 0);
 
   run_next_test();
 });
 
 add_test(function test_bso_attributes() {
@@ -61,45 +61,45 @@ add_test(function test_bso_deserialize()
   let bso = new BasicStorageObject();
   bso.deserialize(json);
   do_check_neq(bso, null);
   do_check_eq(bso.id, "foobar");
   do_check_eq(bso.payload, "pay");
   do_check_eq(bso.modified, 1223145532);
 
   _("Invalid JSON.");
-  let json = '{id: "foobar}';
-  let bso = new BasicStorageObject();
+  json = '{id: "foobar}';
+  bso = new BasicStorageObject();
   try {
     bso.deserialize(json);
     do_check_true(false);
   } catch (ex) {
     do_check_eq(ex.name, "SyntaxError");
   }
 
   _("Invalid key in JSON.");
-  let json = '{"id": "foo", "payload": "pay", "BADKEY": "irrelevant"}';
-  let bso = new BasicStorageObject();
+  json = '{"id": "foo", "payload": "pay", "BADKEY": "irrelevant"}';
+  bso = new BasicStorageObject();
   try {
     bso.deserialize(json);
     do_check_true(false);
   } catch (ex) {
     do_check_eq(ex.name, "Error");
     do_check_eq(ex.message.indexOf("Invalid key"), 0);
   }
 
   _("Loading native JS objects works.");
-  let bso = new BasicStorageObject();
+  bso = new BasicStorageObject();
   bso.deserialize({id: "foo", payload: "pay"});
   do_check_neq(bso, null);
   do_check_eq(bso.id, "foo");
   do_check_eq(bso.payload, "pay");
 
   _("Passing invalid type is caught.");
-  let bso = new BasicStorageObject();
+  bso = new BasicStorageObject();
   try {
     bso.deserialize(["foo", "bar"]);
     do_check_true(false);
   } catch (ex) {
     do_check_eq(ex.name, "Error");
   }
 
   run_next_test();
--- a/services/crypto/tests/unit/test_crypto_crypt.js
+++ b/services/crypto/tests/unit/test_crypto_crypt.js
@@ -33,17 +33,17 @@ function test_key_memoization() {
     c++;
     return oldImport(slot, type, origin, operation, key, wincx);
   }
 
   // Encryption should cause a single counter increment.
   do_check_eq(c, 0);
   let cipherText = cryptoSvc.encrypt("Hello, world.", key, iv);
   do_check_eq(c, 1);
-  let cipherText = cryptoSvc.encrypt("Hello, world.", key, iv);
+  cipherText = cryptoSvc.encrypt("Hello, world.", key, iv);
   do_check_eq(c, 1);
 
   // ... as should decryption.
   cryptoSvc.decrypt(cipherText, key, iv);
   cryptoSvc.decrypt(cipherText, key, iv);
   cryptoSvc.decrypt(cipherText, key, iv);
   do_check_eq(c, 2);
 
--- a/services/crypto/tests/unit/test_utils_httpmac.js
+++ b/services/crypto/tests/unit/test_utils_httpmac.js
@@ -27,17 +27,17 @@ add_test(function test_sha1() {
   do_check_eq(btoa(result.mac), "jzh5chjQc2zFEvLbyHnPdX11Yck=");
 
   do_check_eq(result.getHeader(),
               'MAC id="vmo1txkttblmn51u2p3zk2xiy16hgvm5ok8qiv1yyi86ffjzy9zj0ez9x6wnvbx7", ' +
               'ts="1329181221", nonce="wGX71", mac="jzh5chjQc2zFEvLbyHnPdX11Yck="');
 
   let ext = "EXTRA DATA; foo,bar=1";
 
-  let result = CryptoUtils.computeHTTPMACSHA1(id, key, method, uri,
+  result = CryptoUtils.computeHTTPMACSHA1(id, key, method, uri,
                                               {ts: ts, nonce: nonce, ext: ext});
   do_check_eq(btoa(result.mac), "bNf4Fnt5k6DnhmyipLPkuZroH68=");
   do_check_eq(result.getHeader(),
               'MAC id="vmo1txkttblmn51u2p3zk2xiy16hgvm5ok8qiv1yyi86ffjzy9zj0ez9x6wnvbx7", ' +
               'ts="1329181221", nonce="wGX71", mac="bNf4Fnt5k6DnhmyipLPkuZroH68=", ' +
               'ext="EXTRA DATA; foo,bar=1"');
 
   run_next_test();
@@ -51,19 +51,19 @@ add_test(function test_nonce_length() {
     return CryptoUtils.computeHTTPMACSHA1("foo", "bar", "GET", uri, {
       nonce_bytes: length
     });
   }
 
   let result = get_mac(12);
   do_check_eq(12, atob(result.nonce).length);
 
-  let result = get_mac(2);
+  result = get_mac(2);
   do_check_eq(2, atob(result.nonce).length);
 
-  let result = get_mac(0);
+  result = get_mac(0);
   do_check_eq(8, atob(result.nonce).length);
 
-  let result = get_mac(-1);
+  result = get_mac(-1);
   do_check_eq(8, atob(result.nonce).length);
 
   run_next_test();
 });
--- a/services/fxaccounts/tests/xpcshell/test_accounts.js
+++ b/services/fxaccounts/tests/xpcshell/test_accounts.js
@@ -157,35 +157,35 @@ add_task(function test_get_signed_in_use
     verified: true
   };
 
   let result = yield account.getSignedInUser();
   do_check_eq(result, null);
 
   yield account.setSignedInUser(credentials);
 
-  let result = yield account.getSignedInUser();
+  result = yield account.getSignedInUser();
   do_check_eq(result.email, credentials.email);
   do_check_eq(result.assertion, credentials.assertion);
   do_check_eq(result.kB, credentials.kB);
 
   // Delete the memory cache and force the user
   // to be read and parsed from storage (e.g. disk via JSONStorage).
   delete account.internal.signedInUser;
-  let result = yield account.getSignedInUser();
+  result = yield account.getSignedInUser();
   do_check_eq(result.email, credentials.email);
   do_check_eq(result.assertion, credentials.assertion);
   do_check_eq(result.kB, credentials.kB);
 
   // sign out
   let localOnly = true;
   yield account.signOut(localOnly);
 
   // user should be undefined after sign out
-  let result = yield account.getSignedInUser();
+  result = yield account.getSignedInUser();
   do_check_eq(result, null);
 });
 
 // Sanity-check that our mocked client is working correctly
 add_test(function test_client_mock() {
   do_test_pending();
 
   let fxa = new MockFxAccounts();
--- a/services/fxaccounts/tests/xpcshell/test_client.js
+++ b/services/fxaccounts/tests/xpcshell/test_client.js
@@ -272,24 +272,24 @@ add_task(function test_signIn() {
   let client = new FxAccountsClient(server.baseURI);
   let result = yield client.signIn('mé@example.com', 'bigsecret');
   do_check_eq(FAKE_SESSION_TOKEN, result.sessionToken);
   do_check_eq(result.unwrapBKey,
               "c076ec3f4af123a615157154c6e1d0d6293e514fd7b0221e32d50517ecf002b8");
   do_check_eq(undefined, result.keyFetchToken);
 
   // Login with retrieving optional keys
-  let result = yield client.signIn('you@example.com', 'bigsecret', true);
+  result = yield client.signIn('you@example.com', 'bigsecret', true);
   do_check_eq(FAKE_SESSION_TOKEN, result.sessionToken);
   do_check_eq(result.unwrapBKey,
               "65970516211062112e955d6420bebe020269d6b6a91ebd288319fc8d0cb49624");
   do_check_eq("keyFetchToken", result.keyFetchToken);
 
   // Retry due to wrong email capitalization
-  let result = yield client.signIn('You@example.com', 'bigsecret', true);
+  result = yield client.signIn('You@example.com', 'bigsecret', true);
   do_check_eq(FAKE_SESSION_TOKEN, result.sessionToken);
   do_check_eq(result.unwrapBKey,
               "65970516211062112e955d6420bebe020269d6b6a91ebd288319fc8d0cb49624");
   do_check_eq("keyFetchToken", result.keyFetchToken);
 
   // Don't retry due to wrong email capitalization
   try {
     let result = yield client.signIn('You@example.com', 'bigsecret', true, false);
--- a/services/fxaccounts/tests/xpcshell/test_loginmgr_storage.js
+++ b/services/fxaccounts/tests/xpcshell/test_loginmgr_storage.js
@@ -123,17 +123,17 @@ add_task(function test_migrationMPUnlock
   let path = OS.Path.join(OS.Constants.Path.profileDir, "signedInUser.json");
   yield CommonUtils.writeJSON(toWrite, path);
 
   // now load it - it should migrate.
   let data = yield fxa.getSignedInUser();
   Assert.deepEqual(data, creds, "we got all the data back");
 
   // and verify it was actually migrated - re-read signedInUser back.
-  let data = yield CommonUtils.readJSON(path);
+  data = yield CommonUtils.readJSON(path);
 
   Assert.strictEqual(data.accountData.email, creds.email, "correct email in the clear text");
   Assert.strictEqual(data.accountData.sessionToken, creds.sessionToken, "correct sessionToken in the clear text");
   Assert.strictEqual(data.accountData.verified, creds.verified, "correct verified flag");
 
   Assert.ok(!("kA" in data.accountData), "kA not stored in clear text");
   Assert.ok(!("kB" in data.accountData), "kB not stored in clear text");
 
@@ -250,17 +250,17 @@ add_task(function test_consistentWithMPE
   Assert.strictEqual(login.username, creds1.email);
   // and that we do have the first kA in the login manager.
   Assert.strictEqual(JSON.parse(login.password).accountData.kA, creds1.kA,
                      "stale data still in login mgr");
 
   // Make a new FxA instance (otherwise the values in memory will be used.)
   // Because we haven't overridden _isLoggedIn for this new instance it will
   // treat the MP as unlocked.
-  let fxa = new FxAccounts({});
+  fxa = new FxAccounts({});
 
   let accountData = yield fxa.getSignedInUser();
   Assert.strictEqual(accountData.email, creds2.email);
   // we should have no kA at all.
   Assert.strictEqual(accountData.kA, undefined, "stale kA wasn't used");
   yield fxa.signOut(/* localOnly = */ true)
 });
 
--- a/services/sync/tests/unit/test_addons_reconciler.js
+++ b/services/sync/tests/unit/test_addons_reconciler.js
@@ -174,17 +174,17 @@ add_test(function test_prune_changes_bef
   do_check_eq(2, reconciler._changes.length);
 
   _("Ensure pruning with an old time won't delete anything.");
   let threshold = new Date(old.getTime() - 1);
   reconciler.pruneChangesBeforeDate(threshold);
   do_check_eq(2, reconciler._changes.length);
 
   _("Ensure pruning a single item works.");
-  let threshold = new Date(young.getTime() - 1000);
+  threshold = new Date(young.getTime() - 1000);
   reconciler.pruneChangesBeforeDate(threshold);
   do_check_eq(1, reconciler._changes.length);
   do_check_neq(undefined, reconciler._changes[0]);
   do_check_eq(young, reconciler._changes[0][0]);
   do_check_eq("bar", reconciler._changes[0][2]);
 
   _("Ensure pruning all changes works.");
   reconciler._changes.push([old, CHANGE_INSTALLED, "foo"]);
--- a/services/sync/tests/unit/test_bookmark_engine.js
+++ b/services/sync/tests/unit/test_bookmark_engine.js
@@ -375,17 +375,16 @@ add_test(function test_mismatched_types(
 });
 
 add_test(function test_bookmark_guidMap_fail() {
   _("Ensure that failures building the GUID map cause early death.");
 
   let engine = new BookmarksEngine(Service);
   let store = engine._store;
 
-  let store  = engine._store;
   let server = serverForFoo(engine);
   let coll   = server.user("foo").collection("bookmarks");
   new SyncTestingInfrastructure(server.server);
 
   // Add one item to the server.
   let itemID = PlacesUtils.bookmarks.createFolder(
     PlacesUtils.bookmarks.toolbarFolder, "Folder 1", 0);
   let itemGUID    = store.GUIDForId(itemID);
--- a/services/sync/tests/unit/test_httpd_sync_server.js
+++ b/services/sync/tests/unit/test_httpd_sync_server.js
@@ -31,38 +31,39 @@ add_test(function test_url_parsing() {
   do_check_eq(version, "1.1");
   do_check_eq(username, "johnsmith");
   do_check_eq(first, "storage");
   do_check_eq(rest, "crypto/keys");
   do_check_eq(null, server.pathRE.exec("/nothing/else"));
 
   // Check that we can parse a collection URI.
   parts = server.pathRE.exec("/1.1/johnsmith/storage/crypto");
-  let [all, version, username, first, rest] = parts;
+  [all, version, username, first, rest] = parts;
   do_check_eq(all, "/1.1/johnsmith/storage/crypto");
   do_check_eq(version, "1.1");
   do_check_eq(username, "johnsmith");
   do_check_eq(first, "storage");
   do_check_eq(rest, "crypto");
 
   // We don't allow trailing slash on storage URI.
   parts = server.pathRE.exec("/1.1/johnsmith/storage/");
   do_check_eq(parts, undefined);
 
   // storage alone is a valid request.
   parts = server.pathRE.exec("/1.1/johnsmith/storage");
-  let [all, version, username, first, rest] = parts;
+  [all, version, username, first, rest] = parts;
   do_check_eq(all, "/1.1/johnsmith/storage");
   do_check_eq(version, "1.1");
   do_check_eq(username, "johnsmith");
   do_check_eq(first, "storage");
   do_check_eq(rest, undefined);
 
   parts = server.storageRE.exec("storage");
-  let [all, storage, collection, id] = parts;
+  let storage, collection, id;
+  [all, storage, collection, id] = parts;
   do_check_eq(all, "storage");
   do_check_eq(collection, undefined);
 
   run_next_test();
 });
 
 Cu.import("resource://services-common/rest.js");
 function localRequest(server, path) {
--- a/services/sync/tests/unit/test_resource.js
+++ b/services/sync/tests/unit/test_resource.js
@@ -148,17 +148,17 @@ function server_headers(metadata, respon
   response.bodyOutputStream.write(body, body.length);
 }
 
 function run_test() {
   initTestLogging("Trace");
 
   do_test_pending();
 
-  logger = Log.repository.getLogger('Test');
+  let logger = Log.repository.getLogger('Test');
   Log.repository.rootLogger.addAppender(new Log.DumpAppender());
 
   let server = httpd_setup({
     "/open": server_open,
     "/protected": server_protected,
     "/404": server_404,
     "/upload": server_upload,
     "/delete": server_delete,
@@ -201,17 +201,17 @@ function run_test() {
   content = res.get();
   do_check_eq(content, "This path exists");
   do_check_eq(content.status, 200);
   do_check_true(content.success);
   // res.data has been updated with the result from the request
   do_check_eq(res.data, content);
 
   // Observe logging messages.
-  let logger = res._log;
+  logger = res._log;
   let dbg    = logger.debug;
   let debugMessages = [];
   logger.debug = function (msg) {
     debugMessages.push(msg);
     dbg.call(this, msg);
   }
 
   // Since we didn't receive proper JSON data, accessing content.obj
--- a/services/sync/tests/unit/test_syncengine_sync.js
+++ b/services/sync/tests/unit/test_syncengine_sync.js
@@ -396,18 +396,18 @@ add_test(function test_processIncoming_r
   let now = Date.now() / 1000 - 10;
   engine.lastSync = now;
   engine.lastModified = now + 1;
 
   let record = encryptPayload({id: "DUPE_INCOMING", denomination: "incoming"});
   let wbo = new ServerWBO("DUPE_INCOMING", record, now + 2);
   server.insertWBO(user, "rotary", wbo);
 
-  let record = encryptPayload({id: "DUPE_LOCAL", denomination: "local"});
-  let wbo = new ServerWBO("DUPE_LOCAL", record, now - 1);
+  record = encryptPayload({id: "DUPE_LOCAL", denomination: "local"});
+  wbo = new ServerWBO("DUPE_LOCAL", record, now - 1);
   server.insertWBO(user, "rotary", wbo);
 
   engine._store.create({id: "DUPE_LOCAL", denomination: "local"});
   do_check_true(engine._store.itemExists("DUPE_LOCAL"));
   do_check_eq("DUPE_LOCAL", engine._findDupe({id: "DUPE_INCOMING"}));
 
   engine._sync();
 
@@ -470,17 +470,17 @@ add_test(function test_processIncoming_r
 
   engine._sync();
 
   // After the sync, the server's payload for the original ID should be marked
   // as deleted.
   do_check_empty(engine._store.items);
   let collection = server.getCollection(user, "rotary");
   do_check_eq(1, collection.count());
-  let wbo = collection.wbo("DUPE_INCOMING");
+  wbo = collection.wbo("DUPE_INCOMING");
   do_check_neq(null, wbo);
   let payload = JSON.parse(JSON.parse(wbo.payload).ciphertext);
   do_check_true(payload.deleted);
 
   cleanAndGo(server);
 });
 
 add_test(function test_processIncoming_reconcile_locally_deleted_dupe_old() {
@@ -510,17 +510,17 @@ add_test(function test_processIncoming_r
 
   // Since the remote change is newer, the incoming item should exist locally.
   do_check_attribute_count(engine._store.items, 1);
   do_check_true("DUPE_INCOMING" in engine._store.items);
   do_check_eq("incoming", engine._store.items.DUPE_INCOMING);
 
   let collection = server.getCollection(user, "rotary");
   do_check_eq(1, collection.count());
-  let wbo = collection.wbo("DUPE_INCOMING");
+  wbo = collection.wbo("DUPE_INCOMING");
   let payload = JSON.parse(JSON.parse(wbo.payload).ciphertext);
   do_check_eq("incoming", payload.denomination);
 
   cleanAndGo(server);
 });
 
 add_test(function test_processIncoming_reconcile_changed_dupe() {
   _("Ensure that locally changed duplicate record is handled properly.");
@@ -546,17 +546,17 @@ add_test(function test_processIncoming_r
   // The ID should have been changed to incoming.
   do_check_attribute_count(engine._store.items, 1);
   do_check_true("DUPE_INCOMING" in engine._store.items);
 
   // On the server, the local ID should be deleted and the incoming ID should
   // have its payload set to what was in the local record.
   let collection = server.getCollection(user, "rotary");
   do_check_eq(1, collection.count());
-  let wbo = collection.wbo("DUPE_INCOMING");
+  wbo = collection.wbo("DUPE_INCOMING");
   do_check_neq(undefined, wbo);
   let payload = JSON.parse(JSON.parse(wbo.payload).ciphertext);
   do_check_eq("local", payload.denomination);
 
   cleanAndGo(server);
 });
 
 add_test(function test_processIncoming_reconcile_changed_dupe_new() {
@@ -584,17 +584,17 @@ add_test(function test_processIncoming_r
   // The ID should have been changed to incoming.
   do_check_attribute_count(engine._store.items, 1);
   do_check_true("DUPE_INCOMING" in engine._store.items);
 
   // On the server, the local ID should be deleted and the incoming ID should
   // have its payload retained.
   let collection = server.getCollection(user, "rotary");
   do_check_eq(1, collection.count());
-  let wbo = collection.wbo("DUPE_INCOMING");
+  wbo = collection.wbo("DUPE_INCOMING");
   do_check_neq(undefined, wbo);
   let payload = JSON.parse(JSON.parse(wbo.payload).ciphertext);
   do_check_eq("incoming", payload.denomination);
   cleanAndGo(server);
 });
 
 add_test(function test_processIncoming_mobile_batchSize() {
   _("SyncEngine._processIncoming doesn't fetch everything at once on mobile clients");
--- a/services/sync/tests/unit/test_tab_store.js
+++ b/services/sync/tests/unit/test_tab_store.js
@@ -22,29 +22,29 @@ function test_create() {
              clientName: "clientName1",
              cleartext: "cleartext1",
              modified: 1000};
   store.applyIncoming(rec);
   do_check_eq(store._remoteClients["id1"], "cleartext1");
   do_check_eq(Svc.Prefs.get("notifyTabState"), 1);
 
   _("Create a second record");
-  let rec = {id: "id2",
-             clientName: "clientName2",
-             cleartext: "cleartext2",
-             modified: 2000};
+  rec = {id: "id2",
+         clientName: "clientName2",
+         cleartext: "cleartext2",
+         modified: 2000};
   store.applyIncoming(rec);
   do_check_eq(store._remoteClients["id2"], "cleartext2");
   do_check_eq(Svc.Prefs.get("notifyTabState"), 0);
 
   _("Create a third record");
-  let rec = {id: "id3",
-             clientName: "clientName3",
-             cleartext: "cleartext3",
-             modified: 3000};
+  rec = {id: "id3",
+         clientName: "clientName3",
+         cleartext: "cleartext3",
+         modified: 3000};
   store.applyIncoming(rec);
   do_check_eq(store._remoteClients["id3"], "cleartext3");
   do_check_eq(Svc.Prefs.get("notifyTabState"), 0);
 
   // reset the notifyTabState
   Svc.Prefs.reset("notifyTabState");
 }
 
--- a/storage/test/unit/test_cache_size.js
+++ b/storage/test/unit/test_cache_size.js
@@ -33,17 +33,17 @@ function check_size(dbOpener, file, page
   // Create a simple table.
   db.executeSimpleSQL("CREATE TABLE test ( id INTEGER PRIMARY KEY )");
 
   // Close and re-open the DB.
   db.close();
   db = dbOpener(file);
 
   // Check cache size is as expected.
-  let stmt = db.createStatement("PRAGMA cache_size");
+  stmt = db.createStatement("PRAGMA cache_size");
   do_check_true(stmt.executeStep());
   do_check_eq(stmt.row.cache_size, expectedCacheSize);
   stmt.finalize();
 }
 
 function new_file(name)
 {
   let file = dirSvc.get("ProfD", Ci.nsIFile);
--- a/storage/test/unit/test_storage_connection.js
+++ b/storage/test/unit/test_storage_connection.js
@@ -536,17 +536,16 @@ add_task(function test_clone_trivial_asy
 add_task(function test_clone_no_optional_param_async()
 {
   "use strict";
   do_print("Testing async cloning");
   let adb1 = yield openAsyncDatabase(getTestDB(), null);
   do_check_true(adb1 instanceof Ci.mozIStorageAsyncConnection);
 
   do_print("Cloning database");
-  do_check_true(Components.isSuccessCode(result));
 
   let adb2 = yield asyncClone(adb1);
   do_print("Testing that the cloned db is a mozIStorageAsyncConnection " +
            "and not a mozIStorageConnection");
   do_check_true(adb2 instanceof Ci.mozIStorageAsyncConnection);
   do_check_false(adb2 instanceof Ci.mozIStorageConnection);
 
   do_print("Inserting data into source db");
--- a/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js
+++ b/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js
@@ -220,17 +220,17 @@ function testCacheEviction(uri, prefName
     cps.setPref(uriToAdd, prefName, 0);
   }
 
   do_check_false(isCached(uri, prefName));
 
 }
 
 function selectValue(stmt, columnName, param1, param2) {
-  let stmt = cps.DBConnection.createStatement(stmt);
+  stmt = cps.DBConnection.createStatement(stmt);
   if (param1)
     stmt.params.param1 = param1;
 
   if (param2)
     stmt.params.param2 = param2;
 
   stmt.executeStep();
   let val = stmt.row[columnName];
--- a/toolkit/components/crashes/tests/xpcshell/test_crash_store.js
+++ b/toolkit/components/crashes/tests/xpcshell/test_crash_store.js
@@ -518,17 +518,17 @@ add_task(function* test_addSubmission() 
   Assert.equal(submission.requestDate.getTime(), DUMMY_DATE.getTime());
   Assert.equal(submission.responseDate.getTime(), DUMMY_DATE_2.getTime());
   Assert.equal(submission.result, SUBMISSION_RESULT_FAILED);
 
   Assert.ok(s.addSubmissionAttempt("crash1", "sub2", DUMMY_DATE));
   Assert.ok(s.addSubmissionResult("crash1", "sub2", DUMMY_DATE_2,
                                   SUBMISSION_RESULT_OK));
 
-  let submission = s.getSubmission("crash1", "sub2");
+  submission = s.getSubmission("crash1", "sub2");
   Assert.ok(!!submission);
   Assert.equal(submission.result, SUBMISSION_RESULT_OK);
 });
 
 add_task(function* test_convertSubmissionsStoredAsCrashes() {
   let s = yield getStore();
 
   let addSubmissionAsCrash = (processType, crashType, succeeded, id, date) => {
--- a/toolkit/components/ctypes/tests/chrome/test_ctypes.xul
+++ b/toolkit/components/ctypes/tests/chrome/test_ctypes.xul
@@ -35,17 +35,17 @@
         return getLocalDir(path);
       }
     }
 
     function getLocalDir(path) {
       let dir = Components.classes["@mozilla.org/file/directory_service;1"]
                           .getService(Components.interfaces.nsIProperties)
                           .get("CurWorkD", Components.interfaces.nsILocalFile);
-      let path = location.pathname;
+      path = location.pathname;
       path = path.slice("content/".length,
                                          -1 * "/test_ctypes.xul".length);
       let components = path.split("/");
       for (let part in components) {
         dir.append(components[part]);
       }
       return dir;    
     }
--- a/toolkit/components/ctypes/tests/unit/test_jsctypes.js
+++ b/toolkit/components/ctypes/tests/unit/test_jsctypes.js
@@ -973,18 +973,18 @@ function run_float_tests(library, t, nam
 
   // Check that values roundtrip through toSource() correctly.
   function test_roundtrip(t, val)
   {
     let f1 = t(val);
     eval("let f2 = " + f1.toSource());
     do_check_eq(f1.value, f2.value);
   }
-  let vals = [Infinity, -Infinity, -0, 0, 1, -1, 1/3, -1/3, 1/4, -1/4,
-              1e-14, -1e-14, 0xfffffffffffff000, -0xfffffffffffff000];
+  vals = [Infinity, -Infinity, -0, 0, 1, -1, 1/3, -1/3, 1/4, -1/4,
+          1e-14, -1e-14, 0xfffffffffffff000, -0xfffffffffffff000];
   for (let i = 0; i < vals.length; i++)
     test_roundtrip(t, vals[i]);
   do_check_eq(t(NaN).toSource(), t.toSource() + "(NaN)");
 
   do_check_true(d.address().constructor === t.ptr);
   do_check_eq(d.address().contents, d.value);
   do_check_eq(d.toSource(), "ctypes." + name + "(" + d.value + ")");
   do_check_eq(d.toSource(), d.toString());
@@ -1698,17 +1698,17 @@ function run_PointerType_tests() {
 
   // Test opaque pointers.
   let f_t = ctypes.StructType("FILE").ptr;
   do_check_eq(f_t.name, "FILE*");
   do_check_eq(f_t.toSource(), 'ctypes.StructType("FILE").ptr');
   let f = new f_t();
   do_check_throws(function() { f.contents; }, Error);
   do_check_throws(function() { f.contents = 0; }, Error);
-  let f = f_t(5);
+  f = f_t(5);
   do_check_throws(function() { f.contents = 0; }, Error);
   do_check_eq(f.toSource(), 'FILE.ptr(ctypes.UInt64("0x5"))');
 
   do_check_throws(function() { f_t(p); }, TypeError);
   do_check_throws(function() { f.value = p; }, TypeError);
   do_check_throws(function() { p.value = f; }, TypeError);
 
   // Test void pointers.
@@ -1726,17 +1726,17 @@ function run_PointerType_tests() {
 
   // Test 'isNull'.
   let n = f_t(0);
   do_check_true(n.isNull() === true);
   n = p.address();
   do_check_true(n.isNull() === false);
 
   // Test 'increment'/'decrement'.
-  let g_t = ctypes.StructType("g_t", [{ a: ctypes.int32_t }, { b: ctypes.double }]);
+  g_t = ctypes.StructType("g_t", [{ a: ctypes.int32_t }, { b: ctypes.double }]);
   let a_t = ctypes.ArrayType(g_t, 2);
   let a = new a_t();
   a[0] = g_t(1, 2);
   a[1] = g_t(2, 4);
   let a_p = a.addressOfElement(0).increment();
   do_check_eq(a_p.contents.a, 2);
   do_check_eq(a_p.contents.b, 4);
   a_p = a_p.decrement();
@@ -2710,17 +2710,17 @@ function run_variadic_tests(library) {
 
   add_char_short_int_va(result.address(),
                         ctypes.char(5),
                         ctypes.short(7),
                         ctypes.uint32_t(11));
 
   do_check_eq(result.value, 3 + 5 + 7 + 11);
 
-  let result = ctypes.int32_t.array(3)([1,1,1]),
+  result = ctypes.int32_t.array(3)([1,1,1]),
       v1 = ctypes.int32_t.array(4)([1,2,3,5]),
       v2 = ctypes.int32_t.array(3)([7,11,13]),
       vector_add_va = library.declare("test_vector_add_va_cdecl",
                                       ctypes.default_abi, ctypes.int32_t.ptr,
                                       ctypes.uint8_t, ctypes.uint8_t, "..."),
       // Note that vector_add_va zeroes out result first.
       vec_sum = vector_add_va(2, 3, result, v1, v2);
   do_check_eq(vec_sum.contents, 8);
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
+++ b/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
@@ -139,17 +139,17 @@ add_task(function test_getPreferredDownl
   Services.prefs.setIntPref(folderListPrefName, 0);
   downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
   do_check_neq(downloadDir, "");
   do_check_eq(downloadDir, Services.dirsvc.get("Desk", Ci.nsIFile).path);
 
   // Should return the system downloads directory because the dir preference
   // is not set.
   Services.prefs.setIntPref(folderListPrefName, 2);
-  let downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
+  downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
   do_check_neq(downloadDir, "");
   do_check_eq(downloadDir, systemDir);
 
   // Should return the directory which is listed in the dir preference.
   let time = (new Date()).getTime();
   let tempDir = Services.dirsvc.get("TmpD", Ci.nsIFile);
   tempDir.append(time);
   Services.prefs.setComplexValue("browser.download.dir", Ci.nsIFile, tempDir);
@@ -166,17 +166,17 @@ add_task(function test_getPreferredDownl
   tempDir.append(time);
   Services.prefs.setComplexValue("browser.download.dir", Ci.nsIFile, tempDir);
   downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
   do_check_eq(downloadDir, systemDir);
 
   // Should return the system downloads directory because the folderList
   // preference is invalid
   Services.prefs.setIntPref(folderListPrefName, 999);
-  let downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
+  downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
   do_check_eq(downloadDir, systemDir);
 
   cleanup();
 });
 
 /**
  * Tests that the getTemporaryDownloadsDirectory returns a valid download
  * directory string path.
--- a/toolkit/components/osfile/tests/xpcshell/test_unique.js
+++ b/toolkit/components/osfile/tests/xpcshell/test_unique.js
@@ -25,17 +25,17 @@ function testFiles(filename) {
     do_check_true(fileInfo.size == 0);
 
     // Ensure that openUnique() creates a new file name using a HEX number, as the original name is already taken.
     openedFile = yield OS.File.openUnique(path);
     do_print("\nCreate unique HEX file: " + openedFile.path);
     yield openedFile.file.close();
     exists = yield OS.File.exists(openedFile.path);
     do_check_true(exists);
-    let fileInfo = yield OS.File.stat(openedFile.path);
+    fileInfo = yield OS.File.stat(openedFile.path);
     do_check_true(fileInfo.size == 0);
 
     // Ensure that openUnique() generates different file names each time, using the HEX number algorithm
     let filenames = new Set();
     for (let i=0; i < MAX_TRIES; i++) {
       openedFile = yield OS.File.openUnique(path);
       yield openedFile.file.close();
       filenames.add(openedFile.path);
@@ -44,17 +44,17 @@ function testFiles(filename) {
     do_check_eq(filenames.size, MAX_TRIES);
 
     // Ensure that openUnique() creates a new human readable file name using, as the original name is already taken.
     openedFile = yield OS.File.openUnique(path, {humanReadable : true});
     do_print("\nCreate unique Human Readable file: " + openedFile.path);
     yield openedFile.file.close();
     exists = yield OS.File.exists(openedFile.path);
     do_check_true(exists);
-    let fileInfo = yield OS.File.stat(openedFile.path);
+    fileInfo = yield OS.File.stat(openedFile.path);
     do_check_true(fileInfo.size == 0);
 
     // Ensure that openUnique() generates different human readable file names each time
     filenames = new Set();
     for (let i=0; i < MAX_TRIES; i++) {
       openedFile = yield OS.File.openUnique(path, {humanReadable : true});
       yield openedFile.file.close();
       filenames.add(openedFile.path);
--- a/toolkit/components/passwordmgr/test/unit/test_storage.js
+++ b/toolkit/components/passwordmgr/test/unit/test_storage.js
@@ -39,17 +39,17 @@ add_task(function test_storage_addLogin_
     password: String.fromCharCode(421, 259, 349, 537),
     usernameField: "field_" + String.fromCharCode(533, 537, 7570, 345),
     passwordField: "field_" + String.fromCharCode(421, 259, 349, 537),
   });
   Services.logins.addLogin(loginInfo);
   yield reloadAndCheckLogins([loginInfo]);
 
   // Store the string "test" using similarly looking glyphs.
-  let loginInfo = TestData.authLogin({
+  loginInfo = TestData.authLogin({
     httpRealm: String.fromCharCode(355, 277, 349, 357),
   });
   Services.logins.addLogin(loginInfo);
   yield reloadAndCheckLogins([loginInfo]);
 });
 
 /**
  * Tests addLogin with newline characters in the username and password.
--- a/toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js
+++ b/toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js
@@ -8,17 +8,17 @@
 This tests, tests the triggers that adjust the foreign_count when a bookmark is
 added or removed and also the maintenance task to fix wrong counts.
 */
 
 const T_URI = NetUtil.newURI("https://www.mozilla.org/firefox/nightly/firstrun/");
 
 function* getForeignCountForURL(conn, url) {
   yield promiseAsyncUpdates();
-  let url = url instanceof Ci.nsIURI ? url.spec : url;
+  url = url instanceof Ci.nsIURI ? url.spec : url;
   let rows = yield conn.executeCached(
       "SELECT foreign_count FROM moz_places WHERE url = :t_url ", { t_url: url });
   return rows[0].getResultByName("foreign_count");
 }
 
 function run_test() {
   run_next_test();
 }
--- a/toolkit/components/places/tests/bookmarks/test_477583_json-backup-in-future.js
+++ b/toolkit/components/places/tests/bookmarks/test_477583_json-backup-in-future.js
@@ -17,17 +17,17 @@ function run_test() {
       entry.remove(false);
     }
 
     // Create a json dummy backup in the future.
     let dateObj = new Date();
     dateObj.setYear(dateObj.getFullYear() + 1);
     let name = PlacesBackups.getFilenameForDate(dateObj);
     do_check_eq(name, "bookmarks-" + dateObj.toLocaleFormat("%Y-%m-%d") + ".json");
-    let files = bookmarksBackupDir.directoryEntries;
+    files = bookmarksBackupDir.directoryEntries;
     while (files.hasMoreElements()) {
       let entry = files.getNext().QueryInterface(Ci.nsIFile);
       if (PlacesBackups.filenamesRegex.test(entry.leafName))
         entry.remove(false);
     }
 
     let futureBackupFile = bookmarksBackupDir.clone();
     futureBackupFile.append(name);
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks.js
+++ b/toolkit/components/places/tests/bookmarks/test_bookmarks.js
@@ -344,27 +344,27 @@ add_task(function test_bookmarks() {
   }
 
   let lastModified3 = bs.getItemLastModified(kwTestItemId);
   // test getKeywordForBookmark
   let k = bs.getKeywordForBookmark(kwTestItemId);
   do_check_eq("bar", k);
 
   // test getKeywordForURI
-  let k = bs.getKeywordForURI(uri("http://keywordtest.com/"));
+  k = bs.getKeywordForURI(uri("http://keywordtest.com/"));
   do_check_eq("bar", k);
 
   // test getURIForKeyword
   let u = bs.getURIForKeyword("bar");
   do_check_eq("http://keywordtest.com/", u.spec);
 
   // test removeFolderChildren
   // 1) add/remove each child type (bookmark, separator, folder)
-  let tmpFolder = bs.createFolder(testRoot, "removeFolderChildren",
-                                  bs.DEFAULT_INDEX);
+  tmpFolder = bs.createFolder(testRoot, "removeFolderChildren",
+                              bs.DEFAULT_INDEX);
   bs.insertBookmark(tmpFolder, uri("http://foo9.com/"), bs.DEFAULT_INDEX, "");
   bs.createFolder(tmpFolder, "subfolder", bs.DEFAULT_INDEX);
   bs.insertSeparator(tmpFolder, bs.DEFAULT_INDEX);
   // 2) confirm that folder has 3 children
   let options = hs.getNewQueryOptions();
   let query = hs.getNewQuery();
   query.setFolders([tmpFolder], 1);
   try {
@@ -446,30 +446,30 @@ add_task(function test_bookmarks() {
   }
   catch(ex) {
     do_throw("bookmarks query: " + ex);
   }
 
   // test change bookmark uri
   let newId10 = bs.insertBookmark(testRoot, uri("http://foo10.com/"),
                                   bs.DEFAULT_INDEX, "");
-  let dateAdded = bs.getItemDateAdded(newId10);
+  dateAdded = bs.getItemDateAdded(newId10);
   // after just inserting, modified should not be set
-  let lastModified = bs.getItemLastModified(newId10);
+  lastModified = bs.getItemLastModified(newId10);
   do_check_eq(lastModified, dateAdded);
 
   // Workaround possible VM timers issues moving lastModified and dateAdded
   // to the past.
   bs.setItemLastModified(newId10, --lastModified);
   bs.setItemDateAdded(newId10, --dateAdded);
 
   bs.changeBookmarkURI(newId10, uri("http://foo11.com/"));
 
   // check that lastModified is set after we change the bookmark uri
-  let lastModified2 = bs.getItemLastModified(newId10);
+  lastModified2 = bs.getItemLastModified(newId10);
   LOG("test changeBookmarkURI");
   LOG("dateAdded = " + dateAdded);
   LOG("lastModified = " + lastModified);
   LOG("lastModified2 = " + lastModified2);
   do_check_true(is_time_ordered(lastModified, lastModified2));
   do_check_true(is_time_ordered(dateAdded, lastModified2));
 
   do_check_eq(bookmarksObserver._itemChangedId, newId10);
@@ -592,18 +592,18 @@ add_task(function test_bookmarks() {
   }
   catch(ex) {
     do_throw("bookmarks query: " + ex);
   }
 
   // check setItemLastModified() and setItemDateAdded()
   let newId14 = bs.insertBookmark(testRoot, uri("http://bar.tld/"),
                                   bs.DEFAULT_INDEX, "");
-  let dateAdded = bs.getItemDateAdded(newId14);
-  let lastModified = bs.getItemLastModified(newId14);
+  dateAdded = bs.getItemDateAdded(newId14);
+  lastModified = bs.getItemLastModified(newId14);
   do_check_eq(lastModified, dateAdded);
   bs.setItemLastModified(newId14, 1234);
   let fakeLastModified = bs.getItemLastModified(newId14);
   do_check_eq(fakeLastModified, 1234);
   bs.setItemDateAdded(newId14, 4321);
   let fakeDateAdded = bs.getItemDateAdded(newId14);
   do_check_eq(fakeDateAdded, 4321);
   
--- a/toolkit/components/places/tests/bookmarks/test_keywords.js
+++ b/toolkit/components/places/tests/bookmarks/test_keywords.js
@@ -22,29 +22,29 @@ function check_uri_keyword(aURI, aKeywor
     // Check case insensitivity.
     url = PlacesUtils.bookmarks.getURIForKeyword(aKeyword.toUpperCase()).spec
     do_check_true(re.test(url));
   }
 }
 
 function check_orphans()
 {
-  stmt = DBConn().createStatement(
+  let stmt = DBConn().createStatement(
     `SELECT id FROM moz_keywords k WHERE NOT EXISTS (
         SELECT id FROM moz_bookmarks WHERE keyword_id = k.id
      )`
   );
   try {
     do_check_false(stmt.executeStep());
   } finally {
     stmt.finalize();
   }
 
   print("Check there are no orphan database entries");
-  let stmt = DBConn().createStatement(
+  stmt = DBConn().createStatement(
     `SELECT b.id FROM moz_bookmarks b
      LEFT JOIN moz_keywords k ON b.keyword_id = k.id
      WHERE keyword_id NOTNULL AND k.id ISNULL`
   );
   try {
     do_check_false(stmt.executeStep());
   } finally {
     stmt.finalize();
--- a/toolkit/components/places/tests/browser/browser_bug248970.js
+++ b/toolkit/components/places/tests/browser/browser_bug248970.js
@@ -113,17 +113,17 @@ function getPlacesItemsCount() {
   let root = PlacesUtils.history.executeQuery(
     PlacesUtils.history.getNewQuery(), options).root;
   root.containerOpen = true;
   let cc = root.childCount;
   root.containerOpen = false;
 
   // Get history item count
   options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY;
-  let root = PlacesUtils.history.executeQuery(
+  root = PlacesUtils.history.executeQuery(
     PlacesUtils.history.getNewQuery(), options).root;
   root.containerOpen = true;
   cc += root.childCount;
   root.containerOpen = false;
 
   return cc;
 }
 
--- a/toolkit/components/places/tests/expiration/test_annos_expire_history.js
+++ b/toolkit/components/places/tests/expiration/test_annos_expire_history.js
@@ -72,21 +72,21 @@ add_task(function test_annos_expire_hist
   pages = as.getPagesWithAnnotation("page_persist1");
   do_check_eq(pages.length, 5);
   pages = as.getPagesWithAnnotation("page_persist2");
   do_check_eq(pages.length, 5);
 
   // Expire all visits for the first 5 pages and the bookmarks.
   yield promiseForceExpirationStep(10);
 
-  let pages = as.getPagesWithAnnotation("page_expire1");
+  pages = as.getPagesWithAnnotation("page_expire1");
   do_check_eq(pages.length, 0);
   pages = as.getPagesWithAnnotation("page_expire2");
   do_check_eq(pages.length, 0);
-  let items = as.getItemsWithAnnotation("item_persist1");
+  items = as.getItemsWithAnnotation("item_persist1");
   do_check_eq(items.length, 0);
   items = as.getItemsWithAnnotation("item_persist2");
   do_check_eq(items.length, 0);
   pages = as.getPagesWithAnnotation("page_persist1");
   do_check_eq(pages.length, 5);
   pages = as.getPagesWithAnnotation("page_persist2");
   do_check_eq(pages.length, 5);
-});
\ No newline at end of file
+});
--- a/toolkit/components/places/tests/expiration/test_annos_expire_never.js
+++ b/toolkit/components/places/tests/expiration/test_annos_expire_never.js
@@ -73,21 +73,21 @@ add_task(function test_annos_expire_neve
   pages = as.getPagesWithAnnotation("page_persist1");
   do_check_eq(pages.length, 5);
   pages = as.getPagesWithAnnotation("page_persist2");
   do_check_eq(pages.length, 5);
 
   // Expire all visits for the first 5 pages and the bookmarks.
   yield promiseForceExpirationStep(10);
 
-  let pages = as.getPagesWithAnnotation("page_expire1");
+  pages = as.getPagesWithAnnotation("page_expire1");
   do_check_eq(pages.length, 0);
   pages = as.getPagesWithAnnotation("page_expire2");
   do_check_eq(pages.length, 0);
-  let items = as.getItemsWithAnnotation("item_persist1");
+  items = as.getItemsWithAnnotation("item_persist1");
   do_check_eq(items.length, 5);
   items = as.getItemsWithAnnotation("item_persist2");
   do_check_eq(items.length, 5);
   pages = as.getPagesWithAnnotation("page_persist1");
   do_check_eq(pages.length, 5);
   pages = as.getPagesWithAnnotation("page_persist2");
   do_check_eq(pages.length, 5);
 });
--- a/toolkit/components/places/tests/expiration/test_removeAllPages.js
+++ b/toolkit/components/places/tests/expiration/test_removeAllPages.js
@@ -88,17 +88,17 @@ add_task(function test_removeAllPages() 
 
   // Expire all expirable pages.
   setMaxPages(0);
 
   // Add some bookmarked page with visit and annotations.
   for (let i = 0; i < 5; i++) {
     let pageURI = uri("http://item_anno." + i + ".mozilla.org/");
     // This visit will be expired.
-    yield promiseAddVisits({ uri: pageURI, visitDate: now++ });
+    yield promiseAddVisits({ uri: pageURI });
     let id = bs.insertBookmark(bs.unfiledBookmarksFolder, pageURI,
                                bs.DEFAULT_INDEX, null);
     // Will persist because it's an EXPIRE_NEVER item anno.
     as.setItemAnnotation(id, "persist", "test", 0, as.EXPIRE_NEVER);
     // Will persist because the page is bookmarked.
     as.setPageAnnotation(pageURI, "persist", "test", 0, as.EXPIRE_NEVER);
     // All EXPIRE_SESSION annotations are expected to expire on clear history.
     as.setItemAnnotation(id, "expire_session", "test", 0, as.EXPIRE_SESSION);
@@ -108,22 +108,21 @@ add_task(function test_removeAllPages() 
     add_old_anno(id, "expire_weeks", "test", as.EXPIRE_WEEKS, 31);
     add_old_anno(id, "expire_months", "test", as.EXPIRE_MONTHS, 181);
     add_old_anno(pageURI, "expire_days", "test", as.EXPIRE_DAYS, 8);
     add_old_anno(pageURI, "expire_weeks", "test", as.EXPIRE_WEEKS, 31);
     add_old_anno(pageURI, "expire_months", "test", as.EXPIRE_MONTHS, 181);
   }
 
   // Add some visited page and annotations for each.
-  let now = Date.now() * 1000;
   for (let i = 0; i < 5; i++) {
     // All page annotations related to these expired pages are expected to
     // expire as well.
     let pageURI = uri("http://page_anno." + i + ".mozilla.org/");
-    yield promiseAddVisits({ uri: pageURI, visitDate: now++ });
+    yield promiseAddVisits({ uri: pageURI });
     as.setPageAnnotation(pageURI, "expire", "test", 0, as.EXPIRE_NEVER);
     as.setPageAnnotation(pageURI, "expire_session", "test", 0, as.EXPIRE_SESSION);
     add_old_anno(pageURI, "expire_days", "test", as.EXPIRE_DAYS, 8);
     add_old_anno(pageURI, "expire_weeks", "test", as.EXPIRE_WEEKS, 31);
     add_old_anno(pageURI, "expire_months", "test", as.EXPIRE_MONTHS, 181);
   }
 
   // Expire all visits for the bookmarks.  This does the same thing as the
--- a/toolkit/components/places/tests/unit/test_385397.js
+++ b/toolkit/components/places/tests/unit/test_385397.js
@@ -67,23 +67,23 @@ add_task(function test_execute()
 
   // verify our visits AS_VISIT, ordered by date descending
   // we should get 40 visits:
   // http://www.test-19.com/
   // http://www.test-19.com/
   // ...
   // http://www.test-0.com/
   // http://www.test-0.com/
-  let options = PlacesUtils.history.getNewQueryOptions();
+  options = PlacesUtils.history.getNewQueryOptions();
   options.sortingMode = options.SORT_BY_DATE_DESCENDING;
   options.resultType = options.RESULTS_AS_VISIT;
-  let root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
+  root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
                                               options).root;
   root.containerOpen = true;
-  let cc = root.childCount;
+  cc = root.childCount;
   // 2 * TOTAL_SITES because we count the TYPED and LINK, but not EMBED or FRAMED
   do_check_eq(cc, 2 * TOTAL_SITES); 
   for (let i=0; i < TOTAL_SITES; i++) {
     let index = i * 2;
     let node = root.getChild(index);
     let site = "http://www.test-" + (TOTAL_SITES - 1 - i) + ".com/";
     do_check_eq(node.uri, site);
     do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
@@ -95,47 +95,47 @@ add_task(function test_execute()
 
   // test our optimized query for the places menu
   // place:type=0&sort=4&maxResults=10
   // verify our visits AS_URI, ordered by date descending
   // we should get 10 visits:
   // http://www.test-19.com/
   // ...
   // http://www.test-10.com/
-  let options = PlacesUtils.history.getNewQueryOptions();
+  options = PlacesUtils.history.getNewQueryOptions();
   options.sortingMode = options.SORT_BY_DATE_DESCENDING;
   options.maxResults = 10;
   options.resultType = options.RESULTS_AS_URI;
-  let root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
+  root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
                                               options).root;
   root.containerOpen = true;
-  let cc = root.childCount;
+  cc = root.childCount;
   do_check_eq(cc, options.maxResults);
   for (let i=0; i < cc; i++) {
     let node = root.getChild(i);
     let site = "http://www.test-" + (TOTAL_SITES - 1 - i) + ".com/";
     do_check_eq(node.uri, site);
     do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
   }
   root.containerOpen = false;
 
   // test without a maxResults, which executes a different query
   // but the first 10 results should be the same.
   // verify our visits AS_URI, ordered by date descending
   // we should get 20 visits, but the first 10 should be
   // http://www.test-19.com/
   // ...
   // http://www.test-10.com/
-  let options = PlacesUtils.history.getNewQueryOptions();
+  options = PlacesUtils.history.getNewQueryOptions();
   options.sortingMode = options.SORT_BY_DATE_DESCENDING;
   options.resultType = options.RESULTS_AS_URI;
-  let root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
+  root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
                                               options).root;
   root.containerOpen = true;
-  let cc = root.childCount;
+  cc = root.childCount;
   do_check_eq(cc, TOTAL_SITES);
   for (let i=0; i < 10; i++) {
     let node = root.getChild(i);
     let site = "http://www.test-" + (TOTAL_SITES - 1 - i) + ".com/";
     do_check_eq(node.uri, site);
     do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
   }
   root.containerOpen = false;
--- a/toolkit/components/places/tests/unit/test_399266.js
+++ b/toolkit/components/places/tests/unit/test_399266.js
@@ -55,23 +55,23 @@ add_task(function test_execute()
 
   // test without a maxResults, which executes a different query
   // but the first 10 results should be the same.
   // verify our visits AS_URI, ordered by visit count descending
   // we should get 20 visits, but the first 10 should be
   // http://www.test-19.com/
   // ...
   // http://www.test-10.com/
-  let options = PlacesUtils.history.getNewQueryOptions();
+  options = PlacesUtils.history.getNewQueryOptions();
   options.sortingMode = options.SORT_BY_VISITCOUNT_DESCENDING;
   options.resultType = options.RESULTS_AS_URI;
-  let root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
+  root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
                                               options).root;
   root.containerOpen = true;
-  let cc = root.childCount;
+  cc = root.childCount;
   do_check_eq(cc, TOTAL_SITES);
   for (let i = 0; i < 10; i++) {
     let node = root.getChild(i);
     let site = "http://www.test-" + (TOTAL_SITES - 1 - i) + ".com/";
     do_check_eq(node.uri, site);
     do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
   }
   root.containerOpen = false;
--- a/toolkit/components/places/tests/unit/test_PlacesSearchAutocompleteProvider.js
+++ b/toolkit/components/places/tests/unit/test_PlacesSearchAutocompleteProvider.js
@@ -56,17 +56,17 @@ add_task(function* test_parseSubmissionU
   // itself, thus we only do a sanity check of the wrapper here.
   let engine = yield promiseDefaultSearchEngine();
   let submissionURL = engine.getSubmission("terms").uri.spec;
 
   let result = PlacesSearchAutocompleteProvider.parseSubmissionURL(submissionURL);
   do_check_eq(result.engineName, engine.name);
   do_check_eq(result.terms, "terms");
 
-  let result = PlacesSearchAutocompleteProvider.parseSubmissionURL("http://example.org/");
+  result = PlacesSearchAutocompleteProvider.parseSubmissionURL("http://example.org/");
   do_check_eq(result, null);
 });
 
 function promiseDefaultSearchEngine() {
   let deferred = Promise.defer();
   Services.search.init( () => {
     deferred.resolve(Services.search.defaultEngine);
   });
--- a/toolkit/components/places/tests/unit/test_async_transactions.js
+++ b/toolkit/components/places/tests/unit/test_async_transactions.js
@@ -505,17 +505,17 @@ add_task(function* test_move_items_to_fo
                     , [bkm_b_txn, bkm_a_txn, folder_a_txn] ], 0);
     ensureItemsMoved({ GUID:          bkm_a_info.GUID
                      , oldParentGUID: folder_a_info.GUID
                      , newParentGUID: folder_b_info.GUID
                      , oldIndex:      0
                      , newIndex:      0 });
     observer.reset();
   };
-  let ensureUndo = () => {
+  ensureUndo = () => {
     ensureUndoState([ [moveTxn]
                     , [folder_b_txn]
                     , [bkm_b_txn, bkm_a_txn, folder_a_txn] ], 1);
     ensureItemsMoved({ GUID:          bkm_a_info.GUID
                      , oldParentGUID: folder_b_info.GUID
                      , newParentGUID: folder_a_info.GUID
                      , oldIndex:      0
                      , newIndex:      0 });
--- a/toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js
+++ b/toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js
@@ -55,20 +55,20 @@ add_task(function test_execute()
   shortcut.containerOpen = false;
   // Remove the broken shortcut while the containing result is open.
   PlacesUtils.bookmarks.removeItem(id2);
   do_check_eq(root.childCount, 2);
 
   root.containerOpen = false;
 
   // Broken folder shortcut as root node.
-  let query = PlacesUtils.history.getNewQuery();
+  query = PlacesUtils.history.getNewQuery();
   query.setFolders([1234], 1);
-  let options = PlacesUtils.history.getNewQueryOptions();
-  let root = PlacesUtils.history.executeQuery(query, options).root;
+  options = PlacesUtils.history.getNewQueryOptions();
+  root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
   do_check_eq(root.childCount, 0);
   root.containerOpen = false;
 
   // Broken folder shortcut as root node with folder=-1.
   query = PlacesUtils.history.getNewQuery();
   query.setFolders([-1], 1);
   options = PlacesUtils.history.getNewQueryOptions();
--- a/toolkit/components/places/tests/unit/test_preventive_maintenance.js
+++ b/toolkit/components/places/tests/unit/test_preventive_maintenance.js
@@ -1165,17 +1165,17 @@ tests.push({
     setLastVisitDate(url, now++);
     // Add a page with 1 visit and set wrong stats.
     url = "http://4.moz.org/";
     yield promiseAddVisits({ uri: uri(url), visitDate: now++ });
     setVisitCount(url, 10);
     setLastVisitDate(url, now++);
 
     // Add a page without visits.
-    let url = "http://5.moz.org/";
+    url = "http://5.moz.org/";
     addPlace(url);
     // Add a page without visits and set wrong visit_count.
     url = "http://6.moz.org/";
     addPlace(url);
     setVisitCount(url, 10);
     // Add a page without visits and set wrong last_visit_date.
     url = "http://7.moz.org/";
     addPlace(url);
--- a/toolkit/components/prompts/test/test_modal_prompts.html
+++ b/toolkit/components/prompts/test/test_modal_prompts.html
@@ -1094,17 +1094,17 @@ function runTests() {
     is(clickedButton, 0, "checked expected button num click");
     is(checkVal.value, true, "expected checkbox setting");
     ok(didDialog, "handleDialog was invoked");
 
     // ===== test 23 =====
     // ConfirmEx (buttons from args, checkbox, cancel)
     testNum++;
     startCallbackTimer();
-    let b = Ci.nsIPromptService.BUTTON_TITLE_IS_STRING;
+    b = Ci.nsIPromptService.BUTTON_TITLE_IS_STRING;
     flags = b * Ci.nsIPromptService.BUTTON_POS_2 +
             b * Ci.nsIPromptService.BUTTON_POS_1 +
             b * Ci.nsIPromptService.BUTTON_POS_0;
     flags ^= Ci.nsIPromptService.BUTTON_POS_1_DEFAULT;
     checkVal.value = false;
     promptArgs = ["TestTitle", "This is the confirmEx text.", flags,
                   "butt0", "butt1", "butt2", "Check me out!", checkVal];
     if (usePromptService)
@@ -1113,17 +1113,17 @@ function runTests() {
     is(clickedButton, 1, "checked expected button num click");
     is(checkVal.value, true, "expected checkbox setting");
     ok(didDialog, "handleDialog was invoked");
 
     // ===== test 24 =====
     // ConfirmEx (buttons from args, checkbox, button3)
     testNum++;
     startCallbackTimer();
-    let b = Ci.nsIPromptService.BUTTON_TITLE_IS_STRING;
+    b = Ci.nsIPromptService.BUTTON_TITLE_IS_STRING;
     flags = b * Ci.nsIPromptService.BUTTON_POS_2 +
             b * Ci.nsIPromptService.BUTTON_POS_1 +
             b * Ci.nsIPromptService.BUTTON_POS_0;
     flags ^= Ci.nsIPromptService.BUTTON_POS_2_DEFAULT;
     checkVal.value = false;
     promptArgs = ["TestTitle", "This is the confirmEx text.", flags,
                   "butt0", "butt1", "butt2", "Check me out!", checkVal];
     if (usePromptService)
--- a/toolkit/components/satchel/test/unit/test_autocomplete.js
+++ b/toolkit/components/satchel/test/unit/test_autocomplete.js
@@ -226,17 +226,17 @@ add_test(function test12() {
 add_test(function test13() {
   let autocompleteService = Cc["@mozilla.org/satchel/form-autocomplete;1"].getService(Ci.nsIFormAutoComplete);
   let results = autocompleteService.autoCompleteSearch("field5", "", null, null);
   do_check_eq(results.matchCount, syncValues.length, "synchronous matchCount");
   for (let i = 0; i < results.matchCount; i++) {
     do_check_eq(results.getValueAt(i), syncValues[i]);
   }
 
-  let results = autocompleteService.autoCompleteSearch("field5", "sync1", null, null);
+  results = autocompleteService.autoCompleteSearch("field5", "sync1", null, null);
   do_check_eq(results.matchCount, 2, "synchronous matchCount");
   do_check_eq(results.getValueAt(0), "sync1");
   do_check_eq(results.getValueAt(1), "sync1a");
   run_next_test();
 });
 
 add_test(function test_token_limit_DB() {
     function test_token_limit_previousResult(previousResult) {
--- a/toolkit/components/social/test/browser/browser_SocialProvider.js
+++ b/toolkit/components/social/test/browser/browser_SocialProvider.js
@@ -40,17 +40,17 @@ let tests = {
     ok(!provider.enabled, "provider is now disabled");
     port = provider.getWorkerPort();
     ok(!port, "shouldn't be able to get a port from disabled provider");
     ok(!provider.workerAPI, "shouldn't be able to get a workerAPI from disabled provider");
 
     provider.enabled = true;
 
     ok(provider.enabled, "provider is re-enabled");
-    let port = provider.getWorkerPort();
+    port = provider.getWorkerPort();
     ok(port, "should be able to get a port from re-enabled provider");
     port.close();
     ok(provider.workerAPI, "should be able to get a workerAPI from re-enabled provider");
     next();
   },
   testTwoProviders: function(next) {
     // add another provider, test both workers
     let manifest = {
--- a/toolkit/content/tests/chrome/findbar_window.xul
+++ b/toolkit/content/tests/chrome/findbar_window.xul
@@ -339,17 +339,17 @@
       enterStringIntoFindField(searchStr);
 
       let a = gFindBar._findField.value;
       let b = gFindBar._browser.finder._fastFind.searchString;
       let c = gFindBar._browser.finder.searchString;
       ok(a == b && b == c, "testFindWithHighlight 1: " + a + ", " + b + ", " + c + ".");
 
       let oldGetInitialSelection = gFindBar._getInitialSelection;
-      let searchStr = "t";
+      searchStr = "t";
       gFindBar._getInitialSelection = () => searchStr;
       findCommand.doCommand();
       gFindBar._getInitialSelection = oldGetInitialSelection;
 
       a = gFindBar._findField.value;
       b = gFindBar._browser.finder._fastFind.searchString;
       c = gFindBar._browser.finder.searchString;
       ok(a == searchStr && b == c, "testFindWithHighlight 2: " + searchStr +
--- a/toolkit/content/tests/chrome/test_bug557987.xul
+++ b/toolkit/content/tests/chrome/test_bug557987.xul
@@ -35,18 +35,18 @@ function test() {
   let rightEdge = button.getBoundingClientRect().width - 2;
   let centerX   = button.getBoundingClientRect().width / 2;
   let centerY   = button.getBoundingClientRect().height / 2;
 
   synthesizeMouse(button, rightEdge, centerY, {}, window);
   synthesizeMouse(button, centerX, centerY, {}, window);
   
   let menulist = $("menulist");
-  let centerX = menulist.getBoundingClientRect().width / 2;
-  let centerY = menulist.getBoundingClientRect().height / 2;
+  centerX = menulist.getBoundingClientRect().width / 2;
+  centerY = menulist.getBoundingClientRect().height / 2;
   synthesizeMouse(menulist, centerX, centerY, {}, window);
 
   synthesizeMouse(document.getElementsByTagName("body")[0], 0, 0, {}, window);
 
   disableNonTestMouseEvents(false);
   SimpleTest.executeSoon(finishTest);
 
 }
--- a/toolkit/devtools/server/tests/mochitest/inspector-helpers.js
+++ b/toolkit/devtools/server/tests/mochitest/inspector-helpers.js
@@ -161,34 +161,34 @@ function assertOwnershipTrees(walker) {
 }
 
 // Verify that an actorID is inaccessible both from the client library and the server.
 function checkMissing(client, actorID) {
   let deferred = promise.defer();
   let front = client.getActor(actorID);
   ok(!front, "Front shouldn't be accessible from the client for actorID: " + actorID);
 
-  let deferred = promise.defer();
+  deferred = promise.defer();
   client.request({
     to: actorID,
     type: "request",
   }, response => {
     is(response.error, "noSuchActor", "node list actor should no longer be contactable.");
     deferred.resolve(undefined);
   });
   return deferred.promise;
 }
 
 // Verify that an actorID is accessible both from the client library and the server.
 function checkAvailable(client, actorID) {
   let deferred = promise.defer();
   let front = client.getActor(actorID);
   ok(front, "Front should be accessible from the client for actorID: " + actorID);
 
-  let deferred = promise.defer();
+  deferred = promise.defer();
   client.request({
     to: actorID,
     type: "garbageAvailableTest",
   }, response => {
     is(response.error, "unrecognizedPacketType", "node list actor should be contactable.");
     deferred.resolve(undefined);
   });
   return deferred.promise;
--- a/toolkit/devtools/server/tests/mochitest/test_highlighter-boxmodel_02.html
+++ b/toolkit/devtools/server/tests/mochitest/test_highlighter-boxmodel_02.html
@@ -234,17 +234,17 @@ window.onload = function() {
 
     info("Hiding the highlighter and showing it again with the margin region");
     yield highlighterFront.hide();
     yield highlighterFront.show(node, {
       region: "margin"
     });
 
     let margin = container.querySelector(".box-model-margin");
-    let points = margin.getAttribute("points").split(" ").map(xy => xy.split(","));
+    points = margin.getAttribute("points").split(" ").map(xy => xy.split(","));
 
     is(Math.ceil(guideTop.getAttribute("y1")), points[0][1],
       "Top guide's y1 is correct");
     is(Math.floor(guideBottom.getAttribute("y1")), points[2][1],
       "Bottom guide's y1 is correct");
     is(Math.floor(guideRight.getAttribute("x1")), points[1][0],
       "Right guide's x1 is correct");
     is(Math.ceil(guideLeft.getAttribute("x1")), points[3][0],
--- a/toolkit/devtools/server/tests/mochitest/test_inspector-mutations-childlist.html
+++ b/toolkit/devtools/server/tests/mochitest/test_inspector-mutations-childlist.html
@@ -97,17 +97,17 @@ function mutationTest(testSpec) {
 
         // Some of these moves will trigger no mutation events,
         // so do a dummy change to the root node to trigger
         // a mutation event anyway.
         gInspectee.documentElement.setAttribute("data-dummy", gDummySerial++);
 
         gWalker.once("mutations", (mutations) => {
           // Filter out our dummy mutation.
-          let mutations = mutations.filter(change => {
+          mutations = mutations.filter(change => {
             if (change.type == "attributes" &&
                 change.attributeName == "data-dummy") {
               return false;
             }
             return true;
           });
           assertOwnership();
           if (testSpec.postCheck) {
--- a/toolkit/devtools/server/tests/mochitest/test_styles-applied.html
+++ b/toolkit/devtools/server/tests/mochitest/test_styles-applied.html
@@ -37,17 +37,16 @@ addTest(function setup() {
       return inspector.getPageStyle();
     }).then(styles => {
       gStyles = styles;
     }).then(runNextTest));
   });
 });
 
 addTest(function inheritedUserStyles() {
-  let node = node;
   promiseDone(gWalker.querySelector(gWalker.rootNode, "#test-node").then(node => {
     return gStyles.getApplied(node, { inherited: true, filter: "user" });
   }).then(applied => {
     ok(!applied[0].inherited, "Entry 0 should be uninherited");
     is(applied[0].rule.type, 100, "Entry 0 should be an element style");
     ok(!!applied[0].rule.href, "Element styles should have a URL");
     is(applied[0].rule.cssText, "", "Entry 0 should be an empty style");
 
@@ -73,34 +72,32 @@ addTest(function inheritedUserStyles() {
     is(applied[4].rule.cssText, "font-size: 15px;", "Entry 4 should have the expected cssText");
     ok(!applied[4].matchedSelectors, "Shouldn't get matchedSelectors with this request.");
 
     is(applied.length, 5, "Should have 5 rules.");
   }).then(runNextTest));
 });
 
 addTest(function inheritedSystemStyles() {
-  let node = node;
   promiseDone(gWalker.querySelector(gWalker.rootNode, "#test-node").then(node => {
     return gStyles.getApplied(node, { inherited: true, filter: "ua" });
   }).then(applied => {
     // If our system stylesheets are prone to churn, this might be a fragile
     // test.  If you're here because of that I apologize, file a bug
     // and we can find a different way to test.
 
     ok(!applied[1].inherited, "Entry 1 should not be inherited");
     ok(!applied[1].rule.parentStyleSheet.system, "Entry 1 should be a system style");
     is(applied[1].rule.type, 1, "Entry 1 should be a rule style");
 
     is(applied.length, 7, "Should have 7 rules.");
   }).then(runNextTest));
 });
 
 addTest(function noInheritedStyles() {
-  let node = node;
   promiseDone(gWalker.querySelector(gWalker.rootNode, "#test-node").then(node => {
     return gStyles.getApplied(node, { inherited: false, filter: "user" });
   }).then(applied => {
     ok(!applied[0].inherited, "Entry 0 should be uninherited");
     is(applied[0].rule.type, 100, "Entry 0 should be an element style");
     is(applied[0].rule.cssText, "", "Entry 0 should be an empty style");
     is(applied.length, 1, "Should have 1 rule.");
   }).then(runNextTest));
@@ -113,17 +110,16 @@ addTest(function matchedSelectors() {
     });
   }).then(applied => {
     is(applied[3].matchedSelectors[0], ".inheritable-rule", "Entry 3 should have a matched selector");
     is(applied[4].matchedSelectors[0], ".inheritable-rule", "Entry 4 should have a matched selector");
   }).then(runNextTest));
 });
 
 addTest(function testMediaQuery() {
-  let node = node;
   promiseDone(gWalker.querySelector(gWalker.rootNode, "#mediaqueried").then(node => {
     return gStyles.getApplied(node, {
       inherited: false, filter: "user", matchedSelectors: true
     });
   }).then(applied => {
     is(applied[1].rule.type, 1, "Entry 1 is a rule style");
     is(applied[1].rule.parentRule.type, 4, "Entry 1's parent rule is a media rule");
     is(applied[1].rule.parentRule.media[0], "screen", "Entry 1's parent rule has the expected medium");
--- a/toolkit/devtools/server/tests/mochitest/test_styles-svg.html
+++ b/toolkit/devtools/server/tests/mochitest/test_styles-svg.html
@@ -38,17 +38,16 @@ addTest(function setup() {
       return inspector.getPageStyle();
     }).then(styles => {
       gStyles = styles;
     }).then(runNextTest));
   });
 });
 
 addTest(function inheritedUserStyles() {
-  let node = node;
   promiseDone(gWalker.querySelector(gWalker.rootNode, "#svgcontent rect").then(node => {
     return gStyles.getApplied(node, { inherited: true, filter: "user" });
   }).then(applied => {
     is(applied.length, 2, "Should have 2 rules");
     is(applied[1].rule.cssText, "fill: rgb(1, 2, 3);", "cssText is right");
   }).then(runNextTest));
 });
 
--- a/toolkit/devtools/server/tests/unit/test_breakpoint-15.js
+++ b/toolkit/devtools/server/tests/unit/test_breakpoint-15.js
@@ -44,18 +44,18 @@ const testSameBreakpoint = Task.async(fu
   // Specific column
 
   let columnLocation = {
     url: SOURCE_URL,
     line: 2,
     column: 6
   };
 
-  let [firstResponse, firstBpClient] = yield setBreakpoint(gThreadClient, columnLocation);
-  let [secondResponse, secondBpClient] = yield setBreakpoint(gThreadClient, columnLocation);
+  [firstResponse, firstBpClient] = yield setBreakpoint(gThreadClient, columnLocation);
+  [secondResponse, secondBpClient] = yield setBreakpoint(gThreadClient, columnLocation);
 
   do_check_eq(secondBpClient.actor, secondBpClient.actor, "Should get the same actor column breakpoints");
 
   finishClient(gClient);
 });
 
 function evalCode() {
   Components.utils.evalInSandbox(
@@ -64,9 +64,9 @@ function evalCode() {
       k(arg);                  // line 3
     } + "\n"                   // line 4
     + "debugger;",             // line 5
     gDebuggee,
     "1.8",
     SOURCE_URL,
     1
   );
-}
\ No newline at end of file
+}
--- a/toolkit/devtools/tests/unit/test_consoleID.js
+++ b/toolkit/devtools/tests/unit/test_consoleID.js
@@ -65,17 +65,17 @@ function run_test() {
   console2.error("Error from bar");
   do_check_eq(seenMessages, 3);
   do_check_eq(seenTypes, 7);
 
   listener.destroy();
 
   listener = new ConsoleAPIListener(null, callback, "foo");
   listener.init();
-  let messages = listener.getCachedMessages();
+  messages = listener.getCachedMessages();
 
   seenTypes = 0;
   seenMessages = 0;
   messages.forEach(callback.onConsoleAPICall);
   do_check_eq(seenMessages, 2);
   do_check_eq(seenTypes, 1);
 
   seenTypes = 0;
--- a/toolkit/modules/tests/browser/browser_Geometry.js
+++ b/toolkit/modules/tests/browser/browser_Geometry.js
@@ -25,87 +25,87 @@ let tests = {
     ok(r.height == 50, "rect has correct height value");
     ok(r.x == 5, "rect has correct x value");
     ok(r.y == 10, "rect has correct y value");
   },
 
   testIsEmpty: function() {
     let r = new Rect(0, 0, 0, 10);
     ok(r.isEmpty(), "rect with nonpositive width is empty");
-    let r = new Rect(0, 0, 10, 0);
+    r = new Rect(0, 0, 10, 0);
     ok(r.isEmpty(), "rect with nonpositive height is empty");
-    let r = new Rect(0, 0, 10, 10);
+    r = new Rect(0, 0, 10, 10);
     ok(!r.isEmpty(), "rect with positive dimensions is not empty");
   },
 
   testRestrictTo: function() {
     let r1 = new Rect(10, 10, 100, 100);
     let r2 = new Rect(50, 50, 100, 100);
     r1.restrictTo(r2);
     ok(r1.equals(new Rect(50, 50, 60, 60)), "intersection is non-empty");
 
-    let r1 = new Rect(10, 10, 100, 100);
-    let r2 = new Rect(120, 120, 100, 100);
+    r1 = new Rect(10, 10, 100, 100);
+    r2 = new Rect(120, 120, 100, 100);
     r1.restrictTo(r2);
     ok(r1.isEmpty(), "intersection is empty");
 
-    let r1 = new Rect(10, 10, 100, 100);
-    let r2 = new Rect(0, 0, 0, 0);
+    r1 = new Rect(10, 10, 100, 100);
+    r2 = new Rect(0, 0, 0, 0);
     r1.restrictTo(r2);
     ok(r1.isEmpty(), "intersection of rect and empty is empty");
 
-    let r1 = new Rect(0, 0, 0, 0);
-    let r2 = new Rect(0, 0, 0, 0);
+    r1 = new Rect(0, 0, 0, 0);
+    r2 = new Rect(0, 0, 0, 0);
     r1.restrictTo(r2);
     ok(r1.isEmpty(), "intersection of empty and empty is empty");
   },
 
   testExpandToContain: function() {
     let r1 = new Rect(10, 10, 100, 100);
     let r2 = new Rect(50, 50, 100, 100);
     r1.expandToContain(r2);
     ok(r1.equals(new Rect(10, 10, 140, 140)), "correct expandToContain on intersecting rectangles");
 
-    let r1 = new Rect(10, 10, 100, 100);
-    let r2 = new Rect(120, 120, 100, 100);
+    r1 = new Rect(10, 10, 100, 100);
+    r2 = new Rect(120, 120, 100, 100);
     r1.expandToContain(r2);
     ok(r1.equals(new Rect(10, 10, 210, 210)), "correct expandToContain on non-intersecting rectangles");
 
-    let r1 = new Rect(10, 10, 100, 100);
-    let r2 = new Rect(0, 0, 0, 0);
+    r1 = new Rect(10, 10, 100, 100);
+    r2 = new Rect(0, 0, 0, 0);
     r1.expandToContain(r2);
     ok(r1.equals(new Rect(10, 10, 100, 100)), "expandToContain of rect and empty is rect");
 
-    let r1 = new Rect(10, 10, 0, 0);
-    let r2 = new Rect(0, 0, 0, 0);
+    r1 = new Rect(10, 10, 0, 0);
+    r2 = new Rect(0, 0, 0, 0);
     r1.expandToContain(r2);
     ok(r1.isEmpty(), "expandToContain of empty and empty is empty");
   },
 
   testSubtract: function testSubtract() {
     function equals(rects1, rects2) {
       return rects1.length == rects2.length && rects1.every(function(r, i) {
         return r.equals(rects2[i]);
       });
     }
 
     let r1 = new Rect(0, 0, 100, 100);
     let r2 = new Rect(500, 500, 100, 100);
     ok(equals(r1.subtract(r2), [r1]), "subtract area outside of region yields same region");
 
-    let r1 = new Rect(0, 0, 100, 100);
-    let r2 = new Rect(-10, -10, 50, 120);
+    r1 = new Rect(0, 0, 100, 100);
+    r2 = new Rect(-10, -10, 50, 120);
     ok(equals(r1.subtract(r2), [new Rect(40, 0, 60, 100)]), "subtracting vertical bar from edge leaves one rect");
 
-    let r1 = new Rect(0, 0, 100, 100);
-    let r2 = new Rect(-10, -10, 120, 50);
+    r1 = new Rect(0, 0, 100, 100);
+    r2 = new Rect(-10, -10, 120, 50);
     ok(equals(r1.subtract(r2), [new Rect(0, 40, 100, 60)]), "subtracting horizontal bar from edge leaves one rect");
 
-    let r1 = new Rect(0, 0, 100, 100);
-    let r2 = new Rect(40, 40, 20, 20);
+    r1 = new Rect(0, 0, 100, 100);
+    r2 = new Rect(40, 40, 20, 20);
     ok(equals(r1.subtract(r2), [
       new Rect(0, 0, 40, 100),
       new Rect(40, 0, 20, 40),
       new Rect(40, 60, 20, 40),
       new Rect(60, 0, 40, 100)]),
       "subtracting rect in middle leaves union of rects");
   },
 };
--- a/toolkit/modules/tests/xpcshell/test_Log.js
+++ b/toolkit/modules/tests/xpcshell/test_Log.js
@@ -164,30 +164,30 @@ add_task(function test_StructuredLogComm
     logger.logStructured("", {_message: "invalid message"});
   } catch (e) {
     errored = true;
     do_check_eq(e, "An action is required when logging a structured message.");
   } finally {
     do_check_true(errored);
   }
 
-  let errored = false;
+  errored = false;
   try {
     logger.logStructured("message_action", "invalid params");
   } catch (e) {
     errored = true;
     do_check_eq(e, "The params argument is required to be an object.");
   } finally {
     do_check_true(errored);
   }
 
   // Logging with unstructured interface should produce the same messages
   // as the structured interface for these cases.
-  let appender = new MockAppender(new Log.StructuredFormatter());
-  let logger = Log.repository.getLogger("test.StructuredOutput1");
+  appender = new MockAppender(new Log.StructuredFormatter());
+  logger = Log.repository.getLogger("test.StructuredOutput1");
   messageOne._namespace = "test.StructuredOutput1";
   messageTwo._namespace = "test.StructuredOutput1";
   logger.addAppender(appender);
   logger.level = Log.Level.All;
   logger.info("message string one", {action: "test_message"});
   logger.error("message string two", {action: "test_message",
                                       source_file: "test_Log.js"});
 
@@ -372,17 +372,17 @@ add_task(function log_message_with_param
 
   // If an object has a .toJSON method, the formatter uses it.
   let ob = function() {};
   ob.toJSON = function() {return {sneaky: "value"}};
   do_check_eq(formatMessage("JSON is ${sub}", {sub: ob}),
               'JSON is {"sneaky":"value"}');
 
   // Fall back to .toSource() if JSON.stringify() fails on an object.
-  let ob = function() {};
+  ob = function() {};
   ob.toJSON = function() {throw "oh noes JSON"};
   do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
               'Fail is (function () {})');
 
   // Fall back to .toString if both .toJSON and .toSource fail.
   ob.toSource = function() {throw "oh noes SOURCE"};
   do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
               'Fail is function () {}');
@@ -425,29 +425,29 @@ add_task(function log_message_with_param
    * Check that errors get special formatting if they're formatted directly as
    * a named param or they're the only param, but not if they're a field in a
    * larger structure.
    */
   let err = Components.Exception("test exception", Components.results.NS_ERROR_FAILURE);
   let str = formatMessage("Exception is ${}", err);
   do_check_true(str.contains('Exception is [Exception... "test exception"'));
   do_check_true(str.contains("(NS_ERROR_FAILURE)"));
-  let str = formatMessage("Exception is", err);
+  str = formatMessage("Exception is", err);
   do_check_true(str.contains('Exception is: [Exception... "test exception"'));
-  let str = formatMessage("Exception is ${error}", {error: err});
+  str = formatMessage("Exception is ${error}", {error: err});
   do_check_true(str.contains('Exception is [Exception... "test exception"'));
-  let str = formatMessage("Exception is", {_error: err});
+  str = formatMessage("Exception is", {_error: err});
   do_print(str);
   // Exceptions buried inside objects are formatted badly.
   do_check_true(str.contains('Exception is: {"_error":{}'));
   // If the message text is null, the message contains only the formatted params object.
-  let str = formatMessage(null, err);
+  str = formatMessage(null, err);
   do_check_true(str.startsWith('[Exception... "test exception"'));
   // If the text is null and 'params' is a String object, the message is exactly that string.
-  let str = formatMessage(null, new String("String in place of params"));
+  str = formatMessage(null, new String("String in place of params"));
   do_check_eq(str, "String in place of params");
 
   // We use object.valueOf() internally; make sure a broken valueOf() method
   // doesn't cause the logger to fail.
   let vOf = {a: 1, valueOf: function() {throw "oh noes valueOf"}};
   do_check_eq(formatMessage("Broken valueOf ${}", vOf),
               'Broken valueOf ({a:1, valueOf:(function () {throw "oh noes valueOf"})})');
 
--- a/toolkit/modules/tests/xpcshell/test_sqlite.js
+++ b/toolkit/modules/tests/xpcshell/test_sqlite.js
@@ -706,17 +706,17 @@ add_task(function test_programmatic_bind
   let secondSucceeded = false;
   try {
     yield c.executeTransaction(function transaction() {
       // Insert one row. This won't implicitly start a transaction.
       let result = yield c.execute(sql, bindings[0]);
 
       // Insert multiple rows. mozStorage will want to start a transaction.
       // One of the inserts will fail, so the transaction should be rolled back.
-      let result = yield c.execute(sql, bindings);
+      result = yield c.execute(sql, bindings);
       secondSucceeded = true;
     });
   } catch (ex) {
     print("Caught expected exception: " + ex);
   }
 
   // We did not get to the end of our in-transaction block.
   do_check_false(secondSucceeded);
--- a/toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js
@@ -227,16 +227,18 @@ function* check_addons_uninstalled(aAddo
   yield true;
 }
 
 // Test what happens when the user cancels during AddonRepository.repopulateCache()
 // Add-ons that have updates available should not update if they were disabled before
 // For this test, addon8 became disabled during update and addon9 was previously disabled,
 // so addon8 should update and addon9 should not
 add_task(function cancel_during_repopulate() {
+  let a5, a8, a9, a10;
+
   Services.prefs.setBoolPref(PREF_STRICT_COMPAT, true);
   Services.prefs.setCharPref(PREF_MIN_PLATFORM_COMPAT, "0");
   Services.prefs.setCharPref(PREF_UPDATEURL, TESTROOT + "missing.rdf");
 
   let installsDone = promise_observer("TEST:all-updates-done");
 
   // Don't pull compatibility data during add-on install
   Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, false);
@@ -245,17 +247,17 @@ add_task(function cancel_during_repopula
   // AddonRepository cache
   let addonList = [ao5, ao8, ao9, ao10];
   yield promise_install_test_addons(addonList,
                                     TESTROOT + "cancelCompatCheck.sjs?500");
 
   Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, true);
   Services.prefs.setCharPref(PREF_GETADDONS_BYIDS, TESTROOT + "browser_bug557956.xml");
 
-  let [a5, a8, a9] = yield promise_addons_by_ids([ao5.id, ao8.id, ao9.id]);
+  [a5, a8, a9] = yield promise_addons_by_ids([ao5.id, ao8.id, ao9.id]);
   ok(!a5.isCompatible, "addon5 should not be compatible");
   ok(!a8.isCompatible, "addon8 should not be compatible");
   ok(!a9.isCompatible, "addon9 should not be compatible");
 
   let compatWindow = yield promise_open_compatibility_window([ao5.id, ao8.id]);
   var doc = compatWindow.document;
   yield promise_page(compatWindow, "versioninfo");
 
@@ -274,48 +276,50 @@ add_task(function cancel_during_repopula
   // There should be no active updates
   let getInstalls = Promise.defer();
   AddonManager.getAllInstalls(getInstalls.resolve);
   let installs = yield getInstalls.promise;
   is (installs.length, 0, "There should be no active installs after background installs are done");
 
   // addon8 should have updated in the background,
   // addon9 was listed as previously disabled so it should not have updated
-  let [a5, a8, a9, a10] = yield promise_addons_by_ids([ao5.id, ao8.id, ao9.id, ao10.id]);