summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-linewrap-dynamic.html
blob: 982b31dbf6c7faef678d8919e56f0e6794928223 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<html>
<body>
<p>This tests that a textarea where the wrap attribute is removed reverts to normal wrapping behavior.</p>
<form name="f" method="?" action="textarea-linewrap-dynamic.html">
<textarea id="textarea" name="textarea" wrap="hard" cols="5">123456789</textarea>
<input type="submit">
</form>
<script>
if (document.URL.indexOf('?') == -1) {
    if (window.testRunner) {
        window.testRunner.dumpAsText();
        window.testRunner.waitUntilDone();
    }
    document.getElementById("textarea").removeAttribute("wrap");
    document.f.submit();
} else {
    var formData = document.URL.substring(document.URL.indexOf('?') + 1, document.URL.length);
    if (formData == "textarea=123456789")
        document.write("Success");
    else
        document.write("Failure.  The form data that should have been submitted: textarea=123456789<br>This is what was actually submitted: " + formData);    
    if (window.testRunner)
        window.testRunner.notifyDone();
}
</script>
</body>
</html>