Bug 1311343 - Enable eslint of browser/components/feeds/; r=standard8

MozReview-Commit-ID: 6c4nzNeeurk

--HG--
extra : rebase_source : 1f0c1ef423594c6d780c56ab95e0b8f4dd0de47e
This commit is contained in:
jordan9769 2016-10-27 12:02:52 +05:30
parent a08afb2c12
commit 5f63c00b0b
7 changed files with 11 additions and 12 deletions

View File

@ -65,7 +65,6 @@ browser/base/content/test/general/file_csp_block_all_mixedcontent.html
browser/base/content/test/urlbar/file_blank_but_not_blank.html
browser/base/content/newtab/**
browser/components/downloads/**
browser/components/feeds/**
browser/components/privatebrowsing/**
browser/components/sessionstore/**
browser/components/tabview/**

View File

@ -1,4 +1,4 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* 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/. */
@ -227,7 +227,7 @@ FeedConverter.prototype = {
let feedReader = safeGetCharPref(getPrefActionForType(feedType), "bookmarks");
feedService.addToClientReader(result.uri.spec, title, desc, feed.type, feedReader);
return;
} catch(ex) { /* fallback to preview mode */ }
} catch (ex) { /* fallback to preview mode */ }
}
}
}

View File

@ -611,7 +611,7 @@ FeedWriter.prototype = {
if (Services.prefs.getCharPref(getPrefActionForType(feedType)) != "ask")
alwaysUse = true;
}
catch(ex) { }
catch (ex) { }
this._setCheckboxCheckedState(checkbox, alwaysUse);
}
},
@ -949,7 +949,7 @@ FeedWriter.prototype = {
},
receiveMessage(msg) {
switch(msg.name) {
switch (msg.name) {
case "FeedWriter:SetApplicationLauncherMenuItem":
let menuItem = null;

View File

@ -920,7 +920,7 @@ WebContentConverterRegistrarContent.prototype = {
let branch = ps.getBranch(PREF_CONTENTHANDLERS_BRANCH + num + ".");
try {
this._registerContentHandlerHavingBranch(branch);
} catch(ex) {
} catch (ex) {
// do nothing, the next branch might have values
}
}

View File

@ -8,7 +8,7 @@ var SubscribeHandler = {
* The nsIFeedWriter object that produces the UI
*/
_feedWriter: null,
init: function SH_init() {
this._feedWriter = new BrowserFeedWriter();
},

View File

@ -86,7 +86,7 @@ function checkNode(node, schema) {
var tag = schema.shift();
is(node.localName, tag, "Element should have expected tag");
while (schema.length) {
var val = schema.shift();
let val = schema.shift();
if (Array.isArray(val))
var childSchema = val;
else
@ -98,7 +98,7 @@ function checkNode(node, schema) {
};
for (var name in attrSchema) {
var [ns, nsName] = name.split(":");
var val = nsName ? node.getAttributeNS(nsTable[ns], nsName) :
let val = nsName ? node.getAttributeNS(nsTable[ns], nsName) :
node.getAttribute(name);
is(val, attrSchema[name], "Attribute " + name + " should match");
}

View File

@ -28,7 +28,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=402788
else
navigator.registerContentHandler(aTxt, aUri, aTitle);
}
catch(e) {
catch (e) {
return false;
}
@ -61,10 +61,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=402788
// ftp should not work
is(testRegisterHandler(true, "foo", "ftp://mochi.test:8888/%s", "Foo handler"), false, "registering a foo protocol handler with ftp scheme should not work");
is(testRegisterHandler(false, "application/rss+xml", "ftp://mochi.test:8888/%s", "Foo handler"), false, "registering a foo content handler with ftp scheme should not work");
// chrome should not work
// chrome should not work
is(testRegisterHandler(true, "foo", "chrome://mochi.test:8888/%s", "Foo handler"), false, "registering a foo protocol handler with chrome scheme should not work");
is(testRegisterHandler(false, "application/rss+xml", "chrome://mochi.test:8888/%s", "Foo handler"), false, "registering a foo content handler with chrome scheme should not work");
// foo should not work
// foo should not work
is(testRegisterHandler(true, "foo", "foo://mochi.test:8888/%s", "Foo handler"), false, "registering a foo protocol handler with foo scheme should not work");
is(testRegisterHandler(false, "application/rss+xml", "foo://mochi.test:8888/%s", "Foo handler"), false, "registering a foo content handler with foo scheme should not work");