https://github.com/web-platform-tests/wpt
Raw File
Tip revision: aedcac217946872aa218bfb3b450a88aaf576493 authored by James Graham on 31 March 2014, 15:15:54 UTC
fixup! Update resources directory
Tip revision: aedcac2
Channel_postMessage_clone_port_error.htm
<!DOCTYPE html>
<html>
<head>
<title> postMessage() DataCloneError: cloning source port </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<script>

    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("DATA_CLONE_ERR", function()
        {
            channel.port1.postMessage("ports", [channel.port1]);
        });
    }, description);
</script>
</body>
</html>
back to top