test_bug679494.xhtml (1218B)
1 <?xml version="1.0"?> 2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?> 3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?> 4 <!-- 5 https://bugzilla.mozilla.org/show_bug.cgi?id=679494 6 --> 7 <window title="Mozilla Bug 679494" onload="doTest();" 8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 9 10 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> 11 12 <body xmlns="http://www.w3.org/1999/xhtml"> 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=679494">Mozilla Bug 679494</a> 14 <p id="display"></p> 15 <div id="content" style="display: none"> 16 <iframe id="contentframe" src="http://mochi.test:8888/tests/dom/events/test/file_bug679494.html"></iframe> 17 </div> 18 </body> 19 20 <script class="testbody" type="application/javascript"><![CDATA[ 21 22 /* Test for bug 679494 */ 23 function doTest() { 24 SimpleTest.waitForExplicitFinish(); 25 26 var w = document.getElementById("contentframe").contentWindow; 27 w.addEventListener("message", function(e) { 28 is("test", e.data, "We got the data without a compartment mismatch assertion!"); 29 SimpleTest.finish(); 30 }); 31 w.postMessage("test", "*"); 32 } 33 34 ]]></script> 35 36 </window>