Bug 1230192 - Loop's desktop unit tests are doing lots of unnecessary console.log of dispatcher actions. r=dcritch
authorMark Banner <standard8@mozilla.com>
Fri, 04 Dec 2015 17:26:14 +0000
changeset 309769 f682b6e626841acb178c9ab57d2bc924bda7094a
parent 309768 c17fc2bbaaff6784b836eb03caeee7d81356f5cd
child 309770 a258f7e89c8bdfda345641cf302b94cadcdcf06d
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)
reviewersdcritch
bugs1230192
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 1230192 - Loop's desktop unit tests are doing lots of unnecessary console.log of dispatcher actions. r=dcritch
browser/extensions/loop/test/desktop-local/conversation_test.js
browser/extensions/loop/test/desktop-local/panel_test.js
browser/extensions/loop/test/desktop-local/roomStore_test.js
--- a/browser/extensions/loop/test/desktop-local/conversation_test.js
+++ b/browser/extensions/loop/test/desktop-local/conversation_test.js
@@ -24,16 +24,17 @@ describe("loop.conversation", function()
       },
       GetLocale: function() {
         return "en-US";
       },
       SetLoopPref: setLoopPrefStub,
       GetLoopPref: function(prefName) {
         switch (prefName) {
           case "debug.sdk":
+          case "debug.dispatcher":
             return false;
           default:
             return "http://fake";
         }
       },
       GetAllConstants: function() {
         return {
           LOOP_SESSION_TYPE: {
--- a/browser/extensions/loop/test/desktop-local/panel_test.js
+++ b/browser/extensions/loop/test/desktop-local/panel_test.js
@@ -51,17 +51,21 @@ describe("loop.panel", function() {
       },
       GetAllConstants: function() { return {}; },
       GetLocale: function() {
         return "en-US";
       },
       GetPluralRule: sinon.stub(),
       SetLoopPref: sinon.stub(),
       GetLoopPref: function(prefName) {
-        return "unseen";
+        if (prefName === "gettingStarted.seen") {
+          return "unseen";
+        }
+
+        return false;
       },
       GetPluralForm: function() {
         return "fakeText";
       },
       "Rooms:GetAll": function(version) {
         return [];
       },
       "Rooms:PushSubscription": sinon.stub(),
--- a/browser/extensions/loop/test/desktop-local/roomStore_test.js
+++ b/browser/extensions/loop/test/desktop-local/roomStore_test.js
@@ -45,18 +45,20 @@ describe("loop.store.RoomStore", functio
           },
           ROOM_CONTEXT_ADD: {
             ADD_FROM_PANEL: 0,
             ADD_FROM_CONVERSATION: 1
           }
         };
       },
       CopyString: sinon.stub(),
-      GetLoopPref: function(pref) {
-        return pref;
+      GetLoopPref: function(prefName) {
+        if (prefName === "debug.dispatcher") {
+          return false;
+        }
       },
       NotifyUITour: function() {},
       "Rooms:Create": sinon.stub().returns({ roomToken: "fakeToken" }),
       "Rooms:Delete": sinon.stub(),
       "Rooms:GetAll": sinon.stub(),
       "Rooms:Open": sinon.stub(),
       "Rooms:Rename": sinon.stub(),
       "Rooms:PushSubscription": sinon.stub(),