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

Side by Side Diff: LayoutTests/fast/forms/paste-multiline-text-input.html

Issue 189843008: Value sanitization for input[type=text] should not truncate a value at control character (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@bug196640
Patch Set: Updated as per review comments Created 6 years, 9 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 unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 if (window.testRunner) 4 if (window.testRunner)
5 window.testRunner.dumpAsText(); 5 window.testRunner.dumpAsText();
6 6
7 function getInput() 7 function getInput()
8 { 8 {
9 return document.getElementById('inputId'); 9 return document.getElementById('inputId');
10 } 10 }
11 11
12 var DEFAULT_LINE_1 = "line\t(1 of 2)\r\nline\t(2 of 2)"; 12 var DEFAULT_LINE_1 = "line\t(1 of 2)\r\nline\t(2 of 2)";
13 var EXPECTED_LINE_1 = "line\t(1 of 2) line\t(2 of 2)"; 13 var EXPECTED_LINE_1 = "line\t(1 of 2) line\t(2 of 2)";
14 14
15 // FIXME: Is this really expected behavior to truncate the string at a n ull byte?
16 // It doesn't match Firefox 4 and common sense.
17 var DEFAULT_LINE_2 = "null\0char"; 15 var DEFAULT_LINE_2 = "null\0char";
18 var EXPECTED_LINE_2 = "null"; 16 var EXPECTED_LINE_2 = "null\0char";
19 17
20 var DEFAULT_LINE_3 = "line with trailing newlines\r\n\r\n"; 18 var DEFAULT_LINE_3 = "line with trailing newlines\r\n\r\n";
21 var EXPECTED_LINE_3 = "line with trailing newlines"; 19 var EXPECTED_LINE_3 = "line with trailing newlines";
22 20
23 var TEST_NAME_1 = "Multi-line test"; 21 var TEST_NAME_1 = "Multi-line test";
24 var TEST_NAME_2 = "Null char test"; 22 var TEST_NAME_2 = "Null char test";
25 var TEST_NAME_3 = "Trailing newline test"; 23 var TEST_NAME_3 = "Trailing newline test";
26 24
27 function testMultiline() 25 function testMultiline()
28 { 26 {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 .fail { color: red; } 77 .fail { color: red; }
80 .code { font-family: monospace; } 78 .code { font-family: monospace; }
81 </style> 79 </style>
82 </head> 80 </head>
83 <body onload="testMultiline()"> 81 <body onload="testMultiline()">
84 <h2>Test: This test verifies that text inputs will accept multiple lines of pasted text. You should see three tests "PASS" below.</h2> 82 <h2>Test: This test verifies that text inputs will accept multiple lines of pasted text. You should see three tests "PASS" below.</h2>
85 <input id=inputId size=60 /><br> 83 <input id=inputId size=60 /><br>
86 <span class=code id=console></span> 84 <span class=code id=console></span>
87 </body> 85 </body>
88 </html> 86 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/input-value-sanitization-expected.txt ('k') | Source/core/html/forms/TextFieldInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698