w.opener.postMessage({ testResult: assertions }, '*');
        }

        function onFailure(error) {
            assertions.push({actual: false, expected: true, message: error.toString()});
            onComplete();
        }

        function onMessage( messageevent )
        {
            assertions.push({expected: true, actual: messageevent instanceof window.MediaKeyMessageEvent, message: "event is of correct class"});
            assertions.push({expected: 'message', actual: messageevent.type, message: