Closed Bug 1437844 Opened 2 years ago Closed 2 years ago

Enable browser_console_consolejsm_output.js in new frontend

Categories

(DevTools :: Console, enhancement, P1)

enhancement

Tracking

(firefox60 fixed)

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: nchevobbe, Assigned: miker)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [newconsole-mvp])

Attachments

(1 file)

No description provided.
Has Regression Range: --- → irrelevant
Has STR: --- → irrelevant
Priority: -- → P2
Whiteboard: [newconsole-mvp]
Severity: normal → enhancement
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Depends on: 1437845
OS: Unspecified → All
Priority: P2 → P1
Hardware: Unspecified → All
Attachment #8955193 - Flags: review?(nchevobbe)
Comment on attachment 8955193 [details]
Bug 1437844 - Enable browser_console_consolejsm_output.js in new frontend

https://reviewboard.mozilla.org/r/224352/#review230590

Thanks Mike, looks a lot better now :)

::: devtools/client/webconsole/new-console-output/test/mochitest/browser_console_consolejsm_output.js:75
(Diff revision 3)
> -  let {ConsoleAPI} = ChromeUtils.import("resource://gre/modules/Console.jsm", {});
> -  let consoleOptions = {
> -    maxLogLevel: "error",
> -    maxLogLevelPref: "testing.maxLogLevel",
> -  };
> +  console2.error(shouldBeVisible);
> +  console2.log(shouldBeHidden);
> +
> +  await checkMessageExists(hud, shouldBeVisible);
> +  await checkMessageHidden(hud, shouldBeHidden);

could we invert the calls so we are sure that the "should be hidden" message is indeed hidden (as opposed to "pending to be rendered")

```js
onsole2.log(shouldBeHidden);
console2.error(shouldBeVisible);

await checkMessageExists(hud, shouldBeVisible);
// Here we can safely assert that the log message is not visible, since the error message was logged after and is visible.
await checkMessageHidden(hud, shouldBeHidden);
```

::: devtools/client/webconsole/new-console-output/test/mochitest/browser_console_consolejsm_output.js:131
(Diff revision 3)
> +  ok(message, `"${msg}" was logged`);
> +}
> +
> +async function checkMessageHidden(hud, msg) {
> +  info(`Checking "${msg}" was not logged`);
> +  await waitFor(() => findMessages(hud, msg).length === 0);

nit: maybe we could use `findMessage(msg) === null` ?
Attachment #8955193 - Flags: review?(nchevobbe) → review+
Comment on attachment 8955193 [details]
Bug 1437844 - Enable browser_console_consolejsm_output.js in new frontend

https://reviewboard.mozilla.org/r/224352/#review230590

> nit: maybe we could use `findMessage(msg) === null` ?

It returns `undefined` so in the end I went with `findMessage(hud, msg) == null`
Pushed by mratcliffe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b7b3c610cbca
Enable browser_console_consolejsm_output.js in new frontend r=nchevobbe
https://hg.mozilla.org/mozilla-central/rev/b7b3c610cbca
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.