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

Unified Diff: third_party/WebKit/Source/core/html/HTMLTextAreaElementTest.cpp

Issue 2380473002: Change the linebreak behavior of minlength and maxlength attributes of TEXTAREA. (Closed)
Patch Set: Created 4 years, 3 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 | « third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLTextAreaElementTest.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTextAreaElementTest.cpp b/third_party/WebKit/Source/core/html/HTMLTextAreaElementTest.cpp
index c475bb9444e2c298c0b431f19e9c1d403e2fe389..1ff4681ffdf28c4b15f4af3b3bc575885d7bd4c2 100644
--- a/third_party/WebKit/Source/core/html/HTMLTextAreaElementTest.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTextAreaElementTest.cpp
@@ -22,11 +22,13 @@ TEST(HTMLTextAreaElementTest, SanitizeUserInputValue)
EXPECT_EQ("", HTMLTextAreaElement::sanitizeUserInputValue("", 1));
EXPECT_EQ("", HTMLTextAreaElement::sanitizeUserInputValue(leadSurrogate, 1));
EXPECT_EQ("a", HTMLTextAreaElement::sanitizeUserInputValue("a", 1));
- EXPECT_EQ("", HTMLTextAreaElement::sanitizeUserInputValue("\n", 1));
+ EXPECT_EQ("\n", HTMLTextAreaElement::sanitizeUserInputValue("\n", 1));
EXPECT_EQ("\n", HTMLTextAreaElement::sanitizeUserInputValue("\n", 2));
EXPECT_EQ("abc", HTMLTextAreaElement::sanitizeUserInputValue(String("abc") + leadSurrogate, 4));
- EXPECT_EQ("a\nc", HTMLTextAreaElement::sanitizeUserInputValue("a\ncdef", 4));
+ EXPECT_EQ("a\ncd", HTMLTextAreaElement::sanitizeUserInputValue("a\ncdef", 4));
+ EXPECT_EQ("a\rcd", HTMLTextAreaElement::sanitizeUserInputValue("a\rcdef", 4));
+ EXPECT_EQ("a\r\ncd", HTMLTextAreaElement::sanitizeUserInputValue("a\r\ncdef", 4));
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698