darin@apple.com | c8611d3 | 2008-03-16 22:21:34 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <body> |
| 3 | <p>This tests that a textarea where the wrap attribute is removed reverts to normal wrapping behavior.</p> |
| 4 | <form name="f" method="?" action="textarea-linewrap-dynamic.html"> |
| 5 | <textarea id="textarea" name="textarea" wrap="hard" cols="5">123456789</textarea> |
| 6 | <input type="submit"> |
| 7 | </form> |
| 8 | <script> |
| 9 | if (document.URL.indexOf('?') == -1) { |
rniwa@webkit.org | ea3cf92 | 2012-06-22 06:52:33 +0000 | [diff] [blame] | 10 | if (window.testRunner) { |
| 11 | window.testRunner.dumpAsText(); |
| 12 | window.testRunner.waitUntilDone(); |
darin@apple.com | c8611d3 | 2008-03-16 22:21:34 +0000 | [diff] [blame] | 13 | } |
| 14 | document.getElementById("textarea").removeAttribute("wrap"); |
| 15 | document.f.submit(); |
| 16 | } else { |
| 17 | var formData = document.URL.substring(document.URL.indexOf('?') + 1, document.URL.length); |
| 18 | if (formData == "textarea=123456789") |
| 19 | document.write("Success"); |
| 20 | else |
| 21 | document.write("Failure. The form data that should have been submitted: textarea=123456789<br>This is what was actually submitted: " + formData); |
rniwa@webkit.org | ea3cf92 | 2012-06-22 06:52:33 +0000 | [diff] [blame] | 22 | if (window.testRunner) |
| 23 | window.testRunner.notifyDone(); |
darin@apple.com | c8611d3 | 2008-03-16 22:21:34 +0000 | [diff] [blame] | 24 | } |
| 25 | </script> |
| 26 | </body> |
| 27 | </html> |