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

Unified Diff: LayoutTests/fast/forms/textarea-maxlength.html

Issue 435753003: Implement minlength for <input> and <textarea>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add layout tests for minlength & maxlength together; fix comments 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
Index: LayoutTests/fast/forms/textarea-maxlength.html
diff --git a/LayoutTests/fast/forms/textarea-maxlength.html b/LayoutTests/fast/forms/textarea-maxlength.html
index b286aa1eae81717ba564fb26d5c4441b22205a47..98d7fb50d033fb9028330bdea256f0a8c5af1909 100644
--- a/LayoutTests/fast/forms/textarea-maxlength.html
+++ b/LayoutTests/fast/forms/textarea-maxlength.html
@@ -33,6 +33,11 @@ shouldBe('textArea.getAttribute("maxlength")', '"13"');
shouldThrow('textArea.maxLength = -1', '"IndexSizeError: Failed to set the \'maxLength\' property on \'HTMLTextAreaElement\': The value provided (-1) is not positive or 0."');
shouldBe('textArea.getAttribute("maxlength")', '"13"'); // Not changed
+textArea.minLength = 11;
+shouldThrow('textArea.maxLength = 10', '"IndexSizeError: Failed to set the \'maxLength\' property on \'HTMLTextAreaElement\': The maxLength provided (10) is less than the minimum bound (11)."');
+shouldBe('textArea.getAttribute("maxlength")', '"13"'); // Not changed
+shouldBe('textArea.maxLength = 11; textArea.getAttribute("maxlength")', '"11"');
+textArea.minLength = 0; // Remove the minlength value to get it out of the way of subsequent tests
textArea.maxLength = null;
shouldBe('textArea.maxLength', '0');

Powered by Google App Engine
This is Rietveld 408576698