зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1346671 - Enable the no-useless-concat eslint rule in toolkit/ r=jaws
MozReview-Commit-ID: 1a422BiLEhK --HG-- extra : rebase_source : a83b8d753e2a48593904ef0755d5517908588b93
This commit is contained in:
Родитель
5389303fdc
Коммит
5e6b22bdde
|
@ -72,7 +72,7 @@ add_task(function* () {
|
|||
// Hack the planet! Load our blocklist shim, so we can mess with blocklist
|
||||
// return results in the content process. Active until we close our tab.
|
||||
let mm = gTestBrowser.messageManager;
|
||||
info("test 3a: loading " + gChromeRoot + "blocklist_proxy.js" + "\n");
|
||||
info("test 3a: loading " + gChromeRoot + "blocklist_proxy.js\n");
|
||||
mm.loadFrameScript(gChromeRoot + "blocklist_proxy.js", true);
|
||||
|
||||
yield promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
|
||||
|
|
|
@ -42,7 +42,7 @@ function waitForPageLoad(aTab) {
|
|||
function onTabLoad(event) {
|
||||
clearTimeout(timeoutId);
|
||||
aTab.linkedBrowser.removeEventListener("load", onTabLoad, true);
|
||||
info("Tab event received: " + "load");
|
||||
info("Tab event received: load");
|
||||
deferred.resolve();
|
||||
}
|
||||
aTab.linkedBrowser.addEventListener("load", onTabLoad, true, true);
|
||||
|
|
|
@ -432,7 +432,7 @@ ESEDB.prototype = {
|
|||
// Deal with null values:
|
||||
buffer = null;
|
||||
} else {
|
||||
Cu.reportError("Unexpected JET error: " + err + ";" + " retrieving value for column " + column.name);
|
||||
Cu.reportError("Unexpected JET error: " + err + "; retrieving value for column " + column.name);
|
||||
throw new Error(convertESEError(err));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ add_task(function* test() {
|
|||
} else {
|
||||
page_with_title = test_title + " - " + app_name;
|
||||
page_without_title = app_name;
|
||||
about_pb_title = "Open a private window?" + " - " + app_name;
|
||||
about_pb_title = "Open a private window? - " + app_name;
|
||||
pb_page_with_title = test_title + " - " + app_name + " (Private Browsing)";
|
||||
pb_page_without_title = app_name + " (Private Browsing)";
|
||||
pb_about_pb_title = "Private Browsing - " + app_name + " (Private Browsing)";
|
||||
|
|
|
@ -72,7 +72,7 @@ add_task(function* test() {
|
|||
|
||||
yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" },
|
||||
function* (newTabBrowser) {
|
||||
yield waitForPdfJS(newTabBrowser, TESTROOT + "file_pdfjs_test.pdf" + "#zoom=100");
|
||||
yield waitForPdfJS(newTabBrowser, TESTROOT + "file_pdfjs_test.pdf#zoom=100");
|
||||
|
||||
yield ContentTask.spawn(newTabBrowser, TESTS, function* (contentTESTS) {
|
||||
let document = content.document;
|
||||
|
|
|
@ -161,7 +161,7 @@ function isSecurityState(expectedState, message, test) {
|
|||
gotState = "EV";
|
||||
}
|
||||
|
||||
test(gotState == expectedState, (message || "") + ", " + "expected " + expectedState + " got " + gotState);
|
||||
test(gotState == expectedState, (message || "") + ", expected " + expectedState + " got " + gotState);
|
||||
|
||||
switch (expectedState) {
|
||||
case "insecure":
|
||||
|
|
|
@ -241,6 +241,10 @@ module.exports = {
|
|||
|
||||
// Only check typeof against valid results
|
||||
"valid-typeof": "error",
|
||||
|
||||
// Don't concatenate string literals together (unless they span multiple
|
||||
// lines)
|
||||
"no-useless-concat": "error",
|
||||
},
|
||||
"env": {
|
||||
"es6": true,
|
||||
|
|
|
@ -54,7 +54,7 @@ add_task(function* test_same_date_diff_hash() {
|
|||
let {count} = yield BookmarkJSONUtils.exportToFile(tempPath);
|
||||
let dateObj = new Date();
|
||||
let filename = "bookmarks-" + PlacesBackups.toISODateString(dateObj) + "_" +
|
||||
count + "_" + "differentHash==" + ".json";
|
||||
count + "_differentHash==.json";
|
||||
let backupFile = OS.Path.join(backupFolder, filename);
|
||||
yield OS.File.move(tempPath, backupFile);
|
||||
yield PlacesBackups.create(); // Force compressed backup
|
||||
|
|
|
@ -36,7 +36,7 @@ add_task(function* () {
|
|||
index: 1,
|
||||
id: 4,
|
||||
charset: "UTF-8",
|
||||
tags: "tag1," + "a" + "0123456789".repeat(10), // 101 chars
|
||||
tags: "tag1,a" + "0123456789".repeat(10), // 101 chars
|
||||
type: "text/x-moz-place",
|
||||
dateAdded: now,
|
||||
lastModified: now,
|
||||
|
|
|
@ -1327,7 +1327,7 @@ add_task(function* test_preventive_maintenance() {
|
|||
do_check_true(defaultBookmarksMaxId > 0);
|
||||
|
||||
for (let test of tests) {
|
||||
dump("\nExecuting test: " + test.name + "\n" + "*** " + test.desc + "\n");
|
||||
dump("\nExecuting test: " + test.name + "\n*** " + test.desc + "\n");
|
||||
yield test.setup();
|
||||
|
||||
let promiseMaintenanceFinished =
|
||||
|
|
|
@ -19,7 +19,7 @@ function check(aBrowser, aElementName, aBarred, aType) {
|
|||
"No tooltip should be shown when the element is barred from constraint validation");
|
||||
} else {
|
||||
ok(tttp.getNodeText(e, {}, {}),
|
||||
e.tagName + " " + "A tooltip should be shown when the element isn't valid");
|
||||
e.tagName + " A tooltip should be shown when the element isn't valid");
|
||||
}
|
||||
|
||||
e.setAttribute("title", "");
|
||||
|
|
|
@ -56,6 +56,8 @@ function loadevent(event) {
|
|||
var win;
|
||||
function startTest() {
|
||||
var videoURL = new URL("seek_with_sound.ogg", document.documentURI).href;
|
||||
|
||||
// eslint-disable-next-line no-useless-concat
|
||||
var url = "data:text/html,<video src=" + videoURL + " controls autoplay=true></video><script>window.testExpando = true;</scr" + "ipt>";
|
||||
|
||||
win = window.open(url);
|
||||
|
|
|
@ -151,7 +151,7 @@ function stringify(aThing, aAllowNewLines) {
|
|||
json = JSON.stringify(aThing);
|
||||
} catch (ex) {
|
||||
// Can't use a real ellipsis here, because cmd.exe isn't unicode-enabled
|
||||
json = "{" + Object.keys(aThing).join(":..,") + ":.., " + "}";
|
||||
json = "{" + Object.keys(aThing).join(":..,") + ":.., }";
|
||||
}
|
||||
return type + json;
|
||||
}
|
||||
|
|
|
@ -305,7 +305,7 @@ function check_results(aActualAddons, aExpectedAddons, aAddonCount, aInstallNull
|
|||
if (aActualAddon.name == "FAIL")
|
||||
do_throw(aActualAddon.id + " - " + aActualAddon.description);
|
||||
if (aActualAddon.name != "PASS")
|
||||
do_throw(aActualAddon.id + " - " + "invalid add-on name " + aActualAddon.name);
|
||||
do_throw(aActualAddon.id + " - invalid add-on name " + aActualAddon.name);
|
||||
|
||||
do_check_eq(aActualAddon.install == null, !!aInstallNull || !aActualAddon.sourceURI);
|
||||
|
||||
|
|
|
@ -3996,7 +3996,8 @@ Downloader.prototype = {
|
|||
maxFail = Math.min(maxFail, 20);
|
||||
LOG("Downloader:onStopRequest - status: " + status + ", " +
|
||||
"current fail: " + this.updateService._consecutiveSocketErrors + ", " +
|
||||
"max fail: " + maxFail + ", " + "retryTimeout: " + retryTimeout);
|
||||
"max fail: " + maxFail + ", " +
|
||||
"retryTimeout: " + retryTimeout);
|
||||
if (Components.isSuccessCode(status)) {
|
||||
if (this._verifyDownload()) {
|
||||
if (shouldUseService()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче