Revision 9e8a2af4be1ef619f350af1c73b63922d13a94b7 authored by Michael[tm] Smith on 09 April 2014, 14:23:12 UTC, committed by Michael[tm] Smith on 09 April 2014, 14:23:12 UTC
1 parent a4b8200
Raw File
MessagePort_initial_disabled.htm
<!DOCTYPE html>
<html>
<head>
<title> MessageChannel: port message queue is initially disabled </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<script>
    
    var TestResult = true;
    
    var t = async_test("Test Description: A port message queue can be enabled or disabled, and is initially disabled.");
                  
    var channel = new MessageChannel();
    
    channel.port2.addEventListener("message", TestMessageEvent, true);
    
    channel.port1.postMessage("ping");
    
    setTimeout(t.step_func(VerifyResult), 100);
    
    function TestMessageEvent(evt)
    {
        TestResult = false;
    }

    function VerifyResult()
    {
        assert_true(TestResult, "Port message queue is initially disabled?");
        t.done();
    }
</script>
</body>
</html>
back to top