Bug 1069178 Drop some old references to serverUrl/baseServerUrl in Loop desktop code. r=mikedeboer
authorMark Banner <standard8@mozilla.com>
Thu, 18 Sep 2014 10:45:38 +0100
changeset 206046 9b4a0e65bfaabd7fd597a45b00bc410db73869aa
parent 206045 a78ec4ea3f52094492143e80fcbfe8538ca05f08
child 206047 80cf8eca9c81e96653dc206cbb70943209e1b467
push id49338
push userkwierso@gmail.com
push dateThu, 18 Sep 2014 23:10:09 +0000
treeherdermozilla-inbound@245051c6a7ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer
bugs1069178
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 1069178 Drop some old references to serverUrl/baseServerUrl in Loop desktop code. r=mikedeboer
browser/components/loop/content/js/panel.js
browser/components/loop/content/js/panel.jsx
browser/components/loop/test/desktop-local/conversation_test.js
browser/components/loop/test/desktop-local/panel_test.js
browser/components/loop/test/shared/models_test.js
--- a/browser/components/loop/content/js/panel.js
+++ b/browser/components/loop/content/js/panel.js
@@ -518,19 +518,17 @@ loop.panel = (function(_, mozL10n) {
   /**
    * Panel initialisation.
    */
   function init() {
     // Do the initial L10n setup, we do this before anything
     // else to ensure the L10n environment is setup correctly.
     mozL10n.initialize(navigator.mozLoop);
 
-    var client = new loop.Client({
-      baseServerUrl: navigator.mozLoop.serverUrl
-    });
+    var client = new loop.Client();
     var notifications = new sharedModels.NotificationCollection()
 
     React.renderComponent(PanelView({
       client: client, 
       notifications: notifications}), document.querySelector("#main"));
 
     document.body.classList.add(loop.shared.utils.getTargetPlatform());
     document.body.setAttribute("dir", mozL10n.getDirection());
--- a/browser/components/loop/content/js/panel.jsx
+++ b/browser/components/loop/content/js/panel.jsx
@@ -518,19 +518,17 @@ loop.panel = (function(_, mozL10n) {
   /**
    * Panel initialisation.
    */
   function init() {
     // Do the initial L10n setup, we do this before anything
     // else to ensure the L10n environment is setup correctly.
     mozL10n.initialize(navigator.mozLoop);
 
-    var client = new loop.Client({
-      baseServerUrl: navigator.mozLoop.serverUrl
-    });
+    var client = new loop.Client();
     var notifications = new sharedModels.NotificationCollection()
 
     React.renderComponent(<PanelView
       client={client}
       notifications={notifications} />, document.querySelector("#main"));
 
     document.body.classList.add(loop.shared.utils.getTargetPlatform());
     document.body.setAttribute("dir", mozL10n.getDirection());
--- a/browser/components/loop/test/desktop-local/conversation_test.js
+++ b/browser/components/loop/test/desktop-local/conversation_test.js
@@ -15,19 +15,16 @@ describe("loop.conversation", function()
 
   beforeEach(function() {
     sandbox = sinon.sandbox.create();
     sandbox.useFakeTimers();
     notifications = new loop.shared.models.NotificationCollection();
 
     navigator.mozLoop = {
       doNotDisturb: true,
-      get serverUrl() {
-        return "http://example.com";
-      },
       getStrings: function() {
         return JSON.stringify({textContent: "fakeText"});
       },
       get locale() {
         return "en-US";
       },
       setLoopCharPref: sandbox.stub(),
       getLoopCharPref: sandbox.stub(),
--- a/browser/components/loop/test/desktop-local/panel_test.js
+++ b/browser/components/loop/test/desktop-local/panel_test.js
@@ -27,19 +27,16 @@ describe("loop.panel", function() {
     // https://github.com/cjohansen/Sinon.JS/issues/393
     fakeXHR.xhr.onCreate = function (xhr) {
       requests.push(xhr);
     };
     notifications = new loop.shared.models.NotificationCollection();
 
     navigator.mozLoop = {
       doNotDisturb: true,
-      get serverUrl() {
-        return "http://example.com";
-      },
       getStrings: function() {
         return JSON.stringify({textContent: "fakeText"});
       },
       get locale() {
         return "en-US";
       },
       setLoopCharPref: sandbox.stub(),
       getLoopCharPref: sandbox.stub().returns("unseen"),
--- a/browser/components/loop/test/shared/models_test.js
+++ b/browser/components/loop/test/shared/models_test.js
@@ -51,31 +51,23 @@ describe("loop.shared.models", function(
       it("should require a sdk option", function() {
         expect(function() {
           new sharedModels.ConversationModel({}, {});
         }).to.Throw(Error, /missing required sdk/);
       });
     });
 
     describe("constructed", function() {
-      var conversation, fakeClient, fakeBaseServerUrl,
-          requestCallInfoStub, requestCallsInfoStub;
+      var conversation;
 
       beforeEach(function() {
         conversation = new sharedModels.ConversationModel({}, {
           sdk: fakeSDK
         });
         conversation.set("loopToken", "fakeToken");
-        fakeBaseServerUrl = "http://fakeBaseServerUrl";
-        fakeClient = {
-          requestCallInfo: sandbox.stub(),
-          requestCallsInfo: sandbox.stub()
-        };
-        requestCallInfoStub = fakeClient.requestCallInfo;
-        requestCallsInfoStub = fakeClient.requestCallsInfo;
       });
 
       describe("#incoming", function() {
         it("should trigger a `call:incoming` event", function(done) {
           conversation.once("call:incoming", function() {
             done();
           });