| Index: LayoutTests/fast/forms/tooLong-check-on-cloned-textcontrol.html
|
| diff --git a/LayoutTests/fast/forms/tooLong-check-on-cloned-textcontrol.html b/LayoutTests/fast/forms/tooLong-check-on-cloned-textcontrol.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..cace2db9975d5c8dd7a58a0f706cf6edc98d85b5
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/forms/tooLong-check-on-cloned-textcontrol.html
|
| @@ -0,0 +1,48 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<script>
|
| + function deleteChar(target) {
|
| + target.focus();
|
| + target.setSelectionRange(7, 7);
|
| + if (window.testRunner) {
|
| + eventSender.keyDown("backspace", []);
|
| + }
|
| + target.blur();
|
| + }
|
| +
|
| + function validate(evt) {
|
| + var node = evt.target;
|
| + var cloneNode = node.cloneNode();
|
| + var result = node.validity.tooLong == cloneNode.validity.tooLong;
|
| + log(result, node.nodeName.toLowerCase());
|
| + }
|
| +
|
| + function log(msg, consoleName) {
|
| + var console = document.getElementById(consoleName + "Console" );
|
| + console.innerHTML = console.innerHTML + msg + "<br>";
|
| + }
|
| +
|
| + function startTest() {
|
| + deleteChar(document.getElementById("input"));
|
| + deleteChar(document.getElementById("textarea"));
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| + }
|
| +
|
| + if (window.testRunner)
|
| + testRunner.waitUntilDone();
|
| +
|
| +</script>
|
| +</head>
|
| +<body onload="startTest()">
|
| +
|
| +<input type="text" id="input" maxlength=4 value="sampletext" onchange="validate(event)"/>
|
| +<div id="inputConsole">Input : validity.tooLong is equal for node and cloned node=</div>
|
| +
|
| +<textarea id="textarea" maxlength=4 onchange="validate(event)">sampletext</textarea>
|
| +<div id="textareaConsole">Textarea: validity.tooLong is equal for node and cloned node=</div>
|
| +
|
| +</body>
|
| +</html>
|
|
|