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

Unified Diff: LayoutTests/fast/forms/placeholder-stripped.html

Issue 253853002: PlaceHolder in TextArea should allow carriage return and line feed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added rendering test and also added test for carriage return Created 6 years, 8 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/placeholder-stripped.html
diff --git a/LayoutTests/fast/forms/placeholder-stripped.html b/LayoutTests/fast/forms/placeholder-stripped.html
index 319e4797f45222c1f90249199c9102e51e65a7ce..bc45b25dfd8ea0a98f0c49de6cd524a9549d7f7b 100644
--- a/LayoutTests/fast/forms/placeholder-stripped.html
+++ b/LayoutTests/fast/forms/placeholder-stripped.html
@@ -4,26 +4,31 @@
<div id=container>
<input placeholder="first line &#13;&#10;second line"><br>
<input placeholder="&#13;"><br>
-<textarea placeholder="first line &#10;second line"></textarea><br>
+<textarea placeholder="first line &#13;&#10;second line"></textarea><br>
<textarea placeholder="&#10;"></textarea>
+<textarea placeholder="&#13;"></textarea>
</div>
<script src="../../resources/js-test.js"></script>
<script>
-description('CR and LF in placeholder values should be stripped.');
+description('CR and LF in placeholder values should be stripped for input type. For textarea should not be stripped.');
if (window.internals) {
var input0 = document.getElementsByTagName('input')[0];
var input1 = document.getElementsByTagName('input')[1];
var textarea0 = document.getElementsByTagName('textarea')[0];
var textarea1 = document.getElementsByTagName('textarea')[1];
+ var textarea2 = document.getElementsByTagName('textarea')[2];
shouldBeEqualToString('internals.visiblePlaceholder(input0)', 'first line second line');
shouldBeEqualToString('internals.visiblePlaceholder(input1)', '');
- shouldBeEqualToString('internals.visiblePlaceholder(textarea0)', 'first line second line');
+ shouldBeEqualToString('internals.visiblePlaceholder(textarea0)', 'first line \r\nsecond line');
shouldBeEqualToString('internals.visiblePlaceholder(textarea1)', '');
+ shouldBeEqualToString('internals.visiblePlaceholder(textarea2)', '');
document.body.removeChild(document.getElementById('container'));
-} else
- debug('The first input element and the first textarea element should have a placeholder "first line second line", and the second input element and the second textarea element should have nothing.');
+} else {
+ debug('The first input element should have a placeholder "first line second line", and the second input element should have nothing.');
+ debug('The first textarea element should have a placeholder "first line &#13;&#10;second line", and the second input element should have nothing');
+}
</script>
</body>
</html>
« no previous file with comments | « LayoutTests/fast/forms/placeholder-appearance-textarea.html ('k') | LayoutTests/fast/forms/placeholder-stripped-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698