зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1670570 - [devtools] Fix intermittent on browser_webconsole_close_groups_after_navigation.js. r=bomsy
The test was adding a tab with a page that does a console.group call, and then was refreshing the page and waiting for the next console.group message to be displayed. The problem seems to be that we weren't waiting for the initial console.group message, which might mess up the rest of the test. We're fixing this in the patch, and adding selector to `waitForMessage` so we are sure to get the console.group message (and not another message, as the location does have the `hello` world in it, since we're using a data url). Differential Revision: https://phabricator.services.mozilla.com/D109491
This commit is contained in:
Родитель
368607c4cd
Коммит
243ac02108
|
@ -8,7 +8,11 @@ add_task(async function() {
|
|||
// Enable persist logs
|
||||
await pushPref("devtools.webconsole.persistlog", true);
|
||||
|
||||
info(
|
||||
"Open the console and wait for the console.group message to be rendered"
|
||||
);
|
||||
const hud = await openNewTabAndConsole(TEST_URI);
|
||||
await waitFor(() => findMessage(hud, "hello", ".startGroup"));
|
||||
|
||||
info("Refresh tab several times and check for correct message indentation");
|
||||
for (let i = 0; i < 5; i++) {
|
||||
|
@ -17,7 +21,7 @@ add_task(async function() {
|
|||
});
|
||||
|
||||
async function refreshTabAndCheckIndent(hud) {
|
||||
const onMessage = waitForMessage(hud, "hello");
|
||||
const onMessage = waitForMessage(hud, "hello", ".startGroup");
|
||||
await refreshTab();
|
||||
const { node } = await onMessage;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче