Bug 1430443 - Part 2: Wait for the next event tick after closing sidebar to make sure the message is flushed in devtools/client/webconsole/test/browser_webconsole_clear_method.js r=bgrins

This commit is contained in:
Tooru Fujisawa 2018-01-20 20:40:10 +09:00
Родитель 264f93619d
Коммит b733a923bf
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -51,6 +51,10 @@ add_task(async function () {
info("Wait for variables view sidebar to be closed after console.clear()");
await sidebarClosed;
// Wait for the next event tick to make sure the remaining part of the
// test is not executed before the message is actually flushed.
await new Promise(executeSoon);
ok(!hud.outputNode.textContent.includes("log3"), "log3 not displayed");
ok(!hud.outputNode.textContent.includes("log4"), "log4 not displayed");
ok(hud.outputNode.textContent.includes("Console was cleared"),