1 <p>This page tests that the length of an
<tt><input
></tt> element's string is implicitly limited to
524288 characters.
<a href=
"http://bugs.webkit.org/show_bug.cgi?id=14388">http://bugs.webkit.org/show_bug.cgi?id=
14388</a></p>
7 document
.getElementById("log").appendChild(document
.createTextNode(msg
+ "\n"));
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
15 function attempt(length
, expected
)
17 log("Attempting to insert " + length
+ " characters.");
19 if (testString
.length
> length
)
22 for (var i
= testString
.length
; i
< length
; ++i
)
25 var input
= document
.getElementById("input");
26 input
.value
= testString
;
28 if (input
.value
.length
== expected
)
31 log("FAIL: Expected " + expected
+ " characters to be inserted, but " + input
.value
.length
+ " characters were actually inserted.");
37 attempt(524287, 524287);
38 attempt(524288, 524288);
39 attempt(524289, 524288);
40 attempt(530000, 524288);