Bug 1208373 - Fix test_peerConnection_capturedVideo.html to wait for close() promise. r?jib
MozReview-Commit-ID: AOrm5JkfxAG
--- a/dom/media/tests/mochitest/test_peerConnection_capturedVideo.html
+++ b/dom/media/tests/mochitest/test_peerConnection_capturedVideo.html
@@ -68,18 +68,18 @@ function startTest(media, token) {
return test.chain.execute();
});
})
// Handle both MediaErrors (with the `code` attribute) and other errors.
.catch(e => ok(false, "Error (" + e + ")" +
(e.code ? " (code=" + e.code + ")" : "") +
" in test for " + media.name +
(e.stack ? ":\n" + e.stack : "")))
+ .then(() => test && test.close())
.then(() => {
- if (test) { test.close(); }
removeNodeAndSource(video);
manager.finished(token);
})
.catch(e => ok(false, "Error (" + e + ") during shutdown."));
};
</script>
</pre>