Bug 1880216 - Migrate Fenix docs into Sphinx. r=owlish,geckoview-reviewers,android...
[gecko.git] / dom / html / test / test_bug448564.html
blobbfb61af8dd8626f71b72e84389d49e752d73608d
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">
23 /** Test for Bug 448564 **/
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.
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.");
41 SimpleTest.waitForExplicitFinish();
43 addLoadEvent(function() {
44 checkQueryString(frames[0]);
45 checkQueryString(frames[1]);
46 checkQueryString(frames[2]);
47 SimpleTest.finish();
48 });
50 </script>
51 </pre>
52 </body>
53 </html>