bug 1523104: remote: fix lint errors by removing unused variables; r=ochameau
authorAndreas Tolfsen <ato@sny.no>
Thu, 21 Feb 2019 13:04:41 +0000
changeset 521101 2f7767b51e69
parent 521100 59da827edf02
child 521102 b35c2a9a00d2
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1523104
milestone67.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 1523104: remote: fix lint errors by removing unused variables; r=ochameau
remote/test/browser/head.js
--- a/remote/test/browser/head.js
+++ b/remote/test/browser/head.js
@@ -6,27 +6,24 @@
 const CRI_URI = "http://example.com/browser/remote/test/browser/chrome-remote-interface.js";
 
 /**
  * Create a test document in an invisible window.
  * This window will be automatically closed on test teardown.
  */
 function createTestDocument() {
   const browser = Services.appShell.createWindowlessBrowser(true);
-  const webNavigation = browser.docShell
-                               .QueryInterface(Ci.nsIWebNavigation);
+  const webNavigation = browser.docShell.QueryInterface(Ci.nsIWebNavigation);
   // Create a system principal content viewer to ensure there is a valid
   // empty document using system principal and avoid any wrapper issues
   // when using document's JS Objects.
   const system = Services.scriptSecurityManager.getSystemPrincipal();
   webNavigation.createAboutBlankContentViewer(system);
 
-  registerCleanupFunction(() => {
-    browser.close();
-  });
+  registerCleanupFunction(() => browser.close());
   return webNavigation.document;
 }
 
 /**
  * Retrieve an intance of CDP object from chrome-remote-interface library
  */
 async function getCDP() {
   // Instantiate a background test document in order to load the library
@@ -42,31 +39,27 @@ async function getCDP() {
   });
 
   const window = document.defaultView.wrappedJSObject;
 
   // Implements `criRequest` to be called by chrome-remeote-interface
   // library in order to do the cross-domain http request, which,
   // in a regular Web page, is impossible.
   window.criRequest = (options, callback) => {
-    const { host, port, secure, ustHostName, path } = options;
+    const {host, port, path} = options;
     const url = `http://${host}:${port}${path}`;
     const xhr = new XMLHttpRequest();
     xhr.open("GET", url, true);
 
     // Prevent "XML Parsing Error: syntax error" error messages
     xhr.overrideMimeType("text/plain");
 
     xhr.send(null);
-    xhr.onload = () => {
-      callback(null, xhr.responseText);
-    };
-    xhr.onerror = (e) => {
-      callback(e, null);
-    };
+    xhr.onload = () => callback(null, xhr.responseText);
+    xhr.onerror = e => callback(e, null);
   };
 
   return window.CDP;
 }
 
 function getTargets(CDP) {
   return new Promise((resolve, reject) => {
     CDP.List(null, (err, targets) => {