no bug - Import translations from android-l10n r=release a=l10n CLOSED TREE
[gecko.git] / layout / base / tests / textarea-minlength-ui-valid-change.html
blob18cecef138a91aeb6ba076de53afa79f51dc6b2e
1 <!DOCTYPE HTML>
2 <html>
3 <!-- Test: textarea with minlength is -moz-ui-valid if the user edits and it's not too short -->
4 <head>
5 <style>
6 :-moz-ui-valid { background-color:green; }
7 :-moz-ui-invalid { background-color:red; }
8 * { background-color:white; }
9 </style>
10 <script src="/tests/SimpleTest/EventUtils.js"></script>
11 <script>
12 function runTest() {
13 var textarea = document.getElementById('textarea');
14 textarea.setSelectionRange(textarea.value.length, textarea.value.length)
15 textarea.focus();
16 sendString("o"); // so that it becomes invalid first
17 textarea.blur();
18 textarea.focus();
19 sendString("o");
20 textarea.blur(); // to hide the caret
21 document.documentElement.className='';
23 </script>
24 </head>
25 <body onload="runTest()">
26 <textarea id="textarea" minlength="3">f</textarea>
27 </body>
28 </html>