Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / tooLong-check-on-cloned-textcontrol.html
blobcace2db9975d5c8dd7a58a0f706cf6edc98d85b5
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script>
6 function deleteChar(target) {
7 target.focus();
8 target.setSelectionRange(7, 7);
9 if (window.testRunner) {
10 eventSender.keyDown("backspace", []);
12 target.blur();
15 function validate(evt) {
16 var node = evt.target;
17 var cloneNode = node.cloneNode();
18 var result = node.validity.tooLong == cloneNode.validity.tooLong;
19 log(result, node.nodeName.toLowerCase());
22 function log(msg, consoleName) {
23 var console = document.getElementById(consoleName + "Console" );
24 console.innerHTML = console.innerHTML + msg + "<br>";
27 function startTest() {
28 deleteChar(document.getElementById("input"));
29 deleteChar(document.getElementById("textarea"));
30 if (window.testRunner)
31 testRunner.notifyDone();
34 if (window.testRunner)
35 testRunner.waitUntilDone();
37 </script>
38 </head>
39 <body onload="startTest()">
41 <input type="text" id="input" maxlength=4 value="sampletext" onchange="validate(event)"/>
42 <div id="inputConsole">Input : validity.tooLong is equal for node and cloned node=</div>
44 <textarea id="textarea" maxlength=4 onchange="validate(event)">sampletext</textarea>
45 <div id="textareaConsole">Textarea: validity.tooLong is equal for node and cloned node=</div>
47 </body>
48 </html>