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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/textarea-crlf.html

Issue 1522803002: Move textarea-related tests to fast/forms/textarea/, part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@color-uaf
Patch Set: Created 5 years 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
(Empty)
1 <html>
2 <head>
3 <script type="text/javascript">
4 function print(message)
5 {
6 var paragraph = document.createElement("li");
7 paragraph.appendChild(document.createTextNode(message));
8 document.getElementById("console").appendChild(paragraph);
9 }
10 function test()
11 {
12 if (window.testRunner) {
13 testRunner.dumpAsText();
14 }
15 var elt = document.getElementById("text");
16 elt.value = "This\ris\ra\rtest";
17 compare(elt.value, "This\nis\na\ntest");
18 elt.value = "And\r\nhere\r\nis\r\ntest\r\ntwo";
19 compare(elt.value, "And\nhere\nis\ntest\ntwo");
20 elt.value = "And\nlastly,\ntest\nthree";
21 compare(elt.value, "And\nlastly,\ntest\nthree");
22 elt.value = "";
23 }
24 function compare(val, exp)
25 {
26 if (val == exp) {
27 print("Passed");
28 } else {
29 print("Failed");
30 }
31 }
32 </script>
33 </head>
34 <body onload="test();">
35 <p>This test attempts to set non-standard line endings in a text area an d reads them back. The line endings should all come back as linefeeds.</p>
36 <p>If the test passes, you should see three lines saying "Passed" below. </p>
37 <hr />
38 <form>
39 <textarea id="text"></textarea>
40 </form>
41 <hr />
42 <p><ol id="console"></ol></p>
43 </body>
44 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698