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

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

Issue 656683005: Use parseHTMLInteger for parsing minlength and maxlength in <textarea> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add layout tests that check for leading non-ASCII whitespaces in min/maxlength attribute 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-minlength.html
diff --git a/LayoutTests/fast/forms/textarea-minlength.html b/LayoutTests/fast/forms/textarea-minlength.html
index 45146638f9d52def8b751fa276bb6fc91afe9fd9..da0f489370f8e7e269313a34ed19ba0e40d77d57 100644
--- a/LayoutTests/fast/forms/textarea-minlength.html
+++ b/LayoutTests/fast/forms/textarea-minlength.html
@@ -21,6 +21,14 @@ shouldBe('textArea.minLength', '-1');
textArea.setAttribute('minlength', 'xyz');
shouldBe('textArea.minLength', '-1');
+// Leading whitespaces in minlength attributes
+textArea.setAttribute('minlength', '\t \n\r1');
+shouldBe('textArea.minLength', '1');
+textArea.setAttribute('minlength', "\u20021");
+shouldBe('textArea.minLength', '-1');
+textArea.setAttribute('minlength', "\u20091");
+shouldBe('textArea.minLength', '-1');
+
// Valid minlength attributes
textArea.setAttribute('minlength', '1');
shouldBe('textArea.minLength', '1');
« no previous file with comments | « LayoutTests/fast/forms/textarea-maxlength-expected.txt ('k') | LayoutTests/fast/forms/textarea-minlength-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698