1<html>
2<head>
3<script>
4function test()
5{
6 var isindexElm = document.getElementById("isindex");
7 if (!location.search.length) {
8 if (window.layoutTestController) {
9 layoutTestController.dumpAsText();
10 layoutTestController.waitUntilDone();
11 }
12
13 isindexElm.value = "This is a test";
14 isindexElm.focus();
15
16 if (window.eventSender)
17 eventSender.keyDown(String.fromCharCode(0x0d));
18 } else {
19 var expected = "?This+is+a+test";
20 if (location.search != expected)
21 log("FAIL: Expected \"" + expected + "\" but got \"" + location.search + "\"");
22 else
23 log("PASS");
24
25 if (window.layoutTestController)
26 layoutTestController.notifyDone();
27 }
28}
29
30function log(msg)
31{
32 document.getElementById("log").appendChild(document.createTextNode(msg + "\n"));
33}
34
35window.onload = test;
36</script>
37</head>
38<body>
39<p>This page tests that we correctly put the value of an <tt><isindex></tt> element into the form data.</p>
40<p>If you are running this test by hand, submit the phrase: "This is a test" (without quotes).</p>
41<isindex id="isindex"></isindex>
42<pre id="log"></pre>
43</body>
44</html>