Bug 1444823 - Execute messageManager.sendAsyncMessage after runTest; r=jdescottes.
MozReview-Commit-ID: Ansa6okYRg
--- a/testing/talos/talos/tests/devtools/addon/content/tests/webconsole/bulklog.js
+++ b/testing/talos/talos/tests/devtools/addon/content/tests/webconsole/bulklog.js
@@ -35,18 +35,18 @@ module.exports = async function() {
addMessageListener("do-logs", function () {
for (var i = 0; i < ${TOTAL_MESSAGES}; i++) {
content.console.log('damp', i+1, content);
}
});
}`
) + ")()", true);
+ let test = runTest("console.bulklog");
// Kick off the logging
messageManager.sendAsyncMessage("do-logs");
- let test = runTest("console.bulklog");
await allMessagesReceived;
test.done();
await closeToolbox();
await testTeardown();
};
--- a/testing/talos/talos/tests/devtools/addon/content/tests/webconsole/objectexpand.js
+++ b/testing/talos/talos/tests/devtools/addon/content/tests/webconsole/objectexpand.js
@@ -32,20 +32,20 @@ module.exports = async function() {
content.console.dir(Array.from({length:1000}).reduce((res, _, i)=> {
res["item_" + i] = i;
return res;
}, {}));
});
}`
) + ")()", true);
+ let test = runTest("console.objectexpand");
// Kick off the logging
messageManager.sendAsyncMessage("do-dir");
- let test = runTest("console.objectexpand");
await onMessageReceived;
const tree = webconsole.hud.ui.outputNode.querySelector(".dir.message .tree");
// The tree can be collapsed since the properties are fetched asynchronously.
if (tree.querySelectorAll(".node").length === 1) {
// If this is the case, we wait for the properties to be fetched and displayed.
await new Promise(resolve => {
const observer = new (getBrowserWindow().MutationObserver)(mutations => {