LibWeb: Port some manually async tests to use asyncTest

These tests were mostly async tests written in a manual way. This ports
them to use the standard asyncTest() infrastructure.

This is mostly just to reduce calls to internals.signalTextTestIsDone,
which will have a required parameter in an upcoming test.
This commit is contained in:
Timothy Flynn 2024-10-02 12:31:42 -04:00 committed by Tim Flynn
commit 96082d6ae1
Notes: github-actions[bot] 2024-10-03 11:08:43 +00:00
5 changed files with 64 additions and 54 deletions

View file

@ -2,11 +2,13 @@
<div id="foo">
<iframe></iframe>
<script>
setTimeout(function () {
foo.remove();
// Pass (didn't crash)
internals.signalTextTestIsDone();
}, 0);
asyncTest(done => {
setTimeout(function () {
foo.remove();
// Pass (didn't crash)
done();
}, 0);
});
</script>
</div>
<iframe></iframe>