Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN

MozReview-Commit-ID: 8WoGr8i6oCR
This commit is contained in:
Jared Wein
2016-12-29 15:20:47 -05:00
parent f64a7da705
commit 34e228f767
824 changed files with 7774 additions and 7790 deletions

View File

@@ -153,7 +153,7 @@ var listener = {
"gfxSanity:ContentLoaded",
],
scheduleTest: function(win) {
scheduleTest(win) {
this.win = win;
this.win.onload = this.onWindowLoaded.bind(this);
this.utils = this.win.QueryInterface(Ci.nsIInterfaceRequestor)
@@ -166,7 +166,7 @@ var listener = {
});
},
runSanityTest: function() {
runSanityTest() {
this.canvas = this.win.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
this.canvas.setAttribute("width", PAGE_WIDTH);
this.canvas.setAttribute("height", PAGE_HEIGHT);
@@ -187,7 +187,7 @@ var listener = {
}
},
onWindowLoaded: function() {
onWindowLoaded() {
let browser = this.win.document.createElementNS(XUL_NS, "browser");
browser.setAttribute("type", "content");
@@ -208,7 +208,7 @@ var listener = {
this.mm.loadFrameScript(FRAME_SCRIPT_URL, false);
},
endTest: function() {
endTest() {
if (!this.win) {
return;
}
@@ -240,7 +240,7 @@ SanityTest.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
shouldRunTest: function() {
shouldRunTest() {
// Only test gfx features if firefox has updated, or if the user has a new
// gpu or drivers.
var buildId = Services.appinfo.platformBuildID;
@@ -286,7 +286,7 @@ SanityTest.prototype = {
return true;
},
observe: function(subject, topic, data) {
observe(subject, topic, data) {
if (topic != "profile-after-change") return;
// profile-after-change fires only at startup, so we won't need

View File

@@ -3,7 +3,7 @@ var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const gfxFrameScript = {
domUtils: null,
init: function() {
init() {
let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebProgress);
@@ -18,7 +18,7 @@ const gfxFrameScript = {
},
handleEvent: function(aEvent) {
handleEvent(aEvent) {
switch (aEvent.type) {
case "MozAfterPaint":
sendAsyncMessage('gfxSanity:ContentLoaded');
@@ -27,7 +27,7 @@ const gfxFrameScript = {
}
},
isSanityTest: function(aUri) {
isSanityTest(aUri) {
if (!aUri) {
return false;
}
@@ -35,7 +35,7 @@ const gfxFrameScript = {
return aUri.endsWith("/sanitytest.html");
},
onStateChange: function(webProgress, req, flags, status) {
onStateChange(webProgress, req, flags, status) {
if (webProgress.isTopLevel &&
(flags & Ci.nsIWebProgressListener.STATE_STOP) &&
this.isSanityTest(req.name)) {