| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <p id="description"></p> | 7 <p id="description"></p> |
| 8 <div id="console"></div> | 8 <div id="console"></div> |
| 9 <script> | 9 <script> |
| 10 description("Test for validationMessage DOM property."); | 10 description("Test for validationMessage DOM property."); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 numberInput.max = "10.02"; | 97 numberInput.max = "10.02"; |
| 98 numberInput.value = "10.01"; | 98 numberInput.value = "10.01"; |
| 99 debug("input stepMismatch: " + numberInput.validationMessage); | 99 debug("input stepMismatch: " + numberInput.validationMessage); |
| 100 | 100 |
| 101 debug("tooLong:"); | 101 debug("tooLong:"); |
| 102 var inputWithMax = document.createElement("input"); | 102 var inputWithMax = document.createElement("input"); |
| 103 inputWithMax.maxLength = 3; | 103 inputWithMax.maxLength = 3; |
| 104 inputWithMax.value = "abcdef"; | 104 inputWithMax.value = "abcdef"; |
| 105 document.body.appendChild(inputWithMax); | 105 document.body.appendChild(inputWithMax); |
| 106 inputWithMax.focus(); | 106 inputWithMax.focus(); |
| 107 inputWithMax.setSelectionRange(6, 6); | |
| 108 document.execCommand("delete"); | 107 document.execCommand("delete"); |
| 109 debug("input tooLong: " + inputWithMax.validationMessage); | 108 debug("input tooLong: " + inputWithMax.validationMessage); |
| 110 // fancyX should be treated as 3 characters. | 109 // fancyX should be treated as 3 characters. |
| 111 // U+0305 COMBINING OVERLINE | 110 // U+0305 COMBINING OVERLINE |
| 112 // U+0332 COMBINING LOW LINE | 111 // U+0332 COMBINING LOW LINE |
| 113 var fancyX = "x\u0305\u0332"; | 112 var fancyX = "x\u0305\u0332"; |
| 114 inputWithMax.maxLength = 2; | 113 inputWithMax.maxLength = 2; |
| 115 inputWithMax.value = fancyX + "X"; | 114 inputWithMax.value = fancyX + "X"; |
| 116 inputWithMax.focus(); | 115 inputWithMax.focus(); |
| 117 inputWithMax.setSelectionRange(4, 4); | 116 inputWithMax.setSelectionRange(4, 4); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // Keygen controls can't be validated | 166 // Keygen controls can't be validated |
| 168 var happyKeygen = document.createElement("keygen"); | 167 var happyKeygen = document.createElement("keygen"); |
| 169 happySelect.name = "keygen"; | 168 happySelect.name = "keygen"; |
| 170 form.appendChild(happyKeygen); | 169 form.appendChild(happyKeygen); |
| 171 shouldBe("happyKeygen.validationMessage", "''"); | 170 shouldBe("happyKeygen.validationMessage", "''"); |
| 172 | 171 |
| 173 form.remove(); | 172 form.remove(); |
| 174 </script> | 173 </script> |
| 175 </body> | 174 </body> |
| 176 </html> | 175 </html> |
| OLD | NEW |