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

Unified Diff: LayoutTests/fast/forms/textarea-maxlength.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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/textarea-maxlength-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/textarea-maxlength.html
diff --git a/LayoutTests/fast/forms/textarea-maxlength.html b/LayoutTests/fast/forms/textarea-maxlength.html
index 98d7fb50d033fb9028330bdea256f0a8c5af1909..d7be9ba0f295653f22ddec4dc9d20e55e1067531 100644
--- a/LayoutTests/fast/forms/textarea-maxlength.html
+++ b/LayoutTests/fast/forms/textarea-maxlength.html
@@ -21,6 +21,14 @@ shouldBe('textArea.maxLength', '-1');
textArea.setAttribute('maxlength', 'xyz');
shouldBe('textArea.maxLength', '-1');
+// Leading whitespaces in maxlength attributes
+textArea.setAttribute('maxlength', '\t \n\r1');
+shouldBe('textArea.maxLength', '1');
+textArea.setAttribute('maxlength', "\u20021");
+shouldBe('textArea.maxLength', '-1');
+textArea.setAttribute('maxlength', "\u20091");
+shouldBe('textArea.maxLength', '-1');
+
// Valid maxlength attributes
textArea.setAttribute('maxlength', '1');
shouldBe('textArea.maxLength', '1');
« no previous file with comments | « no previous file | LayoutTests/fast/forms/textarea-maxlength-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698