Bug 1206683 - Enable eslint rule for no unused variables for Loop. r=Mardak
authorMark Banner <standard8@mozilla.com>
Tue, 08 Dec 2015 08:08:06 -0500
changeset 310024 caf389bbafbcb9e1f5e37f41e8ec62a7c907025a
parent 310023 9214b6cd1112bad206619a6ea9052d644eb6c105
child 310025 1fbccc6fa1c022f82a60c951711bd9281626ea4f
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMardak
bugs1206683
milestone45.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 1206683 - Enable eslint rule for no unused variables for Loop. r=Mardak
browser/extensions/loop/content/panels/js/roomStore.js
browser/extensions/loop/content/shared/js/linkifiedTextView.js
browser/extensions/loop/content/shared/js/linkifiedTextView.jsx
browser/extensions/loop/content/shared/js/otSdkDriver.js
browser/extensions/loop/content/shared/js/textChatStore.js
browser/extensions/loop/content/shared/js/utils.js
browser/extensions/loop/standalone/content/js/standaloneAppStore.js
browser/extensions/loop/standalone/content/js/webapp.js
browser/extensions/loop/standalone/content/js/webapp.jsx
browser/extensions/loop/test/desktop-local/feedbackViews_test.js
browser/extensions/loop/test/desktop-local/roomStore_test.js
browser/extensions/loop/test/shared/crypto_test.js
browser/extensions/loop/test/shared/linkifiedTextView_test.js
browser/extensions/loop/test/shared/mixins_test.js
browser/extensions/loop/test/shared/models_test.js
browser/extensions/loop/test/shared/otSdkDriver_test.js
browser/extensions/loop/test/standalone/standaloneAppStore_test.js
browser/extensions/loop/test/standalone/standaloneMetricsStore_test.js
browser/extensions/loop/test/standalone/webapp_test.js
browser/extensions/loop/test/xpcshell/test_looppush_initialize.js
browser/extensions/loop/test/xpcshell/test_loopservice_registration.js
browser/extensions/loop/test/xpcshell/test_loopservice_registration_retry.js
browser/extensions/loop/test/xpcshell/test_loopservice_restart.js
browser/extensions/loop/test/xpcshell/test_loopservice_token_save.js
browser/extensions/loop/test/xpcshell/test_loopservice_token_send.js
--- a/browser/extensions/loop/content/panels/js/roomStore.js
+++ b/browser/extensions/loop/content/panels/js/roomStore.js
@@ -204,17 +204,16 @@ loop.store = loop.store || {};
         roomList: this._storeState.rooms.filter(function(room) {
           return room.roomToken !== removedRoomData.roomToken;
         })
       }));
     },
 
     /**
      * Executed when the user switches accounts.
-     *
      */
     _onRoomsRefresh: function() {
       this.dispatchAction(new sharedActions.UpdateRoomList({
         roomList: []
       }));
     },
 
     /**
@@ -335,17 +334,17 @@ loop.store = loop.store || {};
     /**
      * Emails a room url.
      *
      * @param  {sharedActions.EmailRoomUrl} actionData The action data.
      */
     emailRoomUrl: function(actionData) {
       var from = actionData.from;
       loop.shared.utils.composeCallUrlEmail(actionData.roomUrl, null,
-        actionData.roomDescription, from);
+        actionData.roomDescription);
 
       var bucket = this._constants.SHARING_ROOM_URL["EMAIL_FROM_" + (from || "").toUpperCase()];
       if (typeof bucket === "undefined") {
         console.error("No URL sharing type bucket found for '" + from + "'");
         return;
       }
       loop.requestMulti(
         ["NotifyUITour", "Loop:RoomURLEmailed"],
@@ -381,20 +380,18 @@ loop.store = loop.store || {};
       loop.requestMulti(
         ["SocialShareRoom", actionData.provider.origin, actionData.roomUrl,
          shareTitle, shareBody],
         ["NotifyUITour", "Loop:RoomURLShared"]);
     },
 
     /**
      * Open the share panel to add a Social share provider.
-     *
-     * @param {sharedActions.AddSocialShareProvider} actionData The action data.
      */
-    addSocialShareProvider: function(actionData) {
+    addSocialShareProvider: function() {
       loop.request("AddSocialShareProvider");
     },
 
     /**
      * Creates a new room.
      *
      * @param {sharedActions.DeleteRoom} actionData The action data.
      */
--- a/browser/extensions/loop/content/shared/js/linkifiedTextView.js
+++ b/browser/extensions/loop/content/shared/js/linkifiedTextView.js
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var loop = loop || {};
 loop.shared = loop.shared || {};
 loop.shared.views = loop.shared.views || {};
-loop.shared.views.LinkifiedTextView = (function(mozL10n) {
+loop.shared.views.LinkifiedTextView = (function() {
   "use strict";
 
   /**
    * Given a rawText property, renderer a version of that text with any
    * links starting with http://, https://, or ftp:// as actual clickable
    * links inside a <p> container.
    */
   var LinkifiedTextView = React.createClass({displayName: "LinkifiedTextView",
@@ -108,9 +108,9 @@ loop.shared.views.LinkifiedTextView = (f
       return (
         React.createElement("p", null, this.parseStringToElements(this.props.rawText))
       );
     }
   });
 
   return LinkifiedTextView;
 
-})(navigator.mozL10n || document.mozL10n);
+})();
--- a/browser/extensions/loop/content/shared/js/linkifiedTextView.jsx
+++ b/browser/extensions/loop/content/shared/js/linkifiedTextView.jsx
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var loop = loop || {};
 loop.shared = loop.shared || {};
 loop.shared.views = loop.shared.views || {};
-loop.shared.views.LinkifiedTextView = (function(mozL10n) {
+loop.shared.views.LinkifiedTextView = (function() {
   "use strict";
 
   /**
    * Given a rawText property, renderer a version of that text with any
    * links starting with http://, https://, or ftp:// as actual clickable
    * links inside a <p> container.
    */
   var LinkifiedTextView = React.createClass({
@@ -108,9 +108,9 @@ loop.shared.views.LinkifiedTextView = (f
       return (
         <p>{this.parseStringToElements(this.props.rawText)}</p>
       );
     }
   });
 
   return LinkifiedTextView;
 
-})(navigator.mozL10n || document.mozL10n);
+})();
--- a/browser/extensions/loop/content/shared/js/otSdkDriver.js
+++ b/browser/extensions/loop/content/shared/js/otSdkDriver.js
@@ -689,17 +689,17 @@ loop.OTSdkDriver = (function() {
 
               this.dispatcher.dispatch(
                 new sharedActions.ReceivedTextChatMessage(message));
             } catch (ex) {
               console.error("Failed to process incoming chat message", ex);
             }
           }.bind(this),
 
-          close: function(e) {
+          close: function() {
             // XXX We probably want to dispatch and handle this somehow.
             console.log("Subscribed data channel closed!");
           }
         });
 
         this._subscriberChannel = channel;
         this._checkDataChannelsAvailable();
       }.bind(this));
@@ -708,20 +708,18 @@ loop.OTSdkDriver = (function() {
     /**
      * Handles receiving the signal that the other end of the connection
      * has subscribed to the stream and we're ready to setup the data channel.
      *
      * We create the publisher data channel when we get the signal as it means
      * that the remote client is setup for data
      * channels. Getting the data channel for the subscriber is handled
      * separately when the subscription completes.
-     *
-     * @param {OT.SignalEvent} event Details of the signal received.
      */
-    _onReadyForDataChannel: function(event) {
+    _onReadyForDataChannel: function() {
       // If we don't want data channels, just ignore the message. We haven't
       // send the other side a message, so it won't display anything.
       if (!this._useDataChannels) {
         return;
       }
 
       // This won't work until a subscriber exists for this publisher
       this.publisher._.getDataChannel("text", {}, function(err, channel) {
@@ -729,17 +727,17 @@ loop.OTSdkDriver = (function() {
           console.error(err);
           this._notifyMetricsEvent("sdk.datachannel.pub." + err.message);
           return;
         }
 
         this._publisherChannel = channel;
 
         channel.on({
-          close: function(e) {
+          close: function() {
             // XXX We probably want to dispatch and handle this somehow.
             console.log("Published data channel closed!");
           }
         });
 
         this._checkDataChannelsAvailable();
       }.bind(this));
     },
@@ -986,42 +984,38 @@ loop.OTSdkDriver = (function() {
     },
 
     /**
      * Handle the (remote) VideoEnabled event from the subscriber object
      * by dispatching an action with the (hidden) video element from
      * which to copy the stream when attaching it to visible video element
      * that the views control directly.
      *
-     * @param event {OT.VideoEnabledChangedEvent} from the SDK
-     *
      * @see https://tokbox.com/opentok/libraries/client/js/reference/VideoEnabledChangedEvent.html
      * @private
      */
-    _onVideoEnabled: function(event) {
+    _onVideoEnabled: function() {
       var sdkSubscriberVideo = this._mockSubscribeEl.querySelector("video");
       if (!sdkSubscriberVideo) {
         console.error("sdkSubscriberVideo unexpectedly falsy!");
       }
 
       this.dispatcher.dispatch(new sharedActions.RemoteVideoStatus({
         videoEnabled: true
       }));
     },
 
     /**
      * Handle the SDK disabling of remote video by dispatching the
      * appropriate event.
      *
-     * @param event {OT.VideoEnabledChangedEvent) from the SDK
-     *
      * @see https://tokbox.com/opentok/libraries/client/js/reference/VideoEnabledChangedEvent.html
      * @private
      */
-    _onVideoDisabled: function(event) {
+    _onVideoDisabled: function() {
       this.dispatcher.dispatch(new sharedActions.RemoteVideoStatus({
         videoEnabled: false
       }));
     },
 
     /**
      * Publishes the local stream if the session is connected
      * and the publisher is ready.
--- a/browser/extensions/loop/content/shared/js/textChatStore.js
+++ b/browser/extensions/loop/content/shared/js/textChatStore.js
@@ -3,18 +3,16 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var loop = loop || {};
 loop.store = loop.store || {};
 
 loop.store.TextChatStore = (function() {
   "use strict";
 
-  var sharedActions = loop.shared.actions;
-
   var CHAT_MESSAGE_TYPES = loop.store.CHAT_MESSAGE_TYPES = {
     RECEIVED: "recv",
     SENT: "sent",
     SPECIAL: "special"
   };
 
   var CHAT_CONTENT_TYPES = loop.shared.utils.CHAT_CONTENT_TYPES;
 
--- a/browser/extensions/loop/content/shared/js/utils.js
+++ b/browser/extensions/loop/content/shared/js/utils.js
@@ -392,19 +392,18 @@ var inChrome = typeof Components != "und
 
   /**
    * Generates and opens a mailto: url with call URL information prefilled.
    * Note: This only works for Desktop.
    *
    * @param {String} callUrl              The call URL.
    * @param {String} [recipient]          The recipient email address (optional).
    * @param {String} [contextDescription] The context description (optional).
-   * @param {String} [from]               The area from which this function is called.
    */
-  function composeCallUrlEmail(callUrl, recipient, contextDescription, from) {
+  function composeCallUrlEmail(callUrl, recipient, contextDescription) {
     if (!isDesktop()) {
       console.warn("composeCallUrlEmail isn't available for Loop standalone.");
       return;
     }
 
     var subject, body;
     var footer = mozL10n.get("share_email_footer2");
     if (contextDescription) {
--- a/browser/extensions/loop/standalone/content/js/standaloneAppStore.js
+++ b/browser/extensions/loop/standalone/content/js/standaloneAppStore.js
@@ -7,17 +7,16 @@ loop.store = loop.store || {};
 
 /**
  * Manages the standalone app controller view. Used to get
  * the window data and store the window type.
  */
 loop.store.StandaloneAppStore = (function() {
   "use strict";
 
-  var sharedActions = loop.shared.actions;
   var sharedUtils = loop.shared.utils;
 
   var CALL_REGEXP = /\/c\/([\w\-]+)$/;
   var ROOM_REGEXP = /\/([\w\-]+)$/;
 
   /**
    * Constructor
    *
--- a/browser/extensions/loop/standalone/content/js/webapp.js
+++ b/browser/extensions/loop/standalone/content/js/webapp.js
@@ -6,20 +6,17 @@ var loop = loop || {};
 loop.webapp = (function(_, OT, mozL10n) {
   "use strict";
 
   loop.config = loop.config || {};
   loop.config.serverUrl = loop.config.serverUrl || "http://localhost:5000";
 
   var sharedActions = loop.shared.actions;
   var sharedMixins = loop.shared.mixins;
-  var sharedModels = loop.shared.models;
-  var sharedViews = loop.shared.views;
   var sharedUtils = loop.shared.utils;
-  var WEBSOCKET_REASONS = loop.shared.utils.WEBSOCKET_REASONS;
 
   /**
    * Homepage view.
    */
   var HomeView = React.createClass({displayName: "HomeView",
     render: function() {
       return (
         React.createElement("p", null, mozL10n.get("welcome", { clientShortname: mozL10n.get("clientShortname2") }))
@@ -170,21 +167,20 @@ loop.webapp = (function(_, OT, mozL10n) 
       }
     }
   });
 
   /**
    * App initialization.
    */
   function init() {
-    var standaloneMozLoop = new loop.StandaloneMozLoop({
+    loop.StandaloneMozLoop({
       baseServerUrl: loop.config.serverUrl
     });
 
-    // New flux items.
     var dispatcher = new loop.Dispatcher();
     var sdkDriver = new loop.OTSdkDriver({
       // For the standalone, always request data channels. If they aren't
       // implemented on the client, there won't be a similar message to us, and
       // we won't display the UI.
       constants: {},
       useDataChannels: true,
       dispatcher: dispatcher,
--- a/browser/extensions/loop/standalone/content/js/webapp.jsx
+++ b/browser/extensions/loop/standalone/content/js/webapp.jsx
@@ -6,20 +6,17 @@ var loop = loop || {};
 loop.webapp = (function(_, OT, mozL10n) {
   "use strict";
 
   loop.config = loop.config || {};
   loop.config.serverUrl = loop.config.serverUrl || "http://localhost:5000";
 
   var sharedActions = loop.shared.actions;
   var sharedMixins = loop.shared.mixins;
-  var sharedModels = loop.shared.models;
-  var sharedViews = loop.shared.views;
   var sharedUtils = loop.shared.utils;
-  var WEBSOCKET_REASONS = loop.shared.utils.WEBSOCKET_REASONS;
 
   /**
    * Homepage view.
    */
   var HomeView = React.createClass({
     render: function() {
       return (
         <p>{mozL10n.get("welcome", { clientShortname: mozL10n.get("clientShortname2") })}</p>
@@ -170,21 +167,20 @@ loop.webapp = (function(_, OT, mozL10n) 
       }
     }
   });
 
   /**
    * App initialization.
    */
   function init() {
-    var standaloneMozLoop = new loop.StandaloneMozLoop({
+    loop.StandaloneMozLoop({
       baseServerUrl: loop.config.serverUrl
     });
 
-    // New flux items.
     var dispatcher = new loop.Dispatcher();
     var sdkDriver = new loop.OTSdkDriver({
       // For the standalone, always request data channels. If they aren't
       // implemented on the client, there won't be a similar message to us, and
       // we won't display the UI.
       constants: {},
       useDataChannels: true,
       dispatcher: dispatcher,
--- a/browser/extensions/loop/test/desktop-local/feedbackViews_test.js
+++ b/browser/extensions/loop/test/desktop-local/feedbackViews_test.js
@@ -18,17 +18,17 @@ describe("loop.feedbackViews", function(
   });
 
   afterEach(function() {
     sandbox.restore();
   });
 
   describe("FeedbackView", function() {
     var openURLStub, getLoopPrefStub, feedbackReceivedStub;
-    var fakeURL = "fake.form", mozLoop, view;
+    var fakeURL = "fake.form", view;
 
     function mountTestComponent(props) {
       props = _.extend({
         onAfterFeedbackReceived: feedbackReceivedStub
       }, props);
 
       return TestUtils.renderIntoDocument(
         React.createElement(FeedbackView, props));
--- a/browser/extensions/loop/test/desktop-local/roomStore_test.js
+++ b/browser/extensions/loop/test/desktop-local/roomStore_test.js
@@ -488,33 +488,33 @@ describe("loop.store.RoomStore", functio
 
         store.emailRoomUrl(new sharedActions.EmailRoomUrl({
           roomUrl: "http://invalid",
           from: "conversation"
         }));
 
         sinon.assert.calledOnce(sharedUtils.composeCallUrlEmail);
         sinon.assert.calledWith(sharedUtils.composeCallUrlEmail,
-          "http://invalid", null, undefined, "conversation");
+          "http://invalid", null, undefined);
       });
 
       it("should call composeUrlEmail differently with context", function() {
         sandbox.stub(sharedUtils, "composeCallUrlEmail");
 
         var url = "http://invalid";
         var description = "Hello, is it me you're looking for?";
         store.emailRoomUrl(new sharedActions.EmailRoomUrl({
           roomUrl: url,
           roomDescription: description,
           from: "conversation"
         }));
 
         sinon.assert.calledOnce(sharedUtils.composeCallUrlEmail);
         sinon.assert.calledWithExactly(sharedUtils.composeCallUrlEmail,
-          url, null, description, "conversation");
+          url, null, description);
       });
     });
 
     describe("#shareRoomUrl", function() {
       var socialShareRoomStub;
 
       beforeEach(function() {
         socialShareRoomStub = sinon.stub();
--- a/browser/extensions/loop/test/shared/crypto_test.js
+++ b/browser/extensions/loop/test/shared/crypto_test.js
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 describe("loop.crypto", function() {
   "use strict";
 
   var expect = chai.expect;
-  var sandbox, oldCrypto;
+  var sandbox;
 
   beforeEach(function() {
     sandbox = sinon.sandbox.create();
   });
 
   afterEach(function() {
     sandbox.restore();
     loop.crypto.setRootObject(window);
--- a/browser/extensions/loop/test/shared/linkifiedTextView_test.js
+++ b/browser/extensions/loop/test/shared/linkifiedTextView_test.js
@@ -113,17 +113,16 @@ describe("loop.shared.views.LinkifiedTex
 
           TestUtils.Simulate.click(comp.getDOMNode().querySelector("a"));
 
           sinon.assert.calledOnce(linkClickHandler);
         });
 
         it("should cause sendReferrer and suppressTarget props to be ignored",
           function() {
-            var fakeUrl = "http://example.com";
             var linkClickHandler = function() {};
 
             var markup = renderToMarkup("http://example.com", {
               linkClickHandler: linkClickHandler,
               sendReferrer: false,
               suppressTarget: false
             });
 
--- a/browser/extensions/loop/test/shared/mixins_test.js
+++ b/browser/extensions/loop/test/shared/mixins_test.js
@@ -139,17 +139,17 @@ describe("loop.shared.mixins", function(
       comp.closeWindow();
 
       sinon.assert.calledOnce(rootObject.close);
       sinon.assert.calledWithExactly(rootObject.close);
     });
   });
 
   describe("loop.shared.mixins.DocumentVisibilityMixin", function() {
-    var comp, TestComp, onDocumentVisibleStub, onDocumentHiddenStub;
+    var TestComp, onDocumentVisibleStub, onDocumentHiddenStub;
 
     beforeEach(function() {
       onDocumentVisibleStub = sandbox.stub();
       onDocumentHiddenStub = sandbox.stub();
 
       TestComp = React.createClass({
         mixins: [loop.shared.mixins.DocumentVisibilityMixin],
         onDocumentHidden: onDocumentHiddenStub,
@@ -170,27 +170,27 @@ describe("loop.shared.mixins", function(
         }
       });
     }
 
     it("should call onDocumentVisible when document visibility changes to visible",
       function() {
         setupFakeVisibilityEventDispatcher({ target: { hidden: false } });
 
-        comp = TestUtils.renderIntoDocument(React.createElement(TestComp));
+        TestUtils.renderIntoDocument(React.createElement(TestComp));
 
         // Twice, because it's also called when the component was mounted.
         sinon.assert.calledTwice(onDocumentVisibleStub);
       });
 
     it("should call onDocumentVisible when document visibility changes to hidden",
       function() {
         setupFakeVisibilityEventDispatcher({ target: { hidden: true } });
 
-        comp = TestUtils.renderIntoDocument(React.createElement(TestComp));
+        TestUtils.renderIntoDocument(React.createElement(TestComp));
 
         sinon.assert.calledOnce(onDocumentHiddenStub);
       });
   });
 
   describe("loop.shared.mixins.MediaSetupMixin", function() {
     var view;
 
@@ -216,17 +216,17 @@ describe("loop.shared.mixins", function(
         expect(view.getDefaultPublisherConfig({
           publishVideo: true
         }).publishVideo).eql(true);
       });
     });
   });
 
   describe("loop.shared.mixins.AudioMixin", function() {
-    var view, fakeAudio, getAudioBlobStub, TestComp;
+    var TestComp, getAudioBlobStub, fakeAudio;
 
     beforeEach(function() {
       getAudioBlobStub = sinon.stub().returns(
         new Blob([new ArrayBuffer(10)], { type: "audio/ogg" }));
       LoopMochaUtils.stubLoopRequest({
         GetDoNotDisturb: function() { return true; },
         GetAudioBlob: getAudioBlobStub,
         GetLoopPref: sandbox.stub()
@@ -251,35 +251,35 @@ describe("loop.shared.mixins", function(
 
     });
 
     afterEach(function() {
       LoopMochaUtils.restore();
     });
 
     it("should not play a failure sound when doNotDisturb true", function() {
-      view = TestUtils.renderIntoDocument(React.createElement(TestComp));
+      TestUtils.renderIntoDocument(React.createElement(TestComp));
       sinon.assert.notCalled(getAudioBlobStub);
       sinon.assert.notCalled(fakeAudio.play);
     });
 
     it("should play a failure sound, once", function() {
       LoopMochaUtils.stubLoopRequest({
         GetDoNotDisturb: function() { return false; }
       });
-      view = TestUtils.renderIntoDocument(React.createElement(TestComp));
+      TestUtils.renderIntoDocument(React.createElement(TestComp));
       sinon.assert.calledOnce(getAudioBlobStub);
       sinon.assert.calledWithExactly(getAudioBlobStub, "failure");
       sinon.assert.calledOnce(fakeAudio.play);
       expect(fakeAudio.loop).to.equal(false);
     });
   });
 
   describe("loop.shared.mixins.RoomsAudioMixin", function() {
-    var view, fakeAudioMixin, comp;
+    var comp;
 
     function createTestComponent(initialState) {
       var TestComp = React.createClass({
         mixins: [loop.shared.mixins.RoomsAudioMixin],
         render: function() {
           return React.DOM.div();
         },
 
--- a/browser/extensions/loop/test/shared/models_test.js
+++ b/browser/extensions/loop/test/shared/models_test.js
@@ -14,25 +14,23 @@ describe("loop.shared.models", function(
     sandbox = sinon.sandbox.create();
   });
 
   afterEach(function() {
     sandbox.restore();
   });
 
   describe("NotificationCollection", function() {
-    var collection, notifData, testNotif;
+    var collection;
 
     beforeEach(function() {
       collection = new sharedModels.NotificationCollection();
       sandbox.stub(l10n, "get", function(x, y) {
         return "translated:" + x + (y ? ":" + y : "");
       });
-      notifData = { level: "error", message: "plop" };
-      testNotif = new sharedModels.NotificationModel(notifData);
     });
 
     describe("#warn", function() {
       it("should add a warning notification to the stack", function() {
         collection.warn("watch out");
 
         expect(collection).to.have.length.of(1);
         expect(collection.at(0).get("level")).eql("warning");
--- a/browser/extensions/loop/test/shared/otSdkDriver_test.js
+++ b/browser/extensions/loop/test/shared/otSdkDriver_test.js
@@ -746,18 +746,17 @@ describe("loop.OTSdkDriver", function() 
         sinon.assert.calledOnce(driver._publisherChannel.send);
         sinon.assert.calledWithExactly(driver._publisherChannel.send,
           JSON.stringify(message));
       });
     });
   });
 
   describe("Events: general media", function() {
-    var fakeConnection, fakeStream, fakeSubscriberObject,
-      fakeSdkContainerWithVideo, videoElement;
+    var fakeConnection, fakeStream, fakeSubscriberObject, videoElement;
 
     beforeEach(function() {
       fakeConnection = "fakeConnection";
       fakeStream = {
         hasVideo: true,
         videoType: "camera",
         videoDimensions: { width: 1, height: 2 }
       };
@@ -765,20 +764,16 @@ describe("loop.OTSdkDriver", function() 
       fakeSubscriberObject = _.extend({
         "_": {
           getDataChannel: sinon.stub()
         },
         session: { connection: fakeConnection },
         stream: fakeStream
       }, Backbone.Events);
 
-      fakeSdkContainerWithVideo = {
-        querySelector: sinon.stub().returns(videoElement)
-      };
-
       // use a real video element so that these tests correctly reflect
       // test behavior when run in firefox or chrome
       videoElement = document.createElement("video");
 
       driver.connectSession(sessionData);
 
       driver.setupStreamElements(new sharedActions.SetupStreamElements({
         publisherConfig: publisherConfig
@@ -1821,28 +1816,22 @@ describe("loop.OTSdkDriver", function() 
               recvStreams: 0
             }));
         });
       });
     });
   });
 
   describe("Events: screenshare:", function() {
-    var videoElement;
-
     beforeEach(function() {
       driver.connectSession(sessionData);
 
       driver.startScreenShare({
         videoSource: "window"
       });
-
-      // use a real video element so that these tests correctly reflect
-      // code behavior when run in whatever browser
-      videoElement = document.createElement("video");
     });
 
     describe("accessAllowed", function() {
       it("should publish the stream", function() {
         publisher.trigger("accessAllowed", fakeEvent);
 
         sinon.assert.calledOnce(session.publish);
       });
--- a/browser/extensions/loop/test/standalone/standaloneAppStore_test.js
+++ b/browser/extensions/loop/test/standalone/standaloneAppStore_test.js
@@ -1,17 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 describe("loop.store.StandaloneAppStore", function() {
   "use strict";
 
   var expect = chai.expect;
   var sharedActions = loop.shared.actions;
-  var sharedUtils = loop.shared.utils;
   var sandbox, dispatcher;
 
   beforeEach(function() {
     sandbox = sinon.sandbox.create();
     dispatcher = new loop.Dispatcher();
   });
 
   afterEach(function() {
--- a/browser/extensions/loop/test/standalone/standaloneMetricsStore_test.js
+++ b/browser/extensions/loop/test/standalone/standaloneMetricsStore_test.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 describe("loop.store.StandaloneMetricsStore", function() {
   "use strict";
 
-  var expect = chai.expect;
   var sandbox, dispatcher, store, fakeActiveRoomStore;
 
   var sharedActions = loop.shared.actions;
   var METRICS_GA_CATEGORY = loop.store.METRICS_GA_CATEGORY;
   var METRICS_GA_ACTIONS = loop.store.METRICS_GA_ACTIONS;
   var ROOM_STATES = loop.store.ROOM_STATES;
   var FAILURE_DETAILS = loop.shared.utils.FAILURE_DETAILS;
 
--- a/browser/extensions/loop/test/standalone/webapp_test.js
+++ b/browser/extensions/loop/test/standalone/webapp_test.js
@@ -68,17 +68,17 @@ describe("loop.webapp", function() {
         new sharedActions.ExtractTokenInfo({
           windowPath: "/c/faketoken",
           windowHash: "#fakeKey"
         }));
     });
   });
 
   describe("WebappRootView", function() {
-    var sdk, conversationModel, client, props, standaloneAppStore;
+    var sdk, standaloneAppStore;
     var activeRoomStore;
 
     function mountTestComponent() {
       return TestUtils.renderIntoDocument(
         React.createElement(
           loop.webapp.WebappRootView, {
             activeRoomStore: activeRoomStore,
             dispatcher: dispatcher,
@@ -155,17 +155,17 @@ describe("loop.webapp", function() {
           React.createElement(loop.webapp.PromoteFirefoxView, {
             isFirefox: true
         }));
 
         expect(comp.getDOMNode()).eql(null);
       });
 
       it("should render when not using Firefox", function() {
-        var comp = TestUtils.renderIntoDocument(
+        TestUtils.renderIntoDocument(
           React.createElement(loop.webapp.PromoteFirefoxView, {
               isFirefox: false
         }));
 
         sinon.assert.calledWith(mozL10nGet, "promote_firefox_hello_heading");
         sinon.assert.calledWith(mozL10nGet, "get_firefox_button");
       });
     });
--- a/browser/extensions/loop/test/xpcshell/test_looppush_initialize.js
+++ b/browser/extensions/loop/test/xpcshell/test_looppush_initialize.js
@@ -116,29 +116,29 @@ add_test(function test_reconnect_no_regi
     },
     dummyCallback
   );
 });
 
 add_test(function test_ping_websocket() {
   let pingReceived = false,
       socketClosed = false;
-  mockWebSocket.defaultMsgHandler = (msg) => {
+  mockWebSocket.defaultMsgHandler = () => {
     pingReceived = true;
     // Do not send a ping response.
   };
   mockWebSocket.close = () => {
     socketClosed = true;
   };
 
   MozLoopPushHandler.shutdown();
   MozLoopPushHandler.initialize({ mockWebSocket: mockWebSocket });
   MozLoopPushHandler.register(
     "test-chan",
-    function(err, url) {
+    function(err) {
       Assert.equal(err, null, "err should be null to indicate success");
       waitForCondition(() => pingReceived).then(() => {
         waitForCondition(() => socketClosed).then(() => {
           run_next_test();
         }, () => {
           do_throw("should have closed the websocket");
         });
       }, () => {
--- a/browser/extensions/loop/test/xpcshell/test_loopservice_registration.js
+++ b/browser/extensions/loop/test/xpcshell/test_loopservice_registration.js
@@ -52,17 +52,17 @@ add_test(function test_register_success(
     }
 
     response.setStatusLine(null, 200, "OK");
     response.processAsync();
     response.finish();
   });
   MozLoopService.promiseRegisteredWithServers().then(() => {
     run_next_test();
-  }, err => {
+  }, () => {
     do_throw("shouldn't error on a successful request");
   });
 });
 
 function run_test() {
   setupFakeLoopServer();
 
   do_register_cleanup(function() {
--- a/browser/extensions/loop/test/xpcshell/test_loopservice_registration_retry.js
+++ b/browser/extensions/loop/test/xpcshell/test_loopservice_registration_retry.js
@@ -30,17 +30,17 @@ add_test(function test_retry_after_faile
     mockPushHandler.registrationPushURL = kEndPointUrl;
 
     yield regError.friendlyDetailsButtonCallback();
     Assert.strictEqual(MozLoopService.errors.size, 0, "Check that the errors are gone");
     let deferredRegistrations = MozLoopServiceInternal.deferredRegistrations;
     yield deferredRegistrations.get(LOOP_SESSION_TYPE.GUEST).then(() => {
       Assert.ok(true, "The retry of registration succeeded");
     },
-    (error) => {
+    () => {
       Assert.ok(false, "The retry of registration should have succeeded");
     });
 
     run_next_test();
   }));
 });
 
 function run_test() {
--- a/browser/extensions/loop/test/xpcshell/test_loopservice_restart.js
+++ b/browser/extensions/loop/test/xpcshell/test_loopservice_restart.js
@@ -18,18 +18,16 @@ const LOOP_FXA_PROFILE_PREF = "loop.fxa_
 const LOOP_CREATED_ROOM_PREF = "loop.createdRoom";
 const LOOP_INITIAL_DELAY_PREF = "loop.initialDelay";
 
 /**
  * This file is to test restart+reauth.
  */
 
 add_task(function* test_initialize_with_no_guest_rooms_and_no_auth_token() {
-  // Set time to be 2 seconds in the past.
-  var nowSeconds = Date.now() / 1000;
   Services.prefs.setBoolPref(LOOP_CREATED_ROOM_PREF, false);
   Services.prefs.clearUserPref(LOOP_FXA_TOKEN_PREF);
 
   yield MozLoopService.initialize().then((msg) => {
     Assert.equal(msg, "registration not needed", "Initialize should not register when the " +
                                                  "URLs are expired and there are no auth tokens");
   }, (error) => {
     Assert.ok(false, error, "should have resolved the promise that initialize returned");
@@ -68,17 +66,17 @@ add_task(function* test_initialize_with_
       error: "Unauthorized",
       message: "Unknown credentials"
     }));
   });
 
   yield MozLoopService.initialize().then(() => {
     Assert.ok(false, "Initializing with an invalid token should reject the promise");
   },
-  (error) => {
+  () => {
     Assert.equal(MozLoopServiceInternal.pushHandler.registrationPushURL, kEndPointUrl, "Push URL should match");
     Assert.equal(Services.prefs.getCharPref(LOOP_FXA_TOKEN_PREF), "",
                  "FXA pref should be cleared if token was invalid");
     Assert.equal(Services.prefs.getCharPref(LOOP_FXA_PROFILE_PREF), "",
                  "FXA profile pref should be cleared if token was invalid");
     Assert.ok(MozLoopServiceInternal.errors.has("login"),
               "Initialization error should have been reported to UI");
     Assert.ok(MozLoopServiceInternal.errors.has("login"));
--- a/browser/extensions/loop/test/xpcshell/test_loopservice_token_save.js
+++ b/browser/extensions/loop/test/xpcshell/test_loopservice_token_save.js
@@ -24,17 +24,17 @@ add_test(function test_registration_retu
       hawkSessionPref = Services.prefs.getCharPref("loop.hawk-session-token");
     } catch (ex) {
       // Do nothing
     }
     Assert.equal(hawkSessionPref, fakeSessionToken, "Should store" +
       " Hawk-Session-Token header contents in loop.hawk-session-token pref");
 
     run_next_test();
-  }, err => {
+  }, () => {
     do_throw("shouldn't error on a successful request");
   });
 });
 
 function run_test() {
   setupFakeLoopServer();
 
   mockPushHandler.registrationPushURL = kEndPointUrl;
--- a/browser/extensions/loop/test/xpcshell/test_loopservice_token_send.js
+++ b/browser/extensions/loop/test/xpcshell/test_loopservice_token_send.js
@@ -23,17 +23,17 @@ add_test(function test_registration_uses
 
     response.setStatusLine(null, 200, "OK");
     response.processAsync();
     response.finish();
   });
 
   MozLoopService.promiseRegisteredWithServers().then(() => {
     run_next_test();
-  }, err => {
+  }, () => {
     do_throw("shouldn't error on a succesful request");
   });
 });
 
 
 function run_test() {
   setupFakeLoopServer();