<pre id="test">
<script class="testbody" type="application/javascript">
/** Test for Bug 387706 **/
SimpleTest.waitForExplicitFinish();
function receiveTestResult(evt)
{
ok(evt instanceof MessageEvent, "umm, how did we get this?");
is(evt.type, "message", "expected events of type 'message'");
ok(evt.isTrusted === true, "should have been a trusted event");
is(evt.lastEventId, "", "postMessage creates events with empty lastEventId");
// Either we passed the test or we failed it. The message's
// contents should help to diagnose the failure. Either way,
// consider this the end of the test.
is(evt.data, "test-passed", "unexpected test result");
SimpleTest.finish();
}
function setup()
{
window.addEventListener("message", receiveTestResult);
window.frames.container.postMessage("start-test", "http://sub1.test1.example.org");
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.