зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1797115 - [bidi] Rename log entry level warning to warn r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D161586
This commit is contained in:
Родитель
6b60c1d24f
Коммит
8d6c7589a8
|
@ -36,7 +36,7 @@ XPCOMUtils.defineLazyGetter(lazy, "ConsoleAPIStorage", () => {
|
|||
* The ConsoleAPIListener emits "message" events, with the following object as
|
||||
* payload:
|
||||
* - {Array<Object>} arguments - Arguments as passed-in when the method was called.
|
||||
* - {String} level - Importance, one of `info`, `warning`, `error`, `debug`, `trace`.
|
||||
* - {String} level - Importance, one of `info`, `warn`, `error`, `debug`, `trace`.
|
||||
* - {Array<Object>} stacktrace - List of stack frames, starting from most recent.
|
||||
* - {Number} timeStamp - Timestamp when the method was called.
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,7 @@ XPCOMUtils.defineLazyGetter(lazy, "logger", () => lazy.Log.get());
|
|||
* The ConsoleListener can be used to listen for console messages related to
|
||||
* Javascript errors, certain warnings which all happen within a specific
|
||||
* windowGlobal. Consumers can listen for the message types "error",
|
||||
* "warning" and "info".
|
||||
* "warn" and "info".
|
||||
*
|
||||
* Example:
|
||||
* ```
|
||||
|
@ -36,9 +36,9 @@ XPCOMUtils.defineLazyGetter(lazy, "logger", () => lazy.Log.get());
|
|||
* ```
|
||||
*
|
||||
* @emits message
|
||||
* The ConsoleListener emits "error", "warning" and "info" events, with the
|
||||
* The ConsoleListener emits "error", "warn" and "info" events, with the
|
||||
* following object as payload:
|
||||
* - {String} level - Importance, one of `info`, `warning`, `error`,
|
||||
* - {String} level - Importance, one of `info`, `warn`, `error`,
|
||||
* `debug`, `trace`.
|
||||
* - {String} message - Actual message from the console entry.
|
||||
* - {Array<StackFrame>} stacktrace - List of stack frames,
|
||||
|
@ -129,7 +129,7 @@ export class ConsoleListener {
|
|||
let level;
|
||||
|
||||
if ((message.flags & warningFlag) == warningFlag) {
|
||||
level = "warning";
|
||||
level = "warn";
|
||||
} else if ((message.flags & infoFlag) == infoFlag) {
|
||||
level = "info";
|
||||
} else if ((message.flags & errorFlag) == errorFlag) {
|
||||
|
|
|
@ -20,7 +20,7 @@ add_task(async function test_message_properties() {
|
|||
});
|
||||
|
||||
add_task(async function test_level() {
|
||||
for (const level of ["error", "info", "warning"]) {
|
||||
for (const level of ["error", "info", "warn"]) {
|
||||
const listenerId = await listenToConsoleMessage(level);
|
||||
await logConsoleMessage({ message: "foo", level });
|
||||
const message = await getConsoleMessage(listenerId);
|
||||
|
@ -72,7 +72,7 @@ function logConsoleMessage(options = {}) {
|
|||
const levelToFlags = {
|
||||
error: Ci.nsIScriptError.errorFlag,
|
||||
info: Ci.nsIScriptError.infoFlag,
|
||||
warning: Ci.nsIScriptError.warningFlag,
|
||||
warn: Ci.nsIScriptError.warningFlag,
|
||||
};
|
||||
|
||||
const scriptError = Cc["@mozilla.org/scripterror;1"].createInstance(
|
||||
|
|
|
@ -91,8 +91,7 @@ class LogModule extends Module {
|
|||
case "trace":
|
||||
return "debug";
|
||||
case "warn":
|
||||
case "warning":
|
||||
return "warning";
|
||||
return "warn";
|
||||
default:
|
||||
return "info";
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[console.py]
|
||||
[test_level[warn-warn\]]
|
||||
expected: FAIL
|
Загрузка…
Ссылка в новой задаче