Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/validationMessage.html

Issue 2100243002: Remove non-standardize key code names from event_sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inspector tests that were missed by sed Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <script src="resources/common.js"></script> 5 <script src="resources/common.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <p id="description"></p> 8 <p id="description"></p>
9 <div id="console"></div> 9 <div id="console"></div>
10 <script> 10 <script>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 numberInput.max = "10.02"; 98 numberInput.max = "10.02";
99 numberInput.value = "10.01"; 99 numberInput.value = "10.01";
100 debug("input stepMismatch: " + numberInput.validationMessage); 100 debug("input stepMismatch: " + numberInput.validationMessage);
101 101
102 debug("tooLong:"); 102 debug("tooLong:");
103 var inputWithMax = document.createElement("input"); 103 var inputWithMax = document.createElement("input");
104 inputWithMax.maxLength = 3; 104 inputWithMax.maxLength = 3;
105 inputWithMax.value = "abcdef"; 105 inputWithMax.value = "abcdef";
106 document.body.appendChild(inputWithMax); 106 document.body.appendChild(inputWithMax);
107 inputWithMax.focus(); 107 inputWithMax.focus();
108 eventSender.keyDown("backspace"); 108 eventSender.keyDown("Backspace");
109 debug("input tooLong: " + inputWithMax.validationMessage); 109 debug("input tooLong: " + inputWithMax.validationMessage);
110 // fancyX should be treated as 3 characters. 110 // fancyX should be treated as 3 characters.
111 // U+0305 COMBINING OVERLINE 111 // U+0305 COMBINING OVERLINE
112 // U+0332 COMBINING LOW LINE 112 // U+0332 COMBINING LOW LINE
113 var fancyX = "x\u0305\u0332"; 113 var fancyX = "x\u0305\u0332";
114 inputWithMax.maxLength = 2; 114 inputWithMax.maxLength = 2;
115 inputWithMax.value = fancyX + "X"; 115 inputWithMax.value = fancyX + "X";
116 inputWithMax.focus(); 116 inputWithMax.focus();
117 inputWithMax.setSelectionRange(4, 4); 117 inputWithMax.setSelectionRange(4, 4);
118 eventSender.keyDown("backspace"); 118 eventSender.keyDown("Backspace");
119 debug("input tooLong: " + inputWithMax.validationMessage); 119 debug("input tooLong: " + inputWithMax.validationMessage);
120 // The following test might show English text + Arabic digits. It's expected and 120 // The following test might show English text + Arabic digits. It's expected and
121 // it never happens in products. 121 // it never happens in products.
122 inputWithMax.lang = "ar-eg"; 122 inputWithMax.lang = "ar-eg";
123 debug("input tooLong: " + inputWithMax.validationMessage); 123 debug("input tooLong: " + inputWithMax.validationMessage);
124 124
125 var textarea = document.createElement("textarea"); 125 var textarea = document.createElement("textarea");
126 document.body.appendChild(textarea); 126 document.body.appendChild(textarea);
127 textarea.focus(); 127 textarea.focus();
128 sendString("a\nbc"); 128 sendString("a\nbc");
129 textarea.maxLength = 3; 129 textarea.maxLength = 3;
130 debug("textarea tooLong: " + textarea.validationMessage); 130 debug("textarea tooLong: " + textarea.validationMessage);
131 131
132 debug("tooShort:"); 132 debug("tooShort:");
133 var inputWithMin = document.createElement("input"); 133 var inputWithMin = document.createElement("input");
134 inputWithMin.minLength = 3; 134 inputWithMin.minLength = 3;
135 inputWithMin.value = "ab"; 135 inputWithMin.value = "ab";
136 document.body.appendChild(inputWithMin); 136 document.body.appendChild(inputWithMin);
137 inputWithMin.focus(); 137 inputWithMin.focus();
138 eventSender.keyDown("backspace"); 138 eventSender.keyDown("Backspace");
139 debug("input tooShort: " + inputWithMin.validationMessage); 139 debug("input tooShort: " + inputWithMin.validationMessage);
140 // fancyX should be treated as 3 characters. 140 // fancyX should be treated as 3 characters.
141 // U+0305 COMBINING OVERLINE 141 // U+0305 COMBINING OVERLINE
142 // U+0332 COMBINING LOW LINE 142 // U+0332 COMBINING LOW LINE
143 var fancyX = "x\u0305\u0332"; 143 var fancyX = "x\u0305\u0332";
144 inputWithMin.minLength = 4; 144 inputWithMin.minLength = 4;
145 inputWithMin.value = fancyX + "X"; 145 inputWithMin.value = fancyX + "X";
146 inputWithMin.focus(); 146 inputWithMin.focus();
147 inputWithMin.setSelectionRange(4, 4); 147 inputWithMin.setSelectionRange(4, 4);
148 eventSender.keyDown("backspace"); 148 eventSender.keyDown("Backspace");
149 debug("input tooShort: " + inputWithMin.validationMessage); 149 debug("input tooShort: " + inputWithMin.validationMessage);
150 // The following test might show English text + Arabic digits. It's expected and 150 // The following test might show English text + Arabic digits. It's expected and
151 // it never happens in products. 151 // it never happens in products.
152 inputWithMin.lang = "ar-eg"; 152 inputWithMin.lang = "ar-eg";
153 debug("input tooShort: " + inputWithMin.validationMessage); 153 debug("input tooShort: " + inputWithMin.validationMessage);
154 154
155 var textarea = document.createElement("textarea"); 155 var textarea = document.createElement("textarea");
156 document.body.appendChild(textarea); 156 document.body.appendChild(textarea);
157 textarea.focus(); 157 textarea.focus();
158 sendString("a\n"); 158 sendString("a\n");
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Keygen controls can't be validated 197 // Keygen controls can't be validated
198 var happyKeygen = document.createElement("keygen"); 198 var happyKeygen = document.createElement("keygen");
199 happySelect.name = "keygen"; 199 happySelect.name = "keygen";
200 form.appendChild(happyKeygen); 200 form.appendChild(happyKeygen);
201 shouldBe("happyKeygen.validationMessage", "''"); 201 shouldBe("happyKeygen.validationMessage", "''");
202 202
203 form.remove(); 203 form.remove();
204 </script> 204 </script>
205 </body> 205 </body>
206 </html> 206 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698