OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 <script src="resources/common.js"></script> | 5 <script src="resources/common.js"></script> |
6 <form method="get" action="?"> | 6 <form method="get" action="?"> |
7 <input type="hidden" name="hidden" value="I am hidden" /> | 7 <input type="hidden" name="hidden" value="I am hidden" /> |
8 <input id="button" formmethod="post" type="submit" name="button" /> | 8 <input id="button" formmethod="post" type="submit" name="button" /> |
9 </form> | 9 </form> |
10 <script> | 10 <script> |
11 description("Test for the formmethod attribute in input tags."); | 11 description("Test for the formmethod attribute in input tags."); |
12 if (window.testRunner) { | 12 if (window.testRunner) { |
13 testRunner.waitUntilDone(); | 13 testRunner.waitUntilDone(); |
14 } | 14 } |
15 | 15 |
16 var button = document.getElementById('button'); | 16 var button = document.getElementById('button'); |
17 | 17 |
18 if (document.URL.substring(0, 4) == "file") { | 18 if (document.URL.substring(0, 4) == "file") { |
19 if (document.URL.indexOf('?') == -1) { | 19 if (document.URL.indexOf('?') == -1) { |
20 clickElement(button); | 20 clickElement(button); |
21 } else { | 21 } else { |
22 if (document.URL.substring(document.URL.indexOf('?') + 1, document.URL.l
ength) == "") | 22 if (document.URL.substring(document.URL.indexOf('?') + 1, document.URL.l
ength) == "") |
23 testPassed('The formmethod attribute was successfully used'); | 23 testPassed('The formmethod attribute was successfully used'); |
24 else | 24 else |
25 testFailed('The formmethod attribute was not used'); | 25 testFailed('The formmethod attribute was not used'); |
26 | 26 |
27 if (window.testRunner) | 27 if (window.testRunner) |
28 testRunner.notifyDone(); | 28 testRunner.notifyDone(); |
29 } | 29 } |
30 } | 30 } |
31 </script> | 31 </script> |
32 </body> | 32 </body> |
33 </html> | 33 </html> |
OLD | NEW |