OLD | NEW |
| (Empty) |
1 <script> | |
2 function test() | |
3 { | |
4 if (!location.search.length) { | |
5 if (window.testRunner) { | |
6 testRunner.dumpAsText(); | |
7 testRunner.waitUntilDone(); | |
8 } | |
9 | |
10 if (!document.getElementById("isindex")) { | |
11 log("Could not find isindex element"); | |
12 if (window.testRunner) | |
13 testRunner.notifyDone(); | |
14 return; | |
15 } | |
16 document.getElementById("isindex").value = "This is a test"; | |
17 document.forms[0].submit(); | |
18 } else { | |
19 var expected = "?This+is+a+test"; | |
20 if (location.search != expected) | |
21 log("FAIL: Expected \"" + expected + "\" but got \"" + location.sear
ch + "\""); | |
22 else | |
23 log("PASS"); | |
24 | |
25 if (window.testRunner) | |
26 testRunner.notifyDone(); | |
27 } | |
28 } | |
29 | |
30 function log(msg) | |
31 { | |
32 document.getElementById("log").appendChild(document.createTextNode(msg + "\n
")); | |
33 } | |
34 | |
35 window.onload = test; | |
36 | |
37 </script> | |
38 <p>This page tests that we correctly put the value of an <tt><isindex></tt
> element into the form data.</p> | |
39 <form method="GET" action="isindex-formdata.html"> | |
40 <isindex id="isindex"></isindex> | |
41 </form> | |
42 <pre id="log"></pre> | |
OLD | NEW |