mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-24 18:28:57 +00:00
parent
e2b2115722
commit
3fffd1129c
Notes:
github-actions[bot]
2024-11-23 02:39:19 +00:00
Author: https://github.com/shannonbooth
Commit: 3fffd1129c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2509
Reviewed-by: https://github.com/tcl3 ✅
4 changed files with 65 additions and 3 deletions
|
@ -0,0 +1,15 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>postMessage() DataCloneError: cloning source port</title>
|
||||
<script>
|
||||
self.GLOBAL = {
|
||||
isWindow: function() { return true; },
|
||||
isWorker: function() { return false; },
|
||||
isShadowRealm: function() { return false; },
|
||||
};
|
||||
</script>
|
||||
<script src="../resources/testharness.js"></script>
|
||||
<script src="../resources/testharnessreport.js"></script>
|
||||
|
||||
<div id=log></div>
|
||||
<script src="../webmessaging/Channel_postMessage_clone_port_error.any.js"></script>
|
|
@ -0,0 +1,14 @@
|
|||
// META: title=postMessage() DataCloneError: cloning source port
|
||||
|
||||
var description = "Test Description: Throw a DataCloneError if transfer array in postMessage contains source port.";
|
||||
|
||||
test(function()
|
||||
{
|
||||
var channel = new MessageChannel();
|
||||
channel.port1.start();
|
||||
|
||||
assert_throws_dom("DATA_CLONE_ERR", function()
|
||||
{
|
||||
channel.port1.postMessage("ports", [channel.port1]);
|
||||
});
|
||||
}, description);
|
Loading…
Add table
Add a link
Reference in a new issue