Bug 1186362 - Drop Loop's use of jQuery from the desktop UI. r=mikedeboer
authorMark Banner <standard8@mozilla.com>
Wed, 22 Jul 2015 12:50:18 +0100
changeset 254112 09335355b962efc4202015f709812f2e27bc345d
parent 254111 d04749c1f834b247e972687a1dd50c99b5573a36
child 254113 4af77315bbc8fe8093bad28da0dca3e7e2ee0ab3
push id29089
push userryanvm@gmail.com
push dateWed, 22 Jul 2015 20:29:27 +0000
treeherdermozilla-central@7abecce35aca [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer
bugs1186362
milestone42.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 1186362 - Drop Loop's use of jQuery from the desktop UI. r=mikedeboer
browser/components/loop/content/conversation.html
browser/components/loop/content/js/client.js
browser/components/loop/content/panel.html
browser/components/loop/jar.mn
browser/components/loop/test/desktop-local/index.html
browser/components/loop/test/shared/index.html
browser/components/loop/test/shared/views_test.js
browser/components/loop/test/standalone/index.html
--- a/browser/components/loop/content/conversation.html
+++ b/browser/components/loop/content/conversation.html
@@ -16,17 +16,16 @@
     <div id="messages"></div>
 
     <div id="main"></div>
 
     <script type="text/javascript" src="loop/libs/l10n.js"></script>
     <script type="text/javascript" src="loop/js/otconfig.js"></script>
     <script type="text/javascript" src="loop/libs/sdk.js"></script>
     <script type="text/javascript" src="loop/shared/libs/react-0.12.2.js"></script>
-    <script type="text/javascript" src="loop/shared/libs/jquery-2.1.4.js"></script>
     <script type="text/javascript" src="loop/shared/libs/lodash-3.9.3.js"></script>
     <script type="text/javascript" src="loop/shared/libs/backbone-1.2.1.js"></script>
 
     <script type="text/javascript" src="loop/shared/js/utils.js"></script>
     <script type="text/javascript" src="loop/shared/js/mixins.js"></script>
     <script type="text/javascript" src="loop/shared/js/actions.js"></script>
     <script type="text/javascript" src="loop/shared/js/validate.js"></script>
     <script type="text/javascript" src="loop/shared/js/dispatcher.js"></script>
--- a/browser/components/loop/content/js/client.js
+++ b/browser/components/loop/content/js/client.js
@@ -1,14 +1,14 @@
 /* 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.Client = (function($) {
+loop.Client = (function() {
   "use strict";
 
   // THe expected properties to be returned from the POST /calls request.
   var expectedPostCallProperties = [
     "apiKey", "callId", "progressURL",
     "sessionId", "sessionToken", "websocketToken"
   ];
 
@@ -111,9 +111,9 @@ loop.Client = (function($) {
             cb(ex);
           }
         }.bind(this)
       );
     }
   };
 
   return Client;
-})(jQuery);
+})();
--- a/browser/components/loop/content/panel.html
+++ b/browser/components/loop/content/panel.html
@@ -11,17 +11,16 @@
     <link rel="stylesheet" type="text/css" href="loop/css/contacts.css">
   </head>
   <body class="panel">
 
     <div id="main"></div>
 
     <script type="text/javascript" src="loop/shared/libs/react-0.12.2.js"></script>
     <script type="text/javascript" src="loop/libs/l10n.js"></script>
-    <script type="text/javascript" src="loop/shared/libs/jquery-2.1.4.js"></script>
     <script type="text/javascript" src="loop/shared/libs/lodash-3.9.3.js"></script>
     <script type="text/javascript" src="loop/shared/libs/backbone-1.2.1.js"></script>
 
     <script type="text/javascript" src="loop/shared/js/utils.js"></script>
     <script type="text/javascript" src="loop/shared/js/models.js"></script>
     <script type="text/javascript" src="loop/shared/js/mixins.js"></script>
     <script type="text/javascript" src="loop/shared/js/views.js"></script>
     <script type="text/javascript" src="loop/shared/js/validate.js"></script>
--- a/browser/components/loop/jar.mn
+++ b/browser/components/loop/jar.mn
@@ -94,17 +94,16 @@ browser.jar:
 
   # Shared libs
 #ifdef DEBUG
   content/browser/loop/shared/libs/react-0.12.2.js    (content/shared/libs/react-0.12.2.js)
 #else
   content/browser/loop/shared/libs/react-0.12.2.js    (content/shared/libs/react-0.12.2-prod.js)
 #endif
   content/browser/loop/shared/libs/lodash-3.9.3.js    (content/shared/libs/lodash-3.9.3.js)
-  content/browser/loop/shared/libs/jquery-2.1.4.js    (content/shared/libs/jquery-2.1.4.js)
   content/browser/loop/shared/libs/backbone-1.2.1.js  (content/shared/libs/backbone-1.2.1.js)
 
   # Shared sounds
   content/browser/loop/shared/sounds/ringtone.ogg       (content/shared/sounds/ringtone.ogg)
   content/browser/loop/shared/sounds/connecting.ogg     (content/shared/sounds/connecting.ogg)
   content/browser/loop/shared/sounds/connected.ogg      (content/shared/sounds/connected.ogg)
   content/browser/loop/shared/sounds/terminated.ogg     (content/shared/sounds/terminated.ogg)
   content/browser/loop/shared/sounds/room-joined.ogg    (content/shared/sounds/room-joined.ogg)
--- a/browser/components/loop/test/desktop-local/index.html
+++ b/browser/components/loop/test/desktop-local/index.html
@@ -26,17 +26,16 @@
       caughtWarnings.push(args);
       consoleWarn.apply(console, args);
     };
   </script>
 
   <!-- libs -->
   <script src="../../content/libs/l10n.js"></script>
   <script src="../../content/shared/libs/react-0.12.2.js"></script>
-  <script src="../../content/shared/libs/jquery-2.1.4.js"></script>
   <script src="../../content/shared/libs/lodash-3.9.3.js"></script>
   <script src="../../content/shared/libs/backbone-1.2.1.js"></script>
 
   <!-- test dependencies -->
   <script src="../shared/vendor/mocha-2.2.5.js"></script>
   <script src="../shared/vendor/chai-3.0.0.js"></script>
   <script src="../shared/vendor/sinon-1.15.0.js"></script>
   <script>
@@ -96,13 +95,16 @@
 
     describe("Unexpected Warnings Check", function() {
       it("should long only the warnings we expect", function() {
         chai.expect(caughtWarnings.length).to.eql(27);
       });
     });
 
     mocha.run(function () {
-      $("#mocha").append("<p id='complete'>Complete.</p>");
+      var completeNode = document.createElement("p");
+      completeNode.setAttribute("id", "complete");
+      completeNode.appendChild(document.createTextNode("Complete"));
+      document.getElementById("mocha").appendChild(completeNode);
     });
   </script>
 </body>
 </html>
--- a/browser/components/loop/test/shared/index.html
+++ b/browser/components/loop/test/shared/index.html
@@ -25,17 +25,16 @@
       var args = Array.slice(arguments);
       caughtWarnings.push(args);
       consoleWarn.apply(console, args);
     };
   </script>
 
   <!-- libs -->
   <script src="../../content/shared/libs/react-0.12.2.js"></script>
-  <script src="../../content/shared/libs/jquery-2.1.4.js"></script>
   <script src="../../content/shared/libs/lodash-3.9.3.js"></script>
   <script src="../../content/shared/libs/backbone-1.2.1.js"></script>
   <script src="../../standalone/content/libs/l10n-gaia-02ca67948fe8.js"></script>
 
   <!-- test dependencies -->
   <script src="vendor/mocha-2.2.5.js"></script>
   <script src="vendor/chai-3.0.0.js"></script>
   <script src="vendor/chai-as-promised-5.1.0.js"></script>
@@ -90,13 +89,16 @@
 
     describe("Unexpected Warnings Check", function() {
       it("should long only the warnings we expect", function() {
         chai.expect(caughtWarnings.length).to.eql(0);
       });
     });
 
     mocha.run(function () {
-      $("#mocha").append("<p id='complete'>Complete.</p>");
+      var completeNode = document.createElement("p");
+      completeNode.setAttribute("id", "complete");
+      completeNode.appendChild(document.createTextNode("Complete"));
+      document.getElementById("mocha").appendChild(completeNode);
     });
   </script>
 </body>
 </html>
--- a/browser/components/loop/test/shared/views_test.js
+++ b/browser/components/loop/test/shared/views_test.js
@@ -45,17 +45,16 @@ describe("loop.shared.views", function()
       return OS;
     });
     sandbox.stub(loop.shared.utils, "getOSVersion", function() {
       return OSVersion;
     });
   });
 
   afterEach(function() {
-    $("#fixtures").empty();
     sandbox.restore();
   });
 
   describe("MediaControlButton", function() {
     it("should render an enabled local audio button", function() {
       var comp = TestUtils.renderIntoDocument(
         React.createElement(sharedViews.MediaControlButton, {
           scope: "local",
--- a/browser/components/loop/test/standalone/index.html
+++ b/browser/components/loop/test/standalone/index.html
@@ -85,13 +85,16 @@
 
     describe("Unexpected Warnings Check", function() {
       it("should long only the warnings we expect", function() {
         chai.expect(caughtWarnings.length).to.eql(11);
       });
     });
 
     mocha.run(function () {
-      $("#mocha").append("<p id='complete'>Complete.</p>");
+      var completeNode = document.createElement("p");
+      completeNode.setAttribute("id", "complete");
+      completeNode.appendChild(document.createTextNode("Complete"));
+      document.getElementById("mocha").appendChild(completeNode);
     });
 </script>
 </body>
 </html>