mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibWeb: Wait for the correct condition in Stream tests
We were signaling that the test is complete too early in some Stream tests.
This commit is contained in:
Notes:
github-actions[bot]
2024-10-03 11:08:29 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/f3f7f77dbc5 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1603 Reviewed-by: https://github.com/awesomekling ✅ Reviewed-by: https://github.com/circl-lastname Reviewed-by: https://github.com/kalenikaliaksandr ✅
@@ -39,19 +39,17 @@
|
||||
cancel() {},
|
||||
});
|
||||
|
||||
|
||||
const reader = transformStream.readable.getReader();
|
||||
reader.read().then(function processText({done, value}) {
|
||||
if (done)
|
||||
reader.read().then(function processText(result) {
|
||||
if (result.done) {
|
||||
done();
|
||||
return;
|
||||
}
|
||||
|
||||
println(value);
|
||||
println(result.value);
|
||||
reader.read().then(processText);
|
||||
}).then(() => {
|
||||
done();
|
||||
});
|
||||
|
||||
stream.pipeThrough(transformStream);
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user