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

Unified Diff: LayoutTests/fast/forms/ValidityState-tooLong-input.html

Issue 435753003: Implement minlength for <input> and <textarea>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add more layout tests Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/forms/ValidityState-tooLong-input-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/ValidityState-tooLong-input.html
diff --git a/LayoutTests/fast/forms/ValidityState-tooLong-input.html b/LayoutTests/fast/forms/ValidityState-tooLong-input.html
index 8a54fc51efc1fef691ce85688e32131388c9f46c..f7c5496d83b65fa250c25c289ce7b05d3477db4d 100644
--- a/LayoutTests/fast/forms/ValidityState-tooLong-input.html
+++ b/LayoutTests/fast/forms/ValidityState-tooLong-input.html
@@ -48,11 +48,19 @@ input.value = 'abcde';
shouldBeFalse('input.validity.tooLong');
debug('');
-debug('Disabled');
-input.disabled = true;
-shouldBeFalse('input.validity.tooLong');
-input.disabled = false;
+debug('Disabling makes the control valid');
+input.focus();
+input.setSelectionRange(5, 5); // Move the cursor at the end.
+document.execCommand('delete');
+shouldBeTrue('input.validity.tooLong');
+shouldBeFalse('input.disabled = true; input.validity.tooLong');
+shouldBeTrue('input.disabled = false; input.validity.tooLong');
+// TODO: The grapheme test below doesn't do its job because initial value is
keishi 2014/10/08 09:17:49 nit: style guideline says to use FIXME instead of
Bartek Nowierski 2014/10/09 05:32:56 Done.
+// always valid. After making a modificaton to trigger validity check, one can
+// see that the test would fail, which possibly reveals a code issue.
keishi 2014/10/08 09:17:49 nit: This looks like a bug so maybe you can file a
Bartek Nowierski 2014/10/09 05:32:56 Done. https://code.google.com/p/chromium/issues/de
+// Once this is figured out, implement a similar test in
+// ValidityState-tooShort-input.html
debug('');
debug('Grapheme length is not greater than maxLength though character length is greater');
// fancyX should be treated as 1 grapheme.
« no previous file with comments | « no previous file | LayoutTests/fast/forms/ValidityState-tooLong-input-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698