mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
Tests: Rearrange message order in Messaging-post-channel-over-channel
The way this test was written didn't guarantee a deterministic message order, resulting in different output in Chromium and Firefox. This change slightly rearranges the message order to make it deterministic. This change is necessary as a prepartion for upcoming change that makes MessagePort post messages from a separate thread, which would've revealed the non-deterministic message order.
This commit is contained in:
parent
ab35325003
commit
af2dae63d1
Notes:
github-actions[bot]
2025-04-08 19:10:37 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: af2dae63d1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4276
Reviewed-by: https://github.com/ADKaster
2 changed files with 3 additions and 3 deletions
|
@ -23,11 +23,11 @@
|
|||
let channel2 = new MessageChannel();
|
||||
|
||||
channel2.port2.onmessage = (event) => {
|
||||
println("Port3: " + JSON.stringify(event.data))
|
||||
println("Port3: " + JSON.stringify(event.data));
|
||||
channel.port2.postMessage("DONE");
|
||||
}
|
||||
|
||||
channel.port2.postMessage("Hello");
|
||||
channel.port2.postMessage({ foo: channel2.port1 }, { transfer: [channel2.port1] });
|
||||
channel.port2.postMessage("DONE");
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue