blob: 9f4cd6b9be711e90c435140bab5183aa10e18e31 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title> postMessage() with a host object raises DataCloneError </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<script>
var description = "Throw a DataCloneError when a host object (e.g. a DOM node) is used with postMessage.";
test(function()
{
var channel = new MessageChannel();
channel.port1.start();
assert_throws("DATA_CLONE_ERR", function()
{
channel.port1.postMessage(navigator);
});
}, description);
</script>
</body>
</html>