зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1330058 - re-enable eslint for toolkit/components/windowcreator|windowwatcher, r=mossop
This commit is contained in:
Родитель
03695f6984
Коммит
c1307c4da8
|
@ -197,8 +197,6 @@ toolkit/modules/tests/xpcshell/test_task.js
|
|||
|
||||
# Not yet updated
|
||||
toolkit/components/osfile/**
|
||||
toolkit/components/windowcreator/**
|
||||
toolkit/components/windowwatcher/**
|
||||
|
||||
# External code:
|
||||
toolkit/components/microformats/test/**
|
||||
|
|
|
@ -16,7 +16,7 @@ function one_test(delay, continuation) {
|
|||
.QueryInterface(Ci.nsIWebBrowserPersistable);
|
||||
persistable.startPersistence(/* outer window ID: */ 0, {
|
||||
onDocumentReady,
|
||||
onError: function(status) {
|
||||
onError(status) {
|
||||
ok(false, new Components.Exception("startPersistence failed", status));
|
||||
continuation();
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ function one_test(delay, continuation) {
|
|||
});
|
||||
|
||||
function onDocumentReady(doc) {
|
||||
const nameStem="test_bug1204626_" + Date.now();
|
||||
const nameStem = "test_bug1204626_" + Date.now();
|
||||
let wbp = Cc["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]
|
||||
.createInstance(Ci.nsIWebBrowserPersist);
|
||||
let tmp = Cc["@mozilla.org/file/directory_service;1"]
|
||||
|
@ -45,11 +45,11 @@ function one_test(delay, continuation) {
|
|||
});
|
||||
|
||||
wbp.progressListener = {
|
||||
onProgressChange: function(){},
|
||||
onLocationChange: function(){},
|
||||
onStatusChange: function(){},
|
||||
onSecurityChange: function(){},
|
||||
onStateChange: function wbp_stateChange(_wbp, _req, state, _status) {
|
||||
onProgressChange() {},
|
||||
onLocationChange() {},
|
||||
onStatusChange() {},
|
||||
onSecurityChange() {},
|
||||
onStateChange(_wbp, _req, state, _status) {
|
||||
if ((state & Ci.nsIWebProgressListener.STATE_STOP) == 0) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -27,10 +27,10 @@ var textareas = ["a-textbox", "a-prefilled-textbox"];
|
|||
var textboxes = ["a-text", "a-prefilled-text"];
|
||||
|
||||
function fillform(doc) {
|
||||
for (var i in textareas) {
|
||||
for (let i in textareas) {
|
||||
doc.getElementById(textareas[i]).textContent += "form state";
|
||||
}
|
||||
for (var i in textboxes) {
|
||||
for (let i in textboxes) {
|
||||
doc.getElementById(textboxes[i]).value += "form state";
|
||||
}
|
||||
doc.getElementById('a-checkbox').checked = true;
|
||||
|
@ -39,15 +39,15 @@ function fillform(doc) {
|
|||
}
|
||||
|
||||
function checkform(doc) {
|
||||
for (var i in textareas) {
|
||||
for (let i in textareas) {
|
||||
var textContent = doc.getElementById(textareas[i]).textContent;
|
||||
ok(/form\s+state/m.test(textContent),
|
||||
"Modified textarea "+textareas[i]+" form state not preserved!");
|
||||
"Modified textarea " + textareas[i] + " form state not preserved!");
|
||||
}
|
||||
for (var i in textboxes) {
|
||||
for (let i in textboxes) {
|
||||
var value = doc.getElementById(textboxes[i]).value;
|
||||
ok(/form\s+state/m.test(value),
|
||||
"Modified textbox "+textboxes[i]+" form state not preserved!");
|
||||
"Modified textbox " + textboxes[i] + " form state not preserved!");
|
||||
}
|
||||
ok(doc.getElementById('a-checkbox').checked,
|
||||
"Modified checkbox checked state not preserved!");
|
||||
|
@ -70,7 +70,7 @@ function getFileContents(aFile) {
|
|||
const PR_RDONLY = 0x01;
|
||||
var fileStream = Cc["@mozilla.org/network/file-input-stream;1"]
|
||||
.createInstance(Ci.nsIFileInputStream);
|
||||
fileStream.init(aFile, PR_RDONLY, 0400,
|
||||
fileStream.init(aFile, PR_RDONLY, 0o400,
|
||||
Ci.nsIFileInputStream.DELETE_ON_CLOSE
|
||||
| Ci.nsIFileInputStream.CLOSE_ON_EOF);
|
||||
var inputStream = Cc["@mozilla.org/scriptableinputstream;1"]
|
||||
|
@ -80,7 +80,7 @@ function getFileContents(aFile) {
|
|||
do {
|
||||
var str = inputStream.read(inputStream.available());
|
||||
data += str;
|
||||
} while(str.length > 0);
|
||||
} while (str.length > 0);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
|
@ -34,10 +34,10 @@ function getTempDir() {
|
|||
const STATE_STOP = 0x00000010;
|
||||
|
||||
var progressListener = {
|
||||
onProgressChange: function() {
|
||||
onProgressChange() {
|
||||
/* Ignore progress callback */
|
||||
},
|
||||
onStateChange: function(aProgress, aRequest, aStateFlag, aStatus) {
|
||||
onStateChange(aProgress, aRequest, aStateFlag, aStatus) {
|
||||
if (aStateFlag & STATE_STOP) {
|
||||
var dirExists = false;
|
||||
var videoExists = false;
|
||||
|
@ -52,7 +52,7 @@ var progressListener = {
|
|||
ok(dirExists, 'Directory containing video file should be created');
|
||||
ok(videoExists, 'Video should be persisted with document');
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=499115
|
|||
/** Test for Bug 499115 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
const SEARCH_TEXT="minefield";
|
||||
const SEARCH_TEXT = "minefield";
|
||||
|
||||
function getMatches() {
|
||||
var numMatches = 0;
|
||||
|
|
|
@ -39,11 +39,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=450048
|
|||
|
||||
ok(false, "Missing NS_ERROR_NULL_POINTER exception");
|
||||
} catch (e) {
|
||||
e = SpecialPowers.wrap(e);
|
||||
if (e.result == SpecialPowers.Cr.NS_ERROR_NULL_POINTER) {
|
||||
let wrappedError = SpecialPowers.wrap(e);
|
||||
if (wrappedError.result == SpecialPowers.Cr.NS_ERROR_NULL_POINTER) {
|
||||
ok(true, null);
|
||||
} else {
|
||||
throw e;
|
||||
throw wrappedError;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,11 +53,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=450048
|
|||
|
||||
ok(false, "Missing NS_ERROR_ILLEGAL_VALUE exception");
|
||||
} catch (e) {
|
||||
e = SpecialPowers.wrap(e);
|
||||
if (e.result == SpecialPowers.Cr.NS_ERROR_ILLEGAL_VALUE) {
|
||||
let wrappedError = SpecialPowers.wrap(e);
|
||||
if (wrappedError.result == SpecialPowers.Cr.NS_ERROR_ILLEGAL_VALUE) {
|
||||
ok(true, null);
|
||||
} else {
|
||||
throw e;
|
||||
throw wrappedError;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,11 +67,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=450048
|
|||
|
||||
ok(false, "Missing NS_ERROR_ILLEGAL_VALUE exception");
|
||||
} catch (e) {
|
||||
e = SpecialPowers.wrap(e);
|
||||
if (e.result == SpecialPowers.Cr.NS_ERROR_ILLEGAL_VALUE) {
|
||||
let wrappedError = SpecialPowers.wrap(e);
|
||||
if (wrappedError.result == SpecialPowers.Cr.NS_ERROR_ILLEGAL_VALUE) {
|
||||
ok(true, null);
|
||||
} else {
|
||||
throw e;
|
||||
throw wrappedError;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,11 +81,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=450048
|
|||
|
||||
ok(false, "Missing NS_ERROR_ILLEGAL_VALUE exception");
|
||||
} catch (e) {
|
||||
e = SpecialPowers.wrap(e);
|
||||
if (e.result == SpecialPowers.Cr.NS_ERROR_ILLEGAL_VALUE) {
|
||||
let wrappedError = SpecialPowers.wrap(e);
|
||||
if (wrappedError.result == SpecialPowers.Cr.NS_ERROR_ILLEGAL_VALUE) {
|
||||
ok(true, null);
|
||||
} else {
|
||||
throw e;
|
||||
throw wrappedError;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ SimpleTest.waitForExplicitFinish();
|
|||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.setFullZoom(window, 2);
|
||||
|
||||
var p = window;
|
||||
var w = window.open("about:blank", "", "width=200,height=100");
|
||||
SimpleTest.waitForFocus(function() {
|
||||
ok(w.innerWidth <= 402 && w.innerWidth >= 398,
|
||||
|
|
|
@ -243,7 +243,7 @@ add_task(function* test_new_remote_window_flags() {
|
|||
return docShell.getInterface(Ci.nsITabChild)
|
||||
.QueryInterface(Ci.nsIWebBrowserChrome)
|
||||
.chromeFlags;
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
// This must be a non-remote browser...
|
||||
return docShell.QueryInterface(Ci.nsIDocShellTreeItem)
|
||||
.treeOwner
|
||||
|
|
|
@ -31,4 +31,4 @@ add_task(function* test_chrome_opens_window() {
|
|||
});
|
||||
|
||||
yield BrowserTestUtils.closeWindow(win);
|
||||
});
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче