Bug 1403961, part 2 - Fix and enable eslint for ipc/. r=billm

After the previous patch, all that is needed to pass eslint is some
whitespace fixes I generated using:
  ./mach eslint --fix ipc

The .eslintrc.js file makes eslint expect XPCShell global variables.

With those two changes, eslint can be enabled for the ipc/ directory.

MozReview-Commit-ID: BqSICp2iV6O

--HG--
extra : rebase_source : ccab8be9fc1ae1116ae55631d3978c39d35cad05
This commit is contained in:
Andrew McCreight 2017-09-29 09:46:32 -07:00
parent 5bee3fc312
commit 256f12363f
4 changed files with 13 additions and 7 deletions

View file

@ -18,7 +18,6 @@ extensions/universalchardet/**
gfx/** gfx/**
image/** image/**
intl/** intl/**
ipc/**
layout/** layout/**
media/** media/**
memory/** memory/**

View file

@ -0,0 +1,7 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/xpcshell-test"
]
};

View file

@ -18,14 +18,14 @@ function run_test() {
sendCommand("runtime.processType;", callback); sendCommand("runtime.processType;", callback);
[ [ "C", "D" ], [ "D", "C" ], [ "\u010C", "D" ], [ "D", "\u010C" ] ].forEach( [ [ "C", "D" ], [ "D", "C" ], [ "\u010C", "D" ], [ "D", "\u010C" ] ].forEach(
function (pair) { function(pair) {
do_test_pending(); do_test_pending();
var cmp = pair[0].localeCompare(pair[1]); var cmp = pair[0].localeCompare(pair[1]);
sendCommand( sendCommand(
"'"+ pair[0] +"'.localeCompare('"+ pair[1] +"');", "'" + pair[0] + "'.localeCompare('" + pair[1] + "');",
function (result) { function(result) {
do_check_eq(cmp, result); do_check_eq(cmp, result);
do_test_finished(); do_test_finished();
}); });
}) })
} }

View file

@ -1,5 +1,5 @@
var Cc = Components.classes; var Cc = Components.classes;
var Ci = Components.interfaces; var Ci = Components.interfaces;
const runtime = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime); const runtime = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime);