bug 1523104: remote: fix lint problems related to new browser-chrome tests; r=ochameau
authorAndreas Tolfsen <ato@sny.no>
Sun, 17 Feb 2019 15:29:12 +0000
changeset 521089 705a560085d4
parent 521088 275ad4598e75
child 521090 6ee3f621e6b8
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 problems related to new browser-chrome tests; r=ochameau
remote/test/browser/.eslintrc.js
remote/test/browser/browser_cdp.js
new file mode 100644
--- /dev/null
+++ b/remote/test/browser/.eslintrc.js
@@ -0,0 +1,9 @@
+/* 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/. */
+
+"use strict";
+
+module.exports = {
+  "extends": ["plugin:mozilla/browser-test"],
+};
--- a/remote/test/browser/browser_cdp.js
+++ b/remote/test/browser/browser_cdp.js
@@ -1,13 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
+/* global getCDP */
+
 // Test very basic CDP features.
 
 const TEST_URI = "data:text/html;charset=utf-8,default-test-page";
 
 add_task(async function() {
   // Open a test page, to prevent debugging the random default page
   const tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_URI);
 
@@ -21,32 +23,32 @@ add_task(async function() {
 
   // Connect to the server
   const client = await CDP({
     target(list) {
       // Ensure debugging the right target, i.e. the one for our test tab.
       return list.find(target => {
         return target.url == TEST_URI;
       });
-    }
+    },
   });
   ok(true, "CDP client has been instantiated");
 
   const {Log, Network, Page} = client;
   ok("Log" in client, "Log domain is available");
   ok("Network" in client, "Network domain is available");
   ok("Page" in client, "Page domain is available");
 
   // receive console.log messages and print them
   Log.enable();
   ok(true, "Log domain has been enabled");
 
   Log.entryAdded(({entry}) => {
     const {timestamp, level, text, args} = entry;
-    const msg = text || args.join(" ");
+    const msg = text || args.join(" ");
     console.log(`${new Date(timestamp)}\t${level.toUpperCase()}\t${msg}`);
   });
 
   // turn on network stack logging
   Network.requestWillBeSent((params) => {
     console.log(params.request.url);
   });