test_bug448564.html (1544B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=448564 5 --> 6 <head> 7 <title>Test for Bug 448564</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=448564">Mozilla Bug 448564</a> 13 <p id="display"> 14 <iframe src="bug448564-iframe-1.html"></iframe> 15 <iframe src="bug448564-iframe-2.html"></iframe> 16 <iframe src="bug448564-iframe-3.html"></iframe> 17 </p> 18 <div id="content" style="display: none"> 19 </div> 20 <pre id="test"> 21 <script class="testbody" type="text/javascript"> 22 23 /** Test for Bug 448564 */ 24 25 /** 26 * The three iframes are going to be loaded with some dirty constructed forms. 27 * Each of them will be submitted before the load event and a SJS will replace 28 * the frame content with the query string. 29 * Then, on the load event, our test file will check the content of each iframes 30 * and check if the query string were correctly formatted (implying that all 31 * iframes were correctly submitted. 32 */ 33 34 function checkQueryString(frame) { 35 var queryString = frame.document.body.textContent; 36 is(queryString.split("&").sort().join("&"), 37 "a=aval&b=bval&c=cval&d=dval", 38 "Not all form fields were properly submitted."); 39 } 40 41 SimpleTest.waitForExplicitFinish(); 42 43 addLoadEvent(function() { 44 checkQueryString(frames[0]); 45 checkQueryString(frames[1]); 46 checkQueryString(frames[2]); 47 SimpleTest.finish(); 48 }); 49 50 </script> 51 </pre> 52 </body> 53 </html>