test_bug100533.html (1038B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=100533 5 --> 6 <head> 7 <title>Test for Bug 100533</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 10 </head> 11 <body> 12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=100533">Mozilla Bug 100533</a> 13 <p id="display"></p> 14 <div id="content" > 15 16 <button id="thebutton">Test</button> 17 <iframe style='display: none;' src='bug100533_iframe.html' id='a'></iframe> 18 19 </div> 20 <pre id="test"> 21 <script class="testbody" type="text/javascript"> 22 23 SimpleTest.waitForExplicitFinish(); 24 25 /** Test for Bug 100533 */ 26 var submitIframeForm = function() { 27 $('a').contentDocument.getElementById('b').submit(); 28 } 29 30 submitted = function() { 31 ok(true, "Finished. Form submits when located in iframe set to display:none;"); 32 SimpleTest.finish(); 33 }; 34 35 addLoadEvent(function() { 36 thebutton.onclick = submitIframeForm; 37 thebutton.click(); 38 }); 39 </script> 40 </pre> 41 </body> 42 </html>