summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/textarea-newline.html
blob: 2eed2a7999fa125f54d943dcbd020c78525bc7bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
These tests check if leading line feeds characters in textarea as default values are parsed correctly.

<br>
<textarea id="no-line-feed">Madoka</textarea>

<textarea id="one-line-feed">
Sayaka</textarea>

<textarea id="two-line-feeds">

Mami</textarea>

<textarea id="one-line-feed-escaped-char-and-one-line-feed">&#x0a;
Kyoko</textarea>

<textarea id="two-line-feed-escaped-chars">&#x0a;&#x0a;Homura</textarea>

<p id="description"></p>
<div id="console"></div>

<script>
shouldBe('document.getElementById("no-line-feed").value', '"Madoka"');

shouldBe('document.getElementById("one-line-feed").value', '"Sayaka"');

shouldBe('document.getElementById("two-line-feeds").value', '"\\nMami"');

shouldBe('document.getElementById("one-line-feed-escaped-char-and-one-line-feed").value', '"\\nKyoko"');

shouldBe('document.getElementById("two-line-feed-escaped-chars").value', '"\\nHomura"');
</script>

</body>
</html>